summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/soc_common.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2016-08-31 08:49:46 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2016-09-22 09:39:01 +0100
commita1d0500261e788f9b1d068e3167b2a77ad0abfc4 (patch)
treed9b98466428f41f3df211bf65cd414c690abada6 /drivers/pcmcia/soc_common.c
parent6ac95d821216f3baab16821a893d52ab385824be (diff)
downloadlinux-a1d0500261e788f9b1d068e3167b2a77ad0abfc4.tar.bz2
pcmcia: soc_common: add CF socket state helper
Add a helper to get the voltage state of CF sockets, where the voltage sense pins are not wired up. Switch assabet and cerf to use this helper. 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.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c
index 9373d997d0cf..6d0ec291f475 100644
--- a/drivers/pcmcia/soc_common.c
+++ b/drivers/pcmcia/soc_common.c
@@ -229,6 +229,18 @@ static void soc_pcmcia_hw_disable(struct soc_pcmcia_socket *skt)
irq_set_irq_type(skt->stat[i].irq, IRQ_TYPE_NONE);
}
+/*
+ * The CF 3.0 specification says that cards tie VS1 to ground and leave
+ * VS2 open. Many implementations do not wire up the VS signals, so we
+ * provide hard-coded values as per the CF 3.0 spec.
+ */
+void soc_common_cf_socket_state(struct soc_pcmcia_socket *skt,
+ struct pcmcia_state *state)
+{
+ state->vs_3v = 1;
+}
+EXPORT_SYMBOL_GPL(soc_common_cf_socket_state);
+
static unsigned int soc_common_pcmcia_skt_state(struct soc_pcmcia_socket *skt)
{
struct pcmcia_state state;