Skip to content

Commit 480d44d

Browse files
aakoskintmlind
authored andcommitted
ARM: OMAP2+: fix N810 MMC gpiod table
Trying to append a second table for the same dev_id doesn't seem to work. The second table is just silently ignored. As a result eMMC GPIOs are not present. Fix by using separate tables for N800 and N810. Fixes: e519f0b ("ARM/mmc: Convert old mmci-omap to GPIO descriptors") Signed-off-by: Aaro Koskinen <[email protected]> Message-ID: <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Acked-by: Ulf Hansson <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
1 parent 95f37eb commit 480d44d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

arch/arm/mach-omap2/board-n8x0.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static int slot1_cover_open;
140140
static int slot2_cover_open;
141141
static struct device *mmc_device;
142142

143-
static struct gpiod_lookup_table nokia8xx_mmc_gpio_table = {
143+
static struct gpiod_lookup_table nokia800_mmc_gpio_table = {
144144
.dev_id = "mmci-omap.0",
145145
.table = {
146146
/* Slot switch, GPIO 96 */
@@ -152,6 +152,8 @@ static struct gpiod_lookup_table nokia8xx_mmc_gpio_table = {
152152
static struct gpiod_lookup_table nokia810_mmc_gpio_table = {
153153
.dev_id = "mmci-omap.0",
154154
.table = {
155+
/* Slot switch, GPIO 96 */
156+
GPIO_LOOKUP("gpio-96-127", 0, "switch", GPIO_ACTIVE_HIGH),
155157
/* Slot index 1, VSD power, GPIO 23 */
156158
GPIO_LOOKUP_IDX("gpio-0-31", 23, "vsd", 1, GPIO_ACTIVE_HIGH),
157159
/* Slot index 1, VIO power, GPIO 9 */
@@ -412,8 +414,6 @@ static struct omap_mmc_platform_data *mmc_data[OMAP24XX_NR_MMC];
412414

413415
static void __init n8x0_mmc_init(void)
414416
{
415-
gpiod_add_lookup_table(&nokia8xx_mmc_gpio_table);
416-
417417
if (board_is_n810()) {
418418
mmc1_data.slots[0].name = "external";
419419

@@ -426,6 +426,8 @@ static void __init n8x0_mmc_init(void)
426426
mmc1_data.slots[1].name = "internal";
427427
mmc1_data.slots[1].ban_openended = 1;
428428
gpiod_add_lookup_table(&nokia810_mmc_gpio_table);
429+
} else {
430+
gpiod_add_lookup_table(&nokia800_mmc_gpio_table);
429431
}
430432

431433
mmc1_data.nr_slots = 2;

0 commit comments

Comments
 (0)