Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283887
b: refs/heads/master
c: a0f203d
h: refs/heads/master
i:
  283885: 78d5cc4
  283883: 94dbcf1
  283879: 509f896
  283871: c6580a3
v: v3
  • Loading branch information
Stephen Warren authored and Mark Brown committed Dec 6, 2011
1 parent 847cf46 commit 30b45a0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 102477b6380978b1532e5d1f769155026a332aff
refs/heads/master: a0f203d384fadacba514748cd0095efeadeed96c
8 changes: 4 additions & 4 deletions trunk/arch/arm/mach-tegra/board-harmony.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ static struct wm8903_platform_data harmony_wm8903_pdata = {
.micdet_delay = 100,
.gpio_base = HARMONY_GPIO_WM8903(0),
.gpio_cfg = {
WM8903_GPIO_NO_CONFIG,
WM8903_GPIO_NO_CONFIG,
0,
WM8903_GPIO_NO_CONFIG,
WM8903_GPIO_NO_CONFIG,
0,
WM8903_GPIO_CONFIG_ZERO,
0,
0,
},
};

Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/arm/mach-tegra/board-seaboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ static struct wm8903_platform_data wm8903_pdata = {
.micdet_delay = 100,
.gpio_base = SEABOARD_GPIO_WM8903(0),
.gpio_cfg = {
WM8903_GPIO_NO_CONFIG,
WM8903_GPIO_NO_CONFIG,
0,
WM8903_GPIO_NO_CONFIG,
WM8903_GPIO_NO_CONFIG,
0,
WM8903_GPIO_CONFIG_ZERO,
0,
0,
},
};

Expand Down
7 changes: 5 additions & 2 deletions trunk/include/sound/wm8903.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@
#ifndef __LINUX_SND_WM8903_H
#define __LINUX_SND_WM8903_H

/* Used to enable configuration of a GPIO to all zeros */
#define WM8903_GPIO_NO_CONFIG 0x8000
/*
* Used to enable configuration of a GPIO to all zeros; a gpio_cfg value of
* zero in platform data means "don't touch this pin".
*/
#define WM8903_GPIO_CONFIG_ZERO 0x8000

/*
* R6 (0x06) - Mic Bias Control 0
Expand Down
3 changes: 2 additions & 1 deletion trunk/sound/soc/codecs/wm8903.c
Original file line number Diff line number Diff line change
Expand Up @@ -1893,7 +1893,8 @@ static int wm8903_probe(struct snd_soc_codec *codec)
bool mic_gpio = false;

for (i = 0; i < ARRAY_SIZE(pdata->gpio_cfg); i++) {
if (pdata->gpio_cfg[i] > 0x7fff)
if ((!pdata->gpio_cfg[i]) ||
(pdata->gpio_cfg[i] > WM8903_GPIO_CONFIG_ZERO))
continue;

snd_soc_write(codec, WM8903_GPIO_CONTROL_1 + i,
Expand Down

0 comments on commit 30b45a0

Please sign in to comment.