Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pwm: ep93xx: drop legacy pinctrl

Drop legacy gpio request/free since we are using
pinctrl for this now.

Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

authored by

Nikita Shubin and committed by
Arnd Bergmann
a48ac3dc 046322f1

-64
-42
arch/arm/mach-ep93xx/core.c
··· 577 577 platform_device_register(&ep93xx_pwm1_device); 578 578 } 579 579 580 - int ep93xx_pwm_acquire_gpio(struct platform_device *pdev) 581 - { 582 - int err; 583 - 584 - if (pdev->id == 0) { 585 - err = 0; 586 - } else if (pdev->id == 1) { 587 - err = gpio_request(EP93XX_GPIO_LINE_EGPIO14, 588 - dev_name(&pdev->dev)); 589 - if (err) 590 - return err; 591 - err = gpio_direction_output(EP93XX_GPIO_LINE_EGPIO14, 0); 592 - if (err) 593 - goto fail; 594 - 595 - /* PWM 1 output on EGPIO[14] */ 596 - ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_PONG); 597 - } else { 598 - err = -ENODEV; 599 - } 600 - 601 - return err; 602 - 603 - fail: 604 - gpio_free(EP93XX_GPIO_LINE_EGPIO14); 605 - return err; 606 - } 607 - EXPORT_SYMBOL(ep93xx_pwm_acquire_gpio); 608 - 609 - void ep93xx_pwm_release_gpio(struct platform_device *pdev) 610 - { 611 - if (pdev->id == 1) { 612 - gpio_direction_input(EP93XX_GPIO_LINE_EGPIO14); 613 - gpio_free(EP93XX_GPIO_LINE_EGPIO14); 614 - 615 - /* EGPIO[14] used for GPIO */ 616 - ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_PONG); 617 - } 618 - } 619 - EXPORT_SYMBOL(ep93xx_pwm_release_gpio); 620 - 621 - 622 580 /************************************************************************* 623 581 * EP93xx video peripheral handling 624 582 *************************************************************************/
-18
drivers/pwm/pwm-ep93xx.c
··· 27 27 28 28 #include <asm/div64.h> 29 29 30 - #include <linux/soc/cirrus/ep93xx.h> /* for ep93xx_pwm_{acquire,release}_gpio() */ 31 - 32 30 #define EP93XX_PWMx_TERM_COUNT 0x00 33 31 #define EP93XX_PWMx_DUTY_CYCLE 0x04 34 32 #define EP93XX_PWMx_ENABLE 0x08 ··· 40 42 static inline struct ep93xx_pwm *to_ep93xx_pwm(struct pwm_chip *chip) 41 43 { 42 44 return pwmchip_get_drvdata(chip); 43 - } 44 - 45 - static int ep93xx_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) 46 - { 47 - struct platform_device *pdev = to_platform_device(pwmchip_parent(chip)); 48 - 49 - return ep93xx_pwm_acquire_gpio(pdev); 50 - } 51 - 52 - static void ep93xx_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) 53 - { 54 - struct platform_device *pdev = to_platform_device(pwmchip_parent(chip)); 55 - 56 - ep93xx_pwm_release_gpio(pdev); 57 45 } 58 46 59 47 static int ep93xx_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, ··· 140 156 } 141 157 142 158 static const struct pwm_ops ep93xx_pwm_ops = { 143 - .request = ep93xx_pwm_request, 144 - .free = ep93xx_pwm_free, 145 159 .apply = ep93xx_pwm_apply, 146 160 }; 147 161
-4
include/linux/soc/cirrus/ep93xx.h
··· 37 37 container_of((_adev), struct ep93xx_regmap_adev, adev) 38 38 39 39 #ifdef CONFIG_ARCH_EP93XX 40 - int ep93xx_pwm_acquire_gpio(struct platform_device *pdev); 41 - void ep93xx_pwm_release_gpio(struct platform_device *pdev); 42 40 int ep93xx_ide_acquire_gpio(struct platform_device *pdev); 43 41 void ep93xx_ide_release_gpio(struct platform_device *pdev); 44 42 int ep93xx_i2s_acquire(void); ··· 44 46 unsigned int ep93xx_chip_revision(void); 45 47 46 48 #else 47 - static inline int ep93xx_pwm_acquire_gpio(struct platform_device *pdev) { return 0; } 48 - static inline void ep93xx_pwm_release_gpio(struct platform_device *pdev) {} 49 49 static inline int ep93xx_ide_acquire_gpio(struct platform_device *pdev) { return 0; } 50 50 static inline void ep93xx_ide_release_gpio(struct platform_device *pdev) {} 51 51 static inline int ep93xx_i2s_acquire(void) { return 0; }