diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2013-05-24 19:24:51 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-30 08:54:04 -0400 |
commit | 02846b97d7464b92441df2e9d2f59fd5591bbd81 (patch) | |
tree | 1723432704e65f7b3822517a15a41671d85aa97d /drivers/misc | |
parent | ac91b96f3070a2c3b562464604847887cc44b342 (diff) |
misc/ep93xx_pwm: remove ep93xx_pwm_disable() inline function
This is a simple wrapper around writel(), remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Ryan Mallon <rmallon@gmail.com>
Cc: Matthieu Crapet <mcrapet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/ep93xx_pwm.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/misc/ep93xx_pwm.c b/drivers/misc/ep93xx_pwm.c index cf42347182bc..320d911edcbc 100644 --- a/drivers/misc/ep93xx_pwm.c +++ b/drivers/misc/ep93xx_pwm.c | |||
@@ -44,11 +44,6 @@ static inline u16 ep93xx_pwm_read_tc(struct ep93xx_pwm *pwm) | |||
44 | return readl(pwm->mmio_base + EP93XX_PWMx_TERM_COUNT); | 44 | return readl(pwm->mmio_base + EP93XX_PWMx_TERM_COUNT); |
45 | } | 45 | } |
46 | 46 | ||
47 | static inline void ep93xx_pwm_disable(struct ep93xx_pwm *pwm) | ||
48 | { | ||
49 | writel(0x0, pwm->mmio_base + EP93XX_PWMx_ENABLE); | ||
50 | } | ||
51 | |||
52 | static inline int ep93xx_pwm_is_enabled(struct ep93xx_pwm *pwm) | 47 | static inline int ep93xx_pwm_is_enabled(struct ep93xx_pwm *pwm) |
53 | { | 48 | { |
54 | return readl(pwm->mmio_base + EP93XX_PWMx_ENABLE) & 0x1; | 49 | return readl(pwm->mmio_base + EP93XX_PWMx_ENABLE) & 0x1; |
@@ -127,7 +122,7 @@ static ssize_t ep93xx_pwm_set_freq(struct device *dev, | |||
127 | return -EINVAL; | 122 | return -EINVAL; |
128 | 123 | ||
129 | if (val == 0) { | 124 | if (val == 0) { |
130 | ep93xx_pwm_disable(pwm); | 125 | writel(0x0, pwm->mmio_base + EP93XX_PWMx_ENABLE); |
131 | } else if (val <= (clk_get_rate(pwm->clk) / 2)) { | 126 | } else if (val <= (clk_get_rate(pwm->clk) / 2)) { |
132 | u32 term, duty; | 127 | u32 term, duty; |
133 | 128 | ||
@@ -276,7 +271,7 @@ static int __init ep93xx_pwm_probe(struct platform_device *pdev) | |||
276 | pwm->duty_percent = 50; | 271 | pwm->duty_percent = 50; |
277 | 272 | ||
278 | /* disable pwm at startup. Avoids zero value. */ | 273 | /* disable pwm at startup. Avoids zero value. */ |
279 | ep93xx_pwm_disable(pwm); | 274 | writel(0x0, pwm->mmio_base + EP93XX_PWMx_ENABLE); |
280 | writel(EP93XX_PWM_MAX_COUNT, pwm->mmio_base + EP93XX_PWMx_TERM_COUNT); | 275 | writel(EP93XX_PWM_MAX_COUNT, pwm->mmio_base + EP93XX_PWMx_TERM_COUNT); |
281 | writel(EP93XX_PWM_MAX_COUNT/2, pwm->mmio_base + EP93XX_PWMx_DUTY_CYCLE); | 276 | writel(EP93XX_PWM_MAX_COUNT/2, pwm->mmio_base + EP93XX_PWMx_DUTY_CYCLE); |
282 | 277 | ||
@@ -290,7 +285,7 @@ static int __exit ep93xx_pwm_remove(struct platform_device *pdev) | |||
290 | { | 285 | { |
291 | struct ep93xx_pwm *pwm = platform_get_drvdata(pdev); | 286 | struct ep93xx_pwm *pwm = platform_get_drvdata(pdev); |
292 | 287 | ||
293 | ep93xx_pwm_disable(pwm); | 288 | writel(0x0, pwm->mmio_base + EP93XX_PWMx_ENABLE); |
294 | clk_disable(pwm->clk); | 289 | clk_disable(pwm->clk); |
295 | sysfs_remove_group(&pdev->dev.kobj, &ep93xx_pwm_sysfs_files); | 290 | sysfs_remove_group(&pdev->dev.kobj, &ep93xx_pwm_sysfs_files); |
296 | ep93xx_pwm_release_gpio(pdev); | 291 | ep93xx_pwm_release_gpio(pdev); |