Re: [alsa-devel] [PATCH 1/2] extcon: arizona: Add support for select accessory detect mode when headphone detection"

From: Charles Keepax
Date: Fri Apr 17 2015 - 05:30:45 EST


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@xxxxxxxxxxx>
> ---
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/