summaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-atmel.c
diff options
context:
space:
mode:
authorUwe Kleine-König <uwe@kleine-koenig.org>2019-08-24 02:10:40 +0200
committerThierry Reding <thierry.reding@gmail.com>2020-01-08 13:44:51 +0100
commit02afb811e0cf96958ac69c4b3372088180c829a7 (patch)
treee4215e0a177e817bec1fc66cbd97590dec9572fd /drivers/pwm/pwm-atmel.c
parent998d189a817b8aae5b9e416c40dcb35b1fd79d3c (diff)
downloadlinux-02afb811e0cf96958ac69c4b3372088180c829a7.tar.bz2
pwm: atmel: Use register accessors for channels
This makes it a bit easier when instrumenting register access to only have to add code in one place. Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-atmel.c')
-rw-r--r--drivers/pwm/pwm-atmel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pwm/pwm-atmel.c b/drivers/pwm/pwm-atmel.c
index 3ff3c171437e..b8b47c315ac0 100644
--- a/drivers/pwm/pwm-atmel.c
+++ b/drivers/pwm/pwm-atmel.c
@@ -111,7 +111,7 @@ static inline u32 atmel_pwm_ch_readl(struct atmel_pwm_chip *chip,
{
unsigned long base = PWM_CH_REG_OFFSET + ch * PWM_CH_REG_SIZE;
- return readl_relaxed(chip->base + base + offset);
+ return atmel_pwm_readl(chip, base + offset);
}
static inline void atmel_pwm_ch_writel(struct atmel_pwm_chip *chip,
@@ -120,7 +120,7 @@ static inline void atmel_pwm_ch_writel(struct atmel_pwm_chip *chip,
{
unsigned long base = PWM_CH_REG_OFFSET + ch * PWM_CH_REG_SIZE;
- writel_relaxed(val, chip->base + base + offset);
+ atmel_pwm_writel(chip, base + offset, val);
}
static int atmel_pwm_calculate_cprd_and_pres(struct pwm_chip *chip,