linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ARM: davinci: fix the GPIO lookup for omapl138-hawk
@ 2018-03-01 10:34 Bartosz Golaszewski
  2018-03-09 10:18 ` Sekhar Nori
  2018-03-15 16:35 ` [v2] " David Lechner
  0 siblings, 2 replies; 4+ messages in thread
From: Bartosz Golaszewski @ 2018-03-01 10:34 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Russell King
  Cc: linux-arm-kernel, linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

The GPIO chip is called davinci_gpio.0 in legacy mode. Fix it, so that
mmc can correctly lookup the wp and cp gpios.

Fixes: c69f43fb4f26 ("ARM: davinci: hawk: use gpio descriptor for mmc pins")
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
v1 -> v2:
- added the Fixes: tag

 arch/arm/mach-davinci/board-omapl138-hawk.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c
index a3e78074be70..62eb7d668890 100644
--- a/arch/arm/mach-davinci/board-omapl138-hawk.c
+++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
@@ -127,8 +127,8 @@ static struct gpiod_lookup_table mmc_gpios_table = {
 	.dev_id = "da830-mmc.0",
 	.table = {
 		/* CD: gpio3_12: gpio60: chip 1 contains gpio range 32-63*/
-		GPIO_LOOKUP("davinci_gpio.1", 28, "cd", GPIO_ACTIVE_LOW),
-		GPIO_LOOKUP("davinci_gpio.1", 29, "wp", GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP("davinci_gpio.0", 28, "cd", GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP("davinci_gpio.0", 29, "wp", GPIO_ACTIVE_LOW),
 	},
 };
 
-- 
2.16.1

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

* Re: [PATCH v2] ARM: davinci: fix the GPIO lookup for omapl138-hawk
  2018-03-01 10:34 [PATCH v2] ARM: davinci: fix the GPIO lookup for omapl138-hawk Bartosz Golaszewski
@ 2018-03-09 10:18 ` Sekhar Nori
  2018-03-15 16:35 ` [v2] " David Lechner
  1 sibling, 0 replies; 4+ messages in thread
From: Sekhar Nori @ 2018-03-09 10:18 UTC (permalink / raw)
  To: Bartosz Golaszewski, Kevin Hilman, Russell King
  Cc: linux-arm-kernel, linux-kernel, Bartosz Golaszewski

On Thursday 01 March 2018 04:04 PM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> The GPIO chip is called davinci_gpio.0 in legacy mode. Fix it, so that
> mmc can correctly lookup the wp and cp gpios.
> 
> Fixes: c69f43fb4f26 ("ARM: davinci: hawk: use gpio descriptor for mmc pins")
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Applied for v4.16 with a note on the fact that the gpio-davinci
driver sets the chip label to davinci_gpio.0.

Thanks,
Sekhar

---8<---
ARM: davinci: fix the GPIO lookup for omapl138-hawk

The GPIO chip is called davinci_gpio.0 in legacy mode. Fix it, so that
mmc can correctly lookup the wp and cp gpios.

Note that it is the gpio-davinci driver that sets the gpiochip label to
davinci_gpio.0.

Fixes: c69f43fb4f26 ("ARM: davinci: hawk: use gpio descriptor for mmc pins")
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
[nsekhar@ti.com: add a note on where the chip label is set]
Signed-off-by: Sekhar Nori <nsekhar@ti.com>

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

* Re: [v2] ARM: davinci: fix the GPIO lookup for omapl138-hawk
  2018-03-01 10:34 [PATCH v2] ARM: davinci: fix the GPIO lookup for omapl138-hawk Bartosz Golaszewski
  2018-03-09 10:18 ` Sekhar Nori
@ 2018-03-15 16:35 ` David Lechner
  2018-03-16 15:05   ` Sekhar Nori
  1 sibling, 1 reply; 4+ messages in thread
From: David Lechner @ 2018-03-15 16:35 UTC (permalink / raw)
  To: Bartosz Golaszewski, Sekhar Nori, Kevin Hilman, Russell King
  Cc: Bartosz Golaszewski, linux-kernel, linux-arm-kernel

On 03/01/2018 04:34 AM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> The GPIO chip is called davinci_gpio.0 in legacy mode. Fix it, so that
> mmc can correctly lookup the wp and cp gpios.
> 
> Fixes: c69f43fb4f26 ("ARM: davinci: hawk: use gpio descriptor for mmc pins")
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
> ---
> v1 -> v2:
> - added the Fixes: tag
> 
>   arch/arm/mach-davinci/board-omapl138-hawk.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c
> index a3e78074be70..62eb7d668890 100644
> --- a/arch/arm/mach-davinci/board-omapl138-hawk.c
> +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
> @@ -127,8 +127,8 @@ static struct gpiod_lookup_table mmc_gpios_table = {
>   	.dev_id = "da830-mmc.0",
>   	.table = {
>   		/* CD: gpio3_12: gpio60: chip 1 contains gpio range 32-63*/
> -		GPIO_LOOKUP("davinci_gpio.1", 28, "cd", GPIO_ACTIVE_LOW),
> -		GPIO_LOOKUP("davinci_gpio.1", 29, "wp", GPIO_ACTIVE_LOW),
> +		GPIO_LOOKUP("davinci_gpio.0", 28, "cd", GPIO_ACTIVE_LOW),
> +		GPIO_LOOKUP("davinci_gpio.0", 29, "wp", GPIO_ACTIVE_LOW),
>   	},
>   };
>   
> 

Does board-da830-evm.c need the same fix? It also uses "davinci_gpio.1".

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

* Re: [v2] ARM: davinci: fix the GPIO lookup for omapl138-hawk
  2018-03-15 16:35 ` [v2] " David Lechner
@ 2018-03-16 15:05   ` Sekhar Nori
  0 siblings, 0 replies; 4+ messages in thread
From: Sekhar Nori @ 2018-03-16 15:05 UTC (permalink / raw)
  To: David Lechner, Bartosz Golaszewski, Kevin Hilman, Russell King
  Cc: Bartosz Golaszewski, linux-kernel, linux-arm-kernel

On Thursday 15 March 2018 10:05 PM, David Lechner wrote:
> On 03/01/2018 04:34 AM, Bartosz Golaszewski wrote:
>> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>>
>> The GPIO chip is called davinci_gpio.0 in legacy mode. Fix it, so that
>> mmc can correctly lookup the wp and cp gpios.
>>
>> Fixes: c69f43fb4f26 ("ARM: davinci: hawk: use gpio descriptor for mmc
>> pins")
>> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
>> ---
>> v1 -> v2:
>> - added the Fixes: tag
>>
>>   arch/arm/mach-davinci/board-omapl138-hawk.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c
>> b/arch/arm/mach-davinci/board-omapl138-hawk.c
>> index a3e78074be70..62eb7d668890 100644
>> --- a/arch/arm/mach-davinci/board-omapl138-hawk.c
>> +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
>> @@ -127,8 +127,8 @@ static struct gpiod_lookup_table mmc_gpios_table = {
>>       .dev_id = "da830-mmc.0",
>>       .table = {
>>           /* CD: gpio3_12: gpio60: chip 1 contains gpio range 32-63*/
>> -        GPIO_LOOKUP("davinci_gpio.1", 28, "cd", GPIO_ACTIVE_LOW),
>> -        GPIO_LOOKUP("davinci_gpio.1", 29, "wp", GPIO_ACTIVE_LOW),
>> +        GPIO_LOOKUP("davinci_gpio.0", 28, "cd", GPIO_ACTIVE_LOW),
>> +        GPIO_LOOKUP("davinci_gpio.0", 29, "wp", GPIO_ACTIVE_LOW),
>>       },
>>   };
>>  
> 
> Does board-da830-evm.c need the same fix? It also uses "davinci_gpio.1".

Yes. looks like fixes are needed here and other places. I will send
patches since I have ability to test them.

Thanks,
Sekhar

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

end of thread, other threads:[~2018-03-16 15:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-01 10:34 [PATCH v2] ARM: davinci: fix the GPIO lookup for omapl138-hawk Bartosz Golaszewski
2018-03-09 10:18 ` Sekhar Nori
2018-03-15 16:35 ` [v2] " David Lechner
2018-03-16 15:05   ` Sekhar Nori

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).