devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Charles Keepax
	<ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	patches-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org,
	robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Subject: Re: [PATCH v2 1/2] mfd: arizona: Add device tree binding to specify mono outputs
Date: Mon, 11 Jan 2016 07:31:52 +0000	[thread overview]
Message-ID: <20160111073152.GY3331@x1> (raw)
In-Reply-To: <1450088352-10470-1-git-send-email-ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>

On Mon, 14 Dec 2015, Charles Keepax wrote:

> Add device tree bindings to support specifying outputs from the chip as
> mono outputs. Whilst we are doing it change the out_mono pdata from a
> bool to an int, because Sparse gets upset about using ARRAY_SIZE on
> bools.
> 
> Signed-off-by: Charles Keepax <ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
> ---
> 
> No changes since v1.
> 
> Thanks,
> Charles
> 
>  drivers/mfd/arizona-core.c        | 10 ++++++++++
>  include/linux/mfd/arizona/pdata.h |  2 +-
>  2 files changed, 11 insertions(+), 1 deletion(-)

Applied, thanks.

> diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
> index b9489a0..4bb4866 100644
> --- a/drivers/mfd/arizona-core.c
> +++ b/drivers/mfd/arizona-core.c
> @@ -861,6 +861,16 @@ static int arizona_of_get_core_pdata(struct arizona *arizona)
>  		count++;
>  	}
>  
> +	count = 0;
> +	of_property_for_each_u32(arizona->dev->of_node, "wlf,out-mono", prop,
> +				 cur, val) {
> +		if (count == ARRAY_SIZE(pdata->out_mono))
> +			break;
> +
> +		pdata->out_mono[count] = !!val;
> +		count++;
> +	}
> +
>  	return 0;
>  }
>  
> diff --git a/include/linux/mfd/arizona/pdata.h b/include/linux/mfd/arizona/pdata.h
> index 57b45ca..64faeef 100644
> --- a/include/linux/mfd/arizona/pdata.h
> +++ b/include/linux/mfd/arizona/pdata.h
> @@ -171,7 +171,7 @@ struct arizona_pdata {
>  	int inmode[ARIZONA_MAX_INPUT];
>  
>  	/** Mode for outputs */
> -	bool out_mono[ARIZONA_MAX_OUTPUT];
> +	int out_mono[ARIZONA_MAX_OUTPUT];
>  
>  	/** PDM speaker mute setting */
>  	unsigned int spk_mute[ARIZONA_MAX_PDM_SPK];

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2016-01-11  7:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-14 10:19 [PATCH v2 1/2] mfd: arizona: Add device tree binding to specify mono outputs Charles Keepax
     [not found] ` <1450088352-10470-1-git-send-email-ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2015-12-14 10:19   ` [PATCH v2 2/2] mfd: arizona: Update binding docs for selecting mono/stereo outputs Charles Keepax
2015-12-20  3:39     ` Rob Herring
2016-01-11  7:32     ` Lee Jones
2016-01-11  7:31   ` Lee Jones [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160111073152.GY3331@x1 \
    --to=lee.jones-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
    --cc=ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=patches-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org \
    --cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).