aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-imx.c
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@free-electrons.com>2015-07-01 04:21:50 -0400
committerThierry Reding <thierry.reding@gmail.com>2015-07-20 03:53:22 -0400
commit15da7b5001e498fa7dc619d4d7951f9665b071e4 (patch)
treeb6326e565d42eed52a157f84440475f84760e958 /drivers/pwm/pwm-imx.c
parent011e76314818b6a24d5347b2d83b8a577e6aaae6 (diff)
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>
Diffstat (limited to 'drivers/pwm/pwm-imx.c')
-rw-r--r--drivers/pwm/pwm-imx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
index 008dc646225e..d600fd5cd4ba 100644
--- a/drivers/pwm/pwm-imx.c
+++ b/drivers/pwm/pwm-imx.c
@@ -129,7 +129,8 @@ static int imx_pwm_config_v2(struct pwm_chip *chip,
129 sr = readl(imx->mmio_base + MX3_PWMSR); 129 sr = readl(imx->mmio_base + MX3_PWMSR);
130 fifoav = sr & MX3_PWMSR_FIFOAV_MASK; 130 fifoav = sr & MX3_PWMSR_FIFOAV_MASK;
131 if (fifoav == MX3_PWMSR_FIFOAV_4WORDS) { 131 if (fifoav == MX3_PWMSR_FIFOAV_4WORDS) {
132 period_ms = DIV_ROUND_UP(pwm->period, NSEC_PER_MSEC); 132 period_ms = DIV_ROUND_UP(pwm_get_period(pwm),
133 NSEC_PER_MSEC);
133 msleep(period_ms); 134 msleep(period_ms);
134 135
135 sr = readl(imx->mmio_base + MX3_PWMSR); 136 sr = readl(imx->mmio_base + MX3_PWMSR);