All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] input: adp5589: Fix row 5 handling for adp5589
  2016-02-09 10:29 [PATCH] input: adp5589: Fix row 5 handling for adp5589 Lars-Peter Clausen
@ 2016-02-09 10:24 ` Michael Hennerich
  2016-02-09 17:36   ` Dmitry Torokhov
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Hennerich @ 2016-02-09 10:24 UTC (permalink / raw)
  To: Lars-Peter Clausen, Dmitry Torokhov; +Cc: linux-input

On 02/09/2016 11:29 AM, Lars-Peter Clausen wrote:
> The adp5589 has row 5, don't skip it when creating the GPIO mapping.
> Otherwise the pin gets reserved as used and it is not possible to use it as
> a GPIO.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

Acked-by: Michael Hennerich <michael.hennerich@analog.com>

> ---
>   drivers/input/keyboard/adp5589-keys.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/input/keyboard/adp5589-keys.c b/drivers/input/keyboard/adp5589-keys.c
> index 4d446d5..c01a1d6 100644
> --- a/drivers/input/keyboard/adp5589-keys.c
> +++ b/drivers/input/keyboard/adp5589-keys.c
> @@ -235,7 +235,7 @@ struct adp5589_kpad {
>   	unsigned short gpimapsize;
>   	unsigned extend_cfg;
>   	bool is_adp5585;
> -	bool adp5585_support_row5;
> +	bool support_row5;
>   #ifdef CONFIG_GPIOLIB
>   	unsigned char gpiomap[ADP5589_MAXGPIO];
>   	bool export_gpio;
> @@ -485,7 +485,7 @@ static int adp5589_build_gpiomap(struct adp5589_kpad *kpad,
>   	if (kpad->extend_cfg & C4_EXTEND_CFG)
>   		pin_used[kpad->var->c4_extend_cfg] = true;
>
> -	if (!kpad->adp5585_support_row5)
> +	if (!kpad->support_row5)
>   		pin_used[5] = true;
>
>   	for (i = 0; i < kpad->var->maxgpio; i++)
> @@ -884,12 +884,13 @@ static int adp5589_probe(struct i2c_client *client,
>
>   	switch (id->driver_data) {
>   	case ADP5585_02:
> -		kpad->adp5585_support_row5 = true;
> +		kpad->support_row5 = true;
>   	case ADP5585_01:
>   		kpad->is_adp5585 = true;
>   		kpad->var = &const_adp5585;
>   		break;
>   	case ADP5589:
> +		kpad->support_row5 = true;
>   		kpad->var = &const_adp5589;
>   		break;
>   	}
>


-- 
Greetings,
Michael

--
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin,
Margaret Seif

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

* [PATCH] input: adp5589: Fix row 5 handling for adp5589
@ 2016-02-09 10:29 Lars-Peter Clausen
  2016-02-09 10:24 ` Michael Hennerich
  0 siblings, 1 reply; 3+ messages in thread
From: Lars-Peter Clausen @ 2016-02-09 10:29 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Michael Hennerich, linux-input, Lars-Peter Clausen

The adp5589 has row 5, don't skip it when creating the GPIO mapping.
Otherwise the pin gets reserved as used and it is not possible to use it as
a GPIO.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/input/keyboard/adp5589-keys.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/input/keyboard/adp5589-keys.c b/drivers/input/keyboard/adp5589-keys.c
index 4d446d5..c01a1d6 100644
--- a/drivers/input/keyboard/adp5589-keys.c
+++ b/drivers/input/keyboard/adp5589-keys.c
@@ -235,7 +235,7 @@ struct adp5589_kpad {
 	unsigned short gpimapsize;
 	unsigned extend_cfg;
 	bool is_adp5585;
-	bool adp5585_support_row5;
+	bool support_row5;
 #ifdef CONFIG_GPIOLIB
 	unsigned char gpiomap[ADP5589_MAXGPIO];
 	bool export_gpio;
@@ -485,7 +485,7 @@ static int adp5589_build_gpiomap(struct adp5589_kpad *kpad,
 	if (kpad->extend_cfg & C4_EXTEND_CFG)
 		pin_used[kpad->var->c4_extend_cfg] = true;
 
-	if (!kpad->adp5585_support_row5)
+	if (!kpad->support_row5)
 		pin_used[5] = true;
 
 	for (i = 0; i < kpad->var->maxgpio; i++)
@@ -884,12 +884,13 @@ static int adp5589_probe(struct i2c_client *client,
 
 	switch (id->driver_data) {
 	case ADP5585_02:
-		kpad->adp5585_support_row5 = true;
+		kpad->support_row5 = true;
 	case ADP5585_01:
 		kpad->is_adp5585 = true;
 		kpad->var = &const_adp5585;
 		break;
 	case ADP5589:
+		kpad->support_row5 = true;
 		kpad->var = &const_adp5589;
 		break;
 	}
-- 
2.1.4


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

* Re: [PATCH] input: adp5589: Fix row 5 handling for adp5589
  2016-02-09 10:24 ` Michael Hennerich
@ 2016-02-09 17:36   ` Dmitry Torokhov
  0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2016-02-09 17:36 UTC (permalink / raw)
  To: Michael Hennerich; +Cc: Lars-Peter Clausen, linux-input

On Tue, Feb 09, 2016 at 11:24:42AM +0100, Michael Hennerich wrote:
> On 02/09/2016 11:29 AM, Lars-Peter Clausen wrote:
> >The adp5589 has row 5, don't skip it when creating the GPIO mapping.
> >Otherwise the pin gets reserved as used and it is not possible to use it as
> >a GPIO.
> >
> >Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> 
> Acked-by: Michael Hennerich <michael.hennerich@analog.com>

Applied, thank you.

> 
> >---
> >  drivers/input/keyboard/adp5589-keys.c | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> >
> >diff --git a/drivers/input/keyboard/adp5589-keys.c b/drivers/input/keyboard/adp5589-keys.c
> >index 4d446d5..c01a1d6 100644
> >--- a/drivers/input/keyboard/adp5589-keys.c
> >+++ b/drivers/input/keyboard/adp5589-keys.c
> >@@ -235,7 +235,7 @@ struct adp5589_kpad {
> >  	unsigned short gpimapsize;
> >  	unsigned extend_cfg;
> >  	bool is_adp5585;
> >-	bool adp5585_support_row5;
> >+	bool support_row5;
> >  #ifdef CONFIG_GPIOLIB
> >  	unsigned char gpiomap[ADP5589_MAXGPIO];
> >  	bool export_gpio;
> >@@ -485,7 +485,7 @@ static int adp5589_build_gpiomap(struct adp5589_kpad *kpad,
> >  	if (kpad->extend_cfg & C4_EXTEND_CFG)
> >  		pin_used[kpad->var->c4_extend_cfg] = true;
> >
> >-	if (!kpad->adp5585_support_row5)
> >+	if (!kpad->support_row5)
> >  		pin_used[5] = true;
> >
> >  	for (i = 0; i < kpad->var->maxgpio; i++)
> >@@ -884,12 +884,13 @@ static int adp5589_probe(struct i2c_client *client,
> >
> >  	switch (id->driver_data) {
> >  	case ADP5585_02:
> >-		kpad->adp5585_support_row5 = true;
> >+		kpad->support_row5 = true;
> >  	case ADP5585_01:
> >  		kpad->is_adp5585 = true;
> >  		kpad->var = &const_adp5585;
> >  		break;
> >  	case ADP5589:
> >+		kpad->support_row5 = true;
> >  		kpad->var = &const_adp5589;
> >  		break;
> >  	}
> >
> 
> 
> -- 
> Greetings,
> Michael
> 
> --
> Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
> Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
> Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin,
> Margaret Seif

-- 
Dmitry

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

end of thread, other threads:[~2016-02-09 17:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-09 10:29 [PATCH] input: adp5589: Fix row 5 handling for adp5589 Lars-Peter Clausen
2016-02-09 10:24 ` Michael Hennerich
2016-02-09 17:36   ` 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.