Skip to content

Commit 894ad61

Browse files
aakoskintmlind
authored andcommitted
mmc: omap: restore original power up/down steps
Commit e519f0b ("ARM/mmc: Convert old mmci-omap to GPIO descriptors") moved Nokia N810 MMC power up/down from the board file into the MMC driver. The change removed some delays, and ordering without a valid reason. Restore power up/down to match the original code. This matters only on N810 where the 2nd GPIO is in use. Other boards will see an additional delay but that should be a lesser concern than omitting delays altogether. 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 f6862c7 commit 894ad61

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

drivers/mmc/host/omap.c

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,10 +1119,25 @@ static void mmc_omap_set_power(struct mmc_omap_slot *slot, int power_on,
11191119

11201120
host = slot->host;
11211121

1122-
if (slot->vsd)
1123-
gpiod_set_value(slot->vsd, power_on);
1124-
if (slot->vio)
1125-
gpiod_set_value(slot->vio, power_on);
1122+
if (power_on) {
1123+
if (slot->vsd) {
1124+
gpiod_set_value(slot->vsd, power_on);
1125+
msleep(1);
1126+
}
1127+
if (slot->vio) {
1128+
gpiod_set_value(slot->vio, power_on);
1129+
msleep(1);
1130+
}
1131+
} else {
1132+
if (slot->vio) {
1133+
gpiod_set_value(slot->vio, power_on);
1134+
msleep(50);
1135+
}
1136+
if (slot->vsd) {
1137+
gpiod_set_value(slot->vsd, power_on);
1138+
msleep(50);
1139+
}
1140+
}
11261141

11271142
if (slot->pdata->set_power != NULL)
11281143
slot->pdata->set_power(mmc_dev(slot->mmc), slot->id, power_on,

0 commit comments

Comments
 (0)