From 30b45a04e09cb1b00ecbc1607c2eda01f95f5e7d Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Fri, 2 Dec 2011 15:08:37 -0700 Subject: [PATCH] --- yaml --- r: 283887 b: refs/heads/master c: a0f203d384fadacba514748cd0095efeadeed96c h: refs/heads/master i: 283885: 78d5cc42414038812c2c0dff85584704de490497 283883: 94dbcf1da6f52b658152da9070a698a17cb92140 283879: 509f896faf5c49ea9c9f52efc01b6f1164c2d744 283871: c6580a3794a4e16a9bbe53e5d6488dd05fb0cc53 v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-tegra/board-harmony.c | 8 ++++---- trunk/arch/arm/mach-tegra/board-seaboard.c | 8 ++++---- trunk/include/sound/wm8903.h | 7 +++++-- trunk/sound/soc/codecs/wm8903.c | 3 ++- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index b3f07a892f61..11c86c8c781e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 102477b6380978b1532e5d1f769155026a332aff +refs/heads/master: a0f203d384fadacba514748cd0095efeadeed96c diff --git a/trunk/arch/arm/mach-tegra/board-harmony.c b/trunk/arch/arm/mach-tegra/board-harmony.c index f0bdc5e3fe52..3c57cdcdff4d 100644 --- a/trunk/arch/arm/mach-tegra/board-harmony.c +++ b/trunk/arch/arm/mach-tegra/board-harmony.c @@ -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, }, }; diff --git a/trunk/arch/arm/mach-tegra/board-seaboard.c b/trunk/arch/arm/mach-tegra/board-seaboard.c index bf13ea355efc..5c2f7751a33a 100644 --- a/trunk/arch/arm/mach-tegra/board-seaboard.c +++ b/trunk/arch/arm/mach-tegra/board-seaboard.c @@ -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, }, }; diff --git a/trunk/include/sound/wm8903.h b/trunk/include/sound/wm8903.h index cf7ccb76a8de..b310c5a3a958 100644 --- a/trunk/include/sound/wm8903.h +++ b/trunk/include/sound/wm8903.h @@ -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 diff --git a/trunk/sound/soc/codecs/wm8903.c b/trunk/sound/soc/codecs/wm8903.c index e6ecede576dc..184b67730c39 100644 --- a/trunk/sound/soc/codecs/wm8903.c +++ b/trunk/sound/soc/codecs/wm8903.c @@ -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,