Guennadi Liakhovetski | 349ab52 | 2011-12-25 21:36:02 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Generic GPIO card-detect helper header |
| 3 | * |
| 4 | * Copyright (C) 2011, Guennadi Liakhovetski <g.liakhovetski@gmx.de> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. |
| 9 | */ |
| 10 | |
Guennadi Liakhovetski | fd0ea65 | 2012-04-30 23:31:57 +0200 | [diff] [blame] | 11 | #ifndef MMC_SLOT_GPIO_H |
| 12 | #define MMC_SLOT_GPIO_H |
Guennadi Liakhovetski | 349ab52 | 2011-12-25 21:36:02 +0100 | [diff] [blame] | 13 | |
| 14 | struct mmc_host; |
Guennadi Liakhovetski | befe404 | 2012-05-01 16:27:25 +0200 | [diff] [blame] | 15 | |
Guennadi Liakhovetski | 5aa7dad | 2012-05-01 16:59:38 +0200 | [diff] [blame] | 16 | int mmc_gpio_get_ro(struct mmc_host *host); |
| 17 | int mmc_gpio_request_ro(struct mmc_host *host, unsigned int gpio); |
Guennadi Liakhovetski | 5aa7dad | 2012-05-01 16:59:38 +0200 | [diff] [blame] | 18 | |
Guennadi Liakhovetski | befe404 | 2012-05-01 16:27:25 +0200 | [diff] [blame] | 19 | int mmc_gpio_get_cd(struct mmc_host *host); |
Laurent Pinchart | 214fc30 | 2013-08-08 12:38:31 +0200 | [diff] [blame] | 20 | int mmc_gpio_request_cd(struct mmc_host *host, unsigned int gpio, |
| 21 | unsigned int debounce); |
Guennadi Liakhovetski | 349ab52 | 2011-12-25 21:36:02 +0100 | [diff] [blame] | 22 | |
Adrian Hunter | 740a221 | 2014-03-10 15:02:41 +0200 | [diff] [blame] | 23 | int mmc_gpiod_request_cd(struct mmc_host *host, const char *con_id, |
| 24 | unsigned int idx, bool override_active_level, |
Linus Walleij | 89168b4 | 2014-10-02 09:08:46 +0200 | [diff] [blame] | 25 | unsigned int debounce, bool *gpio_invert); |
Linus Walleij | 9d2fa24 | 2014-08-27 13:00:51 +0200 | [diff] [blame] | 26 | int mmc_gpiod_request_ro(struct mmc_host *host, const char *con_id, |
| 27 | unsigned int idx, bool override_active_level, |
Linus Walleij | 89168b4 | 2014-10-02 09:08:46 +0200 | [diff] [blame] | 28 | unsigned int debounce, bool *gpio_invert); |
NeilBrown | c7ea834 | 2015-01-13 08:23:18 +1300 | [diff] [blame] | 29 | void mmc_gpio_set_cd_isr(struct mmc_host *host, |
| 30 | irqreturn_t (*isr)(int irq, void *dev_id)); |
Adrian Hunter | 740a221 | 2014-03-10 15:02:41 +0200 | [diff] [blame] | 31 | void mmc_gpiod_request_cd_irq(struct mmc_host *host); |
| 32 | |
Guennadi Liakhovetski | 349ab52 | 2011-12-25 21:36:02 +0100 | [diff] [blame] | 33 | #endif |