Skip to content

Commit a48ac3d

Browse files
maquefelarndb
authored andcommitted
pwm: ep93xx: drop legacy pinctrl
Drop legacy gpio request/free since we are using pinctrl for this now. Signed-off-by: Nikita Shubin <[email protected]> Acked-by: Uwe Kleine-König <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 046322f commit a48ac3d

File tree

3 files changed

+0
-64
lines changed

3 files changed

+0
-64
lines changed

arch/arm/mach-ep93xx/core.c

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -577,48 +577,6 @@ void __init ep93xx_register_pwm(int pwm0, int pwm1)
577577
platform_device_register(&ep93xx_pwm1_device);
578578
}
579579

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-
622580
/*************************************************************************
623581
* EP93xx video peripheral handling
624582
*************************************************************************/

drivers/pwm/pwm-ep93xx.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727

2828
#include <asm/div64.h>
2929

30-
#include <linux/soc/cirrus/ep93xx.h> /* for ep93xx_pwm_{acquire,release}_gpio() */
31-
3230
#define EP93XX_PWMx_TERM_COUNT 0x00
3331
#define EP93XX_PWMx_DUTY_CYCLE 0x04
3432
#define EP93XX_PWMx_ENABLE 0x08
@@ -44,20 +42,6 @@ static inline struct ep93xx_pwm *to_ep93xx_pwm(struct pwm_chip *chip)
4442
return pwmchip_get_drvdata(chip);
4543
}
4644

47-
static int ep93xx_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm)
48-
{
49-
struct platform_device *pdev = to_platform_device(pwmchip_parent(chip));
50-
51-
return ep93xx_pwm_acquire_gpio(pdev);
52-
}
53-
54-
static void ep93xx_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm)
55-
{
56-
struct platform_device *pdev = to_platform_device(pwmchip_parent(chip));
57-
58-
ep93xx_pwm_release_gpio(pdev);
59-
}
60-
6145
static int ep93xx_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
6246
const struct pwm_state *state)
6347
{
@@ -156,8 +140,6 @@ static int ep93xx_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
156140
}
157141

158142
static const struct pwm_ops ep93xx_pwm_ops = {
159-
.request = ep93xx_pwm_request,
160-
.free = ep93xx_pwm_free,
161143
.apply = ep93xx_pwm_apply,
162144
};
163145

include/linux/soc/cirrus/ep93xx.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,13 @@ struct ep93xx_regmap_adev {
3737
container_of((_adev), struct ep93xx_regmap_adev, adev)
3838

3939
#ifdef CONFIG_ARCH_EP93XX
40-
int ep93xx_pwm_acquire_gpio(struct platform_device *pdev);
41-
void ep93xx_pwm_release_gpio(struct platform_device *pdev);
4240
int ep93xx_ide_acquire_gpio(struct platform_device *pdev);
4341
void ep93xx_ide_release_gpio(struct platform_device *pdev);
4442
int ep93xx_i2s_acquire(void);
4543
void ep93xx_i2s_release(void);
4644
unsigned int ep93xx_chip_revision(void);
4745

4846
#else
49-
static inline int ep93xx_pwm_acquire_gpio(struct platform_device *pdev) { return 0; }
50-
static inline void ep93xx_pwm_release_gpio(struct platform_device *pdev) {}
5147
static inline int ep93xx_ide_acquire_gpio(struct platform_device *pdev) { return 0; }
5248
static inline void ep93xx_ide_release_gpio(struct platform_device *pdev) {}
5349
static inline int ep93xx_i2s_acquire(void) { return 0; }

0 commit comments

Comments
 (0)