On Fri, Apr 17, 2015 at 05:32:58PM +0900, Inha Song wrote:
This patch add support for select accessory detect mode to HPDETL or HPDETR. Arizona provides a headphone detection circuit on the HPDETL and HPDETR pins to measure the impedance of an external load connected to the headphone.
Depending on board design, headphone detect pins can change to HPDETR or HPDETL.
Signed-off-by: Inha Song ideal.song@samsung.com
drivers/extcon/extcon-arizona.c | 34 ++++++++++++++++++++++++++++++---- include/linux/mfd/arizona/pdata.h | 3 +++ 2 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index 63f01c4..7bc9159 100644 --- a/drivers/extcon/extcon-arizona.c
+#ifdef CONFIG_OF +static int arizona_of_get_extcon_pdata(struct arizona *arizona) +{
- struct arizona_pdata *pdata = &arizona->pdata;
- of_property_read_u32(arizona->dev->of_node, "wlf,hpdet-channel",
&pdata->hpdet_channel);
- return 0;
+} +#else +static inline int arizona_of_get_extcon_pdata(struct arizona *arizona) +{
- return 0;
+} +#endif
Oh and one other comment can we rename this functions to arizona_extcon_of_get_pdata.
Thanks, Charles