1
2
3
4
5
6
7
8
9
10
11#ifndef MMC_SLOT_GPIO_H
12#define MMC_SLOT_GPIO_H
13
14#include <linux/types.h>
15#include <linux/irqreturn.h>
16
17struct mmc_host;
18
19int mmc_gpio_get_ro(struct mmc_host *host);
20int mmc_gpio_get_cd(struct mmc_host *host);
21int mmc_gpiod_request_cd(struct mmc_host *host, const char *con_id,
22 unsigned int idx, bool override_active_level,
23 unsigned int debounce, bool *gpio_invert);
24int mmc_gpiod_request_ro(struct mmc_host *host, const char *con_id,
25 unsigned int idx,
26 unsigned int debounce, bool *gpio_invert);
27void mmc_gpio_set_cd_isr(struct mmc_host *host,
28 irqreturn_t (*isr)(int irq, void *dev_id));
29int mmc_gpio_set_cd_wake(struct mmc_host *host, bool on);
30void mmc_gpiod_request_cd_irq(struct mmc_host *host);
31bool mmc_can_gpio_cd(struct mmc_host *host);
32bool mmc_can_gpio_ro(struct mmc_host *host);
33
34#endif
35