mmc: core: expose the capability of gpio card detect
Add new helper API mmc_can_gpio_cd for slot-gpio to make host drivers know whether it supports gpio card detect. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
@@ -258,6 +258,14 @@ int mmc_gpiod_request_cd(struct mmc_host *host, const char *con_id,
|
||||
}
|
||||
EXPORT_SYMBOL(mmc_gpiod_request_cd);
|
||||
|
||||
bool mmc_can_gpio_cd(struct mmc_host *host)
|
||||
{
|
||||
struct mmc_gpio *ctx = host->slot.handler_priv;
|
||||
|
||||
return ctx->cd_gpio ? true : false;
|
||||
}
|
||||
EXPORT_SYMBOL(mmc_can_gpio_cd);
|
||||
|
||||
/**
|
||||
* mmc_gpiod_request_ro - request a gpio descriptor for write protection
|
||||
* @host: mmc host
|
||||
|
Reference in New Issue
Block a user