summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/slot-gpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/core/slot-gpio.c')
-rw-r--r--drivers/mmc/core/slot-gpio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/core/slot-gpio.c b/drivers/mmc/core/slot-gpio.c
index da2596c5fa28..582ec3d720f6 100644
--- a/drivers/mmc/core/slot-gpio.c
+++ b/drivers/mmc/core/slot-gpio.c
@@ -241,6 +241,9 @@ int mmc_gpiod_request_ro(struct mmc_host *host, const char *con_id,
return ret;
}
+ if (host->caps2 & MMC_CAP2_RO_ACTIVE_HIGH)
+ gpiod_toggle_active_low(desc);
+
if (gpio_invert)
*gpio_invert = !gpiod_is_active_low(desc);