diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2016-08-31 12:28:19 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2016-09-22 10:39:04 +0200 |
commit | 5805271d908aa34912265dba41bcb902588e0ff7 (patch) | |
tree | cced6f63d6a0230178ab8d9a849c32c3205f8aac /drivers/pcmcia/soc_common.c | |
parent | pcmcia: soc_common: constify pcmcia_low_level ops pointer (diff) | |
download | linux-5805271d908aa34912265dba41bcb902588e0ff7.tar.xz linux-5805271d908aa34912265dba41bcb902588e0ff7.zip |
pcmcia: soc_common: add support for voltage sense GPIOs
Add support for the voltage sense GPIOs which are wired up on some
platforms.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'drivers/pcmcia/soc_common.c')
-rw-r--r-- | drivers/pcmcia/soc_common.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c index 3eb30916be26..153f3122283d 100644 --- a/drivers/pcmcia/soc_common.c +++ b/drivers/pcmcia/soc_common.c @@ -218,7 +218,7 @@ static int soc_pcmcia_hw_init(struct soc_pcmcia_socket *skt) skt->stat[i].desc = gpio_to_desc(skt->stat[i].gpio); } - if (skt->stat[i].desc) { + if (i < SOC_STAT_VS1 && skt->stat[i].desc) { int irq = gpiod_to_irq(skt->stat[i].desc); if (irq > 0) { @@ -295,6 +295,10 @@ static unsigned int soc_common_pcmcia_skt_state(struct soc_pcmcia_socket *skt) state.bvd1 = !!gpiod_get_value(skt->stat[SOC_STAT_BVD1].desc); if (skt->stat[SOC_STAT_BVD2].desc) state.bvd2 = !!gpiod_get_value(skt->stat[SOC_STAT_BVD2].desc); + if (skt->stat[SOC_STAT_VS1].desc) + state.vs_3v = !!gpiod_get_value(skt->stat[SOC_STAT_VS1].desc); + if (skt->stat[SOC_STAT_VS2].desc) + state.vs_Xv = !!gpiod_get_value(skt->stat[SOC_STAT_VS2].desc); skt->ops->socket_state(skt, &state); |