From a1d0500261e788f9b1d068e3167b2a77ad0abfc4 Mon Sep 17 00:00:00 2001 From: Russell King Date: Wed, 31 Aug 2016 08:49:46 +0100 Subject: 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 --- drivers/pcmcia/soc_common.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'drivers/pcmcia/soc_common.c') 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; -- cgit v1.2.3-59-g8ed1b