lkml.org 
[lkml]   [2015]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [alsa-devel] [PATCH 1/2] extcon: arizona: Add support for select accessory detect mode when headphone detection"
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


\
 
 \ /
  Last update: 2015-04-17 11:41    [W:1.022 / U:1.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site