devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
To: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: Mark Brown
	<broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>,
	Liam Girdwood <lrg-l0cyMroinI0@public.gmane.org>,
	Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
	John Bonesio <bones-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
Subject: Re: [PATCH v2 1/5] ASoC: WM8903: Fix platform data gpio_cfg confusion
Date: Wed, 7 Dec 2011 15:49:27 -0800	[thread overview]
Message-ID: <20111207234927.GA12676@quad.lixom.net> (raw)
In-Reply-To: <1322863721-29793-2-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

On Fri, Dec 02, 2011 at 03:08:37PM -0700, Stephen Warren wrote:
> wm8903_platform_data.gpio_cfg[] was intended to be interpreted as follows:
> 0:       Don't touch this GPIO's configuration register
> 1..7fff: Write that value to the GPIO's configuration register
> 8000:    Write zero to the GPIO's configuration register
> other:   Undefined (invalid)
> 
> The rationale is that platform data is usually global data, and a value of
> zero means that the field wasn't explicitly set to anything (e.g. because
> the field was new to the pdata type, and existing users weren't update to
> initialize it) and hence the value zero should be ignored. 0x8000 is an
> explicit way to get 0 in the register.
> 
> The code worked this way until commit 7cfe561 "ASoC: wm8903: Expose GPIOs
> through gpiolib", where the behaviour was changed due to my lack of
> awareness of the above rationale.
> 
> This patch reverts to the intended behaviour, and updates all in-tree users
> to use the correct scheme. This also makes WM8903 consistent with other
> devices that use a similar scheme.
> 
> WM8903_GPIO_NO_CONFIG is also renamed to WM8903_GPIO_CONFIG_ZERO so that
> its name accurately reflects its purpose.
> 
> Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> Cc: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
> Cc: Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
> ---
> Olof, Colin, could you please ack this so that Mark can apply it to the
> ASoC tree even though it touches Tegra code? Thanks.

Mark, since Stephen is a tegra maintainer, there's no real need to have an
explicit ack from one of the others, IMHO. But here you have it. :)

Acked-by: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>


-Olof

  parent reply	other threads:[~2011-12-07 23:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-02 22:08 [PATCH v2 0/5] ASoC: WM8903: DT bindings & related Stephen Warren
     [not found] ` <1322863721-29793-1-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-12-02 22:08   ` [PATCH v2 1/5] ASoC: WM8903: Fix platform data gpio_cfg confusion Stephen Warren
     [not found]     ` <1322863721-29793-2-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-12-06 10:29       ` Mark Brown
2011-12-07 23:49       ` Olof Johansson [this message]
     [not found]         ` <20111207234927.GA12676-O5ziIzlqnXUVNXGz7ipsyg@public.gmane.org>
2011-12-08  0:41           ` Mark Brown
2011-12-02 22:08   ` [PATCH v2 2/5] ASoC: WM8903: Create default platform data structure Stephen Warren
     [not found]     ` <1322863721-29793-3-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-12-03 11:19       ` Mark Brown
2011-12-02 22:08   ` [PATCH v2 3/5] ASoC: WM8903: Remove conditionals checking pdata != NULL Stephen Warren
2011-12-02 22:08   ` [PATCH v2 4/5] ASoC: WM8903: Get default irq_active_low from IRQ controller Stephen Warren
     [not found]     ` <1322863721-29793-5-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-12-03 11:17       ` Mark Brown
     [not found]         ` <20111203111713.GC6043-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2011-12-05 16:52           ` Stephen Warren
2011-12-02 22:08   ` [PATCH v2 5/5] ASoC: WM8903: Add device tree binding Stephen Warren
     [not found]     ` <1322863721-29793-6-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-12-06 18:22       ` Stephen Warren
     [not found]         ` <74CDBE0F657A3D45AFBB94109FB122FF1750B773EE-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-12-06 19:06           ` Rob Herring
     [not found]             ` <4EDE67D2.2020507-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-12-06 20:09               ` Stephen Warren
     [not found]                 ` <74CDBE0F657A3D45AFBB94109FB122FF1750B774C0-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-12-06 20:17                   ` Rob Herring
2011-12-07 12:33           ` Mark Brown

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=20111207234927.GA12676@quad.lixom.net \
    --to=olof-nzht3qvonbneowh0uzbu5w@public.gmane.org \
    --cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
    --cc=bones-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
    --cc=broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org \
    --cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lrg-l0cyMroinI0@public.gmane.org \
    --cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
    --cc=swarren-DDmLM1+adcrQT0dZR+AlfA@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).