extcon: arizona: Add device binding for second jack detect pin on GPIO5
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Thu, 19 Nov 2015 15:45:38 +0000 (15:45 +0000)
committerChanwoo Choi <cw00.choi@samsung.com>
Fri, 20 Nov 2015 01:14:23 +0000 (10:14 +0900)
Some Arizona devices have the option to use the GPIO5 pin as a second
jack detection pin. This patch adds device bindings to specify to the
driver that it should use this pin. Note that the second jack detection
pin is hard wired in the chip so can only be enabled through the
binding, rather than a pin being specified.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/extcon/extcon-arizona.c

index 27ddf9cccca51d2bcdf57c0dba956375652ffaaa..7c9598db318dc732b387747d10fc0ba689c13b3e 100644 (file)
@@ -1244,6 +1244,11 @@ static int arizona_extcon_device_get_pdata(struct arizona *arizona)
 
        device_property_read_u32(arizona->dev, "wlf,gpsw", &pdata->gpsw);
 
+       pdata->jd_gpio5 = device_property_read_bool(arizona->dev,
+                                                   "wlf,use-jd-gpio");
+       pdata->jd_gpio5_nopull = device_property_read_bool(arizona->dev,
+                                               "wlf,use-jd-gpio-nopull");
+
        return 0;
 }