pwm: Fix period setting in imx-tpm driver and a maintainer update
Erik Schumacher found and fixed a problem in the calculation of the PWM period setting yielding too long periods. Trevor Gamblin---who already cared about mainlining the pwm-axi-pwmgen driver---stepped forward as an additional reviewer. Thanks to Erik and Trevor. -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmcsghcACgkQj4D7WH0S /k5+rwf9EQq0tGE7yoXdCz1s/YEwp3XadWW9jYAUiRip4bxxzSZeav435RdyVy6O aSUifvm2MrlEjSMmRSGoOBnwSRHA6XwEeZKB4jh2CLaWklLwqOdCYA5Cyabup2Zn Z0Kzs3jAaw/y4v6gB9sCO5bj47KY6px1XGn8dqMHrVDJvfTWz9PMUOPFyaCtR9Ov Y9DVD2XTIZ2v6z0WHMLiMrYAqBgGxsqZTZTUs+cVBnGDDyKjD8SZNdk9vrxGoerw yoQ8iljNLPPmz3iKELJh5IJhY5Nj5hVlzhFm7QSAlhIOFzxtCaDpwMyRUNEeYVjt 0+HumDC5X6MUBwgdFB55Ra3Nw+H3dg== =QzWj -----END PGP SIGNATURE----- Merge tag 'pwm/for-6.12-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux Pull pwm fix from Uwe Kleine-König: "Fix period setting in imx-tpm driver and a maintainer update Erik Schumacher found and fixed a problem in the calculation of the PWM period setting yielding too long periods. Trevor Gamblin - who already cared about mainlining the pwm-axi-pwmgen driver - stepped forward as an additional reviewer. Thanks to Erik and Trevor" * tag 'pwm/for-6.12-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux: MAINTAINERS: add self as reviewer for AXI PWM GENERATOR pwm: imx-tpm: Use correct MODULO value for EPWM mode
This commit is contained in:
commit
80fb253416
@ -3745,6 +3745,7 @@ F: drivers/spi/spi-axi-spi-engine.c
|
||||
AXI PWM GENERATOR
|
||||
M: Michael Hennerich <michael.hennerich@analog.com>
|
||||
M: Nuno Sá <nuno.sa@analog.com>
|
||||
R: Trevor Gamblin <tgamblin@baylibre.com>
|
||||
L: linux-pwm@vger.kernel.org
|
||||
S: Supported
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
|
@ -106,7 +106,9 @@ static int pwm_imx_tpm_round_state(struct pwm_chip *chip,
|
||||
p->prescale = prescale;
|
||||
|
||||
period_count = (clock_unit + ((1 << prescale) >> 1)) >> prescale;
|
||||
p->mod = period_count;
|
||||
if (period_count == 0)
|
||||
return -EINVAL;
|
||||
p->mod = period_count - 1;
|
||||
|
||||
/* calculate real period HW can support */
|
||||
tmp = (u64)period_count << prescale;
|
||||
|
Loading…
Reference in New Issue
Block a user