Commit 38ffd4d5 authored by Sekhar Nori's avatar Sekhar Nori Committed by Greg Kroah-Hartman

ARM: davinci: board-da830-evm: fix GPIO lookup for MMC/SD

[ Upstream commit 51e9f121 ]

The GPIO chip is called davinci_gpio.0 in legacy mode. Fix it, so that
mmc can correctly lookup the wp and cp gpios. Also fix the GPIO numbers
as they are not offsets within a bank.

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

Fixes: b5e1438c ("ARM: davinci: da830-evm: use gpio descriptor for mmc pins")
Reported-by: default avatarDavid Lechner <david@lechnology.com>
Reviewed-by: default avatarDavid Lechner <david@lechnology.com>
Signed-off-by: default avatarSekhar Nori <nsekhar@ti.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 13e4a208
...@@ -205,12 +205,17 @@ static const short da830_evm_mmc_sd_pins[] = { ...@@ -205,12 +205,17 @@ static const short da830_evm_mmc_sd_pins[] = {
-1 -1
}; };
#define DA830_MMCSD_WP_PIN GPIO_TO_PIN(2, 1)
#define DA830_MMCSD_CD_PIN GPIO_TO_PIN(2, 2)
static struct gpiod_lookup_table mmc_gpios_table = { static struct gpiod_lookup_table mmc_gpios_table = {
.dev_id = "da830-mmc.0", .dev_id = "da830-mmc.0",
.table = { .table = {
/* gpio chip 1 contains gpio range 32-63 */ /* gpio chip 1 contains gpio range 32-63 */
GPIO_LOOKUP("davinci_gpio.1", 2, "cd", GPIO_ACTIVE_LOW), GPIO_LOOKUP("davinci_gpio.0", DA830_MMCSD_CD_PIN, "cd",
GPIO_LOOKUP("davinci_gpio.1", 1, "wp", GPIO_ACTIVE_LOW), GPIO_ACTIVE_LOW),
GPIO_LOOKUP("davinci_gpio.0", DA830_MMCSD_WP_PIN, "wp",
GPIO_ACTIVE_LOW),
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment