LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/1] pwm: pca9685: use gpio core provided macro GPIO_LINE_DIRECTION_OUT
@ 2020-03-11 15:52 Rishi Gupta
  2020-03-11 16:43 ` Uwe Kleine-König
  0 siblings, 1 reply; 2+ messages in thread
From: Rishi Gupta @ 2020-03-11 15:52 UTC (permalink / raw)
  To: thierry.reding, u.kleine-koenig, s.trumtrar
  Cc: linux-pwm, linux-kernel, Rishi Gupta

GPIO core recently added macro to uniformly specify direction
of a GPIO Line, so use it.

Signed-off-by: Rishi Gupta <gupt21@gmail.com>
---
 drivers/pwm/pwm-pca9685.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-pca9685.c b/drivers/pwm/pwm-pca9685.c
index b2a9e77..e2bac1e 100644
--- a/drivers/pwm/pwm-pca9685.c
+++ b/drivers/pwm/pwm-pca9685.c
@@ -168,7 +168,7 @@ static int pca9685_pwm_gpio_get_direction(struct gpio_chip *chip,
 					  unsigned int offset)
 {
 	/* Always out */
-	return 0;
+	return GPIO_LINE_DIRECTION_OUT;
 }
 
 static int pca9685_pwm_gpio_direction_input(struct gpio_chip *gpio,
-- 
2.7.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] pwm: pca9685: use gpio core provided macro GPIO_LINE_DIRECTION_OUT
  2020-03-11 15:52 [PATCH 1/1] pwm: pca9685: use gpio core provided macro GPIO_LINE_DIRECTION_OUT Rishi Gupta
@ 2020-03-11 16:43 ` Uwe Kleine-König
  0 siblings, 0 replies; 2+ messages in thread
From: Uwe Kleine-König @ 2020-03-11 16:43 UTC (permalink / raw)
  To: Rishi Gupta; +Cc: thierry.reding, s.trumtrar, linux-pwm, linux-kernel

On Wed, Mar 11, 2020 at 09:22:20PM +0530, Rishi Gupta wrote:
> GPIO core recently added macro to uniformly specify direction
> of a GPIO Line, so use it.
> 
> Signed-off-by: Rishi Gupta <gupt21@gmail.com>

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Best regards and thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-11 16:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-11 15:52 [PATCH 1/1] pwm: pca9685: use gpio core provided macro GPIO_LINE_DIRECTION_OUT Rishi Gupta
2020-03-11 16:43 ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).