pwm: Make use of pwm_get_xxx() helpers where appropriate
Use the pwm_get_xxx() helpers instead of directly accessing the fields in struct pwm_device. This will allow us to smoothly move to the atomic update approach. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
This commit is contained in:

committed by
Thierry Reding

parent
011e763148
commit
15da7b5001
@@ -129,7 +129,8 @@ static int imx_pwm_config_v2(struct pwm_chip *chip,
|
||||
sr = readl(imx->mmio_base + MX3_PWMSR);
|
||||
fifoav = sr & MX3_PWMSR_FIFOAV_MASK;
|
||||
if (fifoav == MX3_PWMSR_FIFOAV_4WORDS) {
|
||||
period_ms = DIV_ROUND_UP(pwm->period, NSEC_PER_MSEC);
|
||||
period_ms = DIV_ROUND_UP(pwm_get_period(pwm),
|
||||
NSEC_PER_MSEC);
|
||||
msleep(period_ms);
|
||||
|
||||
sr = readl(imx->mmio_base + MX3_PWMSR);
|
||||
|
Reference in New Issue
Block a user