ARM: davinci: fix the GPIO lookup for omapl138-hawk
Subsystems (3)
PATCH 1/1 ARM: davinci: fix the GPIO lookup for omapl138-hawk
From: Bartosz Golaszewski <[email protected]>
The GPIO chip is called davinci_gpio.0 in legacy mode. Fix it, so that mmc can correctly lookup the wp and cp gpios.
--- arch/arm/mach-davinci/board-omapl138-hawk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-davinci/board-omapl138-hawk.c +2 -2
@@ -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), }, };
Signature · 1 line
2.16.1
Quoted 15 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
The GPIO chip is called davinci_gpio.0 in legacy mode. Fix it, so that mmc can correctly lookup the wp and cp gpios.
Signed-off-by Bartosz Golaszewski <[email protected]>--- arch/arm/mach-davinci/board-omapl138-hawk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm/mach-davinci/board-omapl138-hawk.c +0
-0
arch/arm/mach-davinci/board-omapl138-hawk.c static struct gpiod_lookup_table mmc_gpios_table = { · line 131
Quoted 7 lines
arch/arm/mach-davinci/board-omapl138-hawk.c +2
-2@@ -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),
Hmm, shouldn't this just be "davinci_gpio" since we use .id = -1 in da8xx_gpio_device?
Also:
Thanks,
Sekhar
2018-02-28 7:38 GMT+01:00 Sekhar Nori <[email protected]>:
Quoted 11 lines · Bartosz Golaszewski
Quoted 10 lines
From: Bartosz Golaszewski <[email protected]>
The GPIO chip is called davinci_gpio.0 in legacy mode. Fix it, so that mmc can correctly lookup the wp and cp gpios.
Signed-off-by Bartosz Golaszewski <[email protected]>--- arch/arm/mach-davinci/board-omapl138-hawk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 16 lines
arch/arm/mach-davinci/board-omapl138-hawk.c static struct gpiod_lookup_table mmc_gpios_table = { · line 131
Quoted 12 lines
arch/arm/mach-davinci/board-omapl138-hawk.c +2
-2@@ -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),Hmm, shouldn't this just be "
davinci_gpio" since we use .id = -1 inda8xx_gpio_device?
The gpio-davinci driver sets the gpiochip label to davinci_gpio.0 and gpiolib sets the device name to chip's label.
Quoted 6 lines
Also:
Fixes c69f43fb4f26 ("ARM: davinci: hawk: use gpio descriptor for mmc pins")Thanks,
Sekhar
Sending v2.
Thanks,
Bartosz