All of lore.kernel.org
 help / color / mirror / Atom feed
* input: gpio_keys_polled: Request GPIO pin as input.
@ 2015-08-17 21:29 Vincent Pelletier
  2015-08-17 21:29 ` Vincent Pelletier
  0 siblings, 1 reply; 6+ messages in thread
From: Vincent Pelletier @ 2015-08-17 21:29 UTC (permalink / raw)
  To: linux-input; +Cc: mika.westerberg, aaron.lu

Hello,

Please keep me cc'ed on replies, I'm not subscribed.

Regards,
--
Vincent Pelletier


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

* input: gpio_keys_polled: Request GPIO pin as input.
  2015-08-17 21:29 input: gpio_keys_polled: Request GPIO pin as input Vincent Pelletier
@ 2015-08-17 21:29 ` Vincent Pelletier
  2015-08-18 12:07   ` Mika Westerberg
  0 siblings, 1 reply; 6+ messages in thread
From: Vincent Pelletier @ 2015-08-17 21:29 UTC (permalink / raw)
  To: linux-input; +Cc: mika.westerberg, aaron.lu

Flag was lost in:
Commit 633a21d80b4a("input: gpio_keys_polled: Add support for GPIO
descriptors").

Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com>
---
 drivers/input/keyboard/gpio_keys_polled.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c
index 097d721..c6dc644 100644
--- a/drivers/input/keyboard/gpio_keys_polled.c
+++ b/drivers/input/keyboard/gpio_keys_polled.c
@@ -246,7 +246,7 @@ static int gpio_keys_polled_probe(struct platform_device *pdev)
 		 * convert it to descriptor.
 		 */
 		if (!button->gpiod && gpio_is_valid(button->gpio)) {
-			unsigned flags = 0;
+			unsigned flags = GPIOF_IN;
 
 			if (button->active_low)
 				flags |= GPIOF_ACTIVE_LOW;
-- 
2.5.0


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

* Re: input: gpio_keys_polled: Request GPIO pin as input.
  2015-08-17 21:29 ` Vincent Pelletier
@ 2015-08-18 12:07   ` Mika Westerberg
  2015-08-20 17:49     ` [Try 2] " Vincent Pelletier
  0 siblings, 1 reply; 6+ messages in thread
From: Mika Westerberg @ 2015-08-18 12:07 UTC (permalink / raw)
  To: Vincent Pelletier; +Cc: linux-input, aaron.lu

On Mon, Aug 17, 2015 at 11:29:32PM +0200, Vincent Pelletier wrote:
> Flag was lost in:
> Commit 633a21d80b4a("input: gpio_keys_polled: Add support for GPIO
> descriptors").

You could add a bit more verbose changelog here.

> Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com>

Regardless of that the patch itself looks good,

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

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

* [Try 2] input: gpio_keys_polled: Request GPIO pin as input.
  2015-08-18 12:07   ` Mika Westerberg
@ 2015-08-20 17:49     ` Vincent Pelletier
  2015-08-20 17:50       ` Vincent Pelletier
  0 siblings, 1 reply; 6+ messages in thread
From: Vincent Pelletier @ 2015-08-20 17:49 UTC (permalink / raw)
  To: linux-input; +Cc: mika.westerberg, aaron.lu

Changes since try 1:
- Added Reviewed-By Mika
- Made commit log more verbose (I'm very bad at this suggestions very welcome)

Regards,
--
Vincent Pelletier


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

* input: gpio_keys_polled: Request GPIO pin as input.
  2015-08-20 17:49     ` [Try 2] " Vincent Pelletier
@ 2015-08-20 17:50       ` Vincent Pelletier
  2015-08-20 19:12         ` Dmitry Torokhov
  0 siblings, 1 reply; 6+ messages in thread
From: Vincent Pelletier @ 2015-08-20 17:50 UTC (permalink / raw)
  To: linux-input; +Cc: mika.westerberg, aaron.lu

GPIOF_IN flag was lost in:
Commit 633a21d80b4a("input: gpio_keys_polled: Add support for GPIO
descriptors").

Without this flag, legacy code path (for non-descriptor GPIO declarations)
would configure GPIO as output (0 meaning GPIOF_DIR_OUT | GPIOF_INIT_LOW).

Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/input/keyboard/gpio_keys_polled.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c
index 097d721..c6dc644 100644
--- a/drivers/input/keyboard/gpio_keys_polled.c
+++ b/drivers/input/keyboard/gpio_keys_polled.c
@@ -246,7 +246,7 @@ static int gpio_keys_polled_probe(struct platform_device *pdev)
 		 * convert it to descriptor.
 		 */
 		if (!button->gpiod && gpio_is_valid(button->gpio)) {
-			unsigned flags = 0;
+			unsigned flags = GPIOF_IN;
 
 			if (button->active_low)
 				flags |= GPIOF_ACTIVE_LOW;
-- 
2.5.0


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

* Re: input: gpio_keys_polled: Request GPIO pin as input.
  2015-08-20 17:50       ` Vincent Pelletier
@ 2015-08-20 19:12         ` Dmitry Torokhov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Torokhov @ 2015-08-20 19:12 UTC (permalink / raw)
  To: Vincent Pelletier; +Cc: linux-input, mika.westerberg, aaron.lu

On Thu, Aug 20, 2015 at 07:50:00PM +0200, Vincent Pelletier wrote:
> GPIOF_IN flag was lost in:
> Commit 633a21d80b4a("input: gpio_keys_polled: Add support for GPIO
> descriptors").
> 
> Without this flag, legacy code path (for non-descriptor GPIO declarations)
> would configure GPIO as output (0 meaning GPIOF_DIR_OUT | GPIOF_INIT_LOW).
> 
> Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com>
> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

Applied and tagged for stable, thank you.

> ---
>  drivers/input/keyboard/gpio_keys_polled.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c
> index 097d721..c6dc644 100644
> --- a/drivers/input/keyboard/gpio_keys_polled.c
> +++ b/drivers/input/keyboard/gpio_keys_polled.c
> @@ -246,7 +246,7 @@ static int gpio_keys_polled_probe(struct platform_device *pdev)
>  		 * convert it to descriptor.
>  		 */
>  		if (!button->gpiod && gpio_is_valid(button->gpio)) {
> -			unsigned flags = 0;
> +			unsigned flags = GPIOF_IN;
>  
>  			if (button->active_low)
>  				flags |= GPIOF_ACTIVE_LOW;
> -- 
> 2.5.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Dmitry

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

end of thread, other threads:[~2015-08-20 19:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-17 21:29 input: gpio_keys_polled: Request GPIO pin as input Vincent Pelletier
2015-08-17 21:29 ` Vincent Pelletier
2015-08-18 12:07   ` Mika Westerberg
2015-08-20 17:49     ` [Try 2] " Vincent Pelletier
2015-08-20 17:50       ` Vincent Pelletier
2015-08-20 19:12         ` Dmitry Torokhov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.