diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-02-28 16:32:44 -0500 |
---|---|---|
committer | Chris Ball <chris@printf.net> | 2014-03-04 16:28:44 -0500 |
commit | 42c1add97073b5a701b8aee0fdb69ef0345d4c50 (patch) | |
tree | b257aeb01427f9398c46e7b0af938e62b0a69506 | |
parent | 475d9e3ebf869cc637342b74af20632551769902 (diff) |
mmc: sdhci-spear: remove support for power gpio
None of this code is currently used: there are no definitions of
struct sdhci_plat_data in arch/arm, neither are there any DT properties
which use card_power_gpio/power_active_high/power_always_enb. In any
case, slot power control should be rigged up via vmmc and the regulator
subsystem in the DT case.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Chris Ball <chris@printf.net>
-rw-r--r-- | drivers/mmc/host/sdhci-spear.c | 32 | ||||
-rw-r--r-- | include/linux/mmc/sdhci-spear.h | 8 |
2 files changed, 0 insertions, 40 deletions
diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c index fc6eac5b1064..676df4623057 100644 --- a/drivers/mmc/host/sdhci-spear.c +++ b/drivers/mmc/host/sdhci-spear.c | |||
@@ -56,14 +56,6 @@ static irqreturn_t sdhci_gpio_irq(int irq, void *dev_id) | |||
56 | gpio_irq_type = val ? IRQF_TRIGGER_LOW : IRQF_TRIGGER_HIGH; | 56 | gpio_irq_type = val ? IRQF_TRIGGER_LOW : IRQF_TRIGGER_HIGH; |
57 | irq_set_irq_type(irq, gpio_irq_type); | 57 | irq_set_irq_type(irq, gpio_irq_type); |
58 | 58 | ||
59 | if (sdhci->data->card_power_gpio >= 0) { | ||
60 | if (!sdhci->data->power_always_enb) { | ||
61 | /* if card inserted, give power, otherwise remove it */ | ||
62 | val = sdhci->data->power_active_high ? !val : val ; | ||
63 | gpio_set_value(sdhci->data->card_power_gpio, val); | ||
64 | } | ||
65 | } | ||
66 | |||
67 | /* inform sdhci driver about card insertion/removal */ | 59 | /* inform sdhci driver about card insertion/removal */ |
68 | tasklet_schedule(&host->card_tasklet); | 60 | tasklet_schedule(&host->card_tasklet); |
69 | 61 | ||
@@ -179,30 +171,6 @@ static int sdhci_probe(struct platform_device *pdev) | |||
179 | if (!sdhci->data) | 171 | if (!sdhci->data) |
180 | return 0; | 172 | return 0; |
181 | 173 | ||
182 | if (sdhci->data->card_power_gpio >= 0) { | ||
183 | int val = 0; | ||
184 | |||
185 | ret = devm_gpio_request(&pdev->dev, | ||
186 | sdhci->data->card_power_gpio, "sdhci"); | ||
187 | if (ret < 0) { | ||
188 | dev_dbg(&pdev->dev, "gpio request fail: %d\n", | ||
189 | sdhci->data->card_power_gpio); | ||
190 | goto set_drvdata; | ||
191 | } | ||
192 | |||
193 | if (sdhci->data->power_always_enb) | ||
194 | val = sdhci->data->power_active_high; | ||
195 | else | ||
196 | val = !sdhci->data->power_active_high; | ||
197 | |||
198 | ret = gpio_direction_output(sdhci->data->card_power_gpio, val); | ||
199 | if (ret) { | ||
200 | dev_dbg(&pdev->dev, "gpio set direction fail: %d\n", | ||
201 | sdhci->data->card_power_gpio); | ||
202 | goto set_drvdata; | ||
203 | } | ||
204 | } | ||
205 | |||
206 | if (sdhci->data->card_int_gpio >= 0) { | 174 | if (sdhci->data->card_int_gpio >= 0) { |
207 | ret = devm_gpio_request(&pdev->dev, sdhci->data->card_int_gpio, | 175 | ret = devm_gpio_request(&pdev->dev, sdhci->data->card_int_gpio, |
208 | "sdhci"); | 176 | "sdhci"); |
diff --git a/include/linux/mmc/sdhci-spear.h b/include/linux/mmc/sdhci-spear.h index e78c0e236e9d..8cc095a76cf8 100644 --- a/include/linux/mmc/sdhci-spear.h +++ b/include/linux/mmc/sdhci-spear.h | |||
@@ -18,17 +18,9 @@ | |||
18 | /* | 18 | /* |
19 | * struct sdhci_plat_data: spear sdhci platform data structure | 19 | * struct sdhci_plat_data: spear sdhci platform data structure |
20 | * | 20 | * |
21 | * @card_power_gpio: gpio pin for enabling/disabling power to sdhci socket | ||
22 | * @power_active_high: if set, enable power to sdhci socket by setting | ||
23 | * card_power_gpio | ||
24 | * @power_always_enb: If set, then enable power on probe, otherwise enable only | ||
25 | * on card insertion and disable on card removal. | ||
26 | * card_int_gpio: gpio pin used for card detection | 21 | * card_int_gpio: gpio pin used for card detection |
27 | */ | 22 | */ |
28 | struct sdhci_plat_data { | 23 | struct sdhci_plat_data { |
29 | int card_power_gpio; | ||
30 | int power_active_high; | ||
31 | int power_always_enb; | ||
32 | int card_int_gpio; | 24 | int card_int_gpio; |
33 | }; | 25 | }; |
34 | 26 | ||