alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: Accept any logical value WM8903 GPIO set()
@ 2011-01-31 13:42 Mark Brown
  2011-01-31 13:54 ` Liam Girdwood
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2011-01-31 13:42 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel, patches, swarren, Mark Brown

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/wm8903.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index 54383c3..27cd8f5 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -1904,7 +1904,8 @@ static void wm8903_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
 	struct snd_soc_codec *codec = wm8903->codec;
 
 	snd_soc_update_bits(codec, WM8903_GPIO_CONTROL_1 + offset,
-			    WM8903_GP1_LVL_MASK, value << WM8903_GP1_LVL_SHIFT);
+			    WM8903_GP1_LVL_MASK,
+			    !!value << WM8903_GP1_LVL_SHIFT);
 }
 
 static struct gpio_chip wm8903_template_chip = {
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: Accept any logical value WM8903 GPIO set()
  2011-01-31 13:42 [PATCH] ASoC: Accept any logical value WM8903 GPIO set() Mark Brown
@ 2011-01-31 13:54 ` Liam Girdwood
  0 siblings, 0 replies; 2+ messages in thread
From: Liam Girdwood @ 2011-01-31 13:54 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, patches, swarren

On Mon, 2011-01-31 at 13:42 +0000, Mark Brown wrote:
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>  sound/soc/codecs/wm8903.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
> index 54383c3..27cd8f5 100644
> --- a/sound/soc/codecs/wm8903.c
> +++ b/sound/soc/codecs/wm8903.c
> @@ -1904,7 +1904,8 @@ static void wm8903_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
>  	struct snd_soc_codec *codec = wm8903->codec;
>  
>  	snd_soc_update_bits(codec, WM8903_GPIO_CONTROL_1 + offset,
> -			    WM8903_GP1_LVL_MASK, value << WM8903_GP1_LVL_SHIFT);
> +			    WM8903_GP1_LVL_MASK,
> +			    !!value << WM8903_GP1_LVL_SHIFT);
>  }
>  
>  static struct gpio_chip wm8903_template_chip = {

Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-31 13:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-31 13:42 [PATCH] ASoC: Accept any logical value WM8903 GPIO set() Mark Brown
2011-01-31 13:54 ` Liam Girdwood

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).