Skip to contentSkip to conversation

ASoC: Convert wm8731 to a new-style i2c driver (v2, testers wanted)

PATCH New Jean Delvare 1 participant 1 message Aug 27, 2008

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: Convert wm8731 to a new-style i2c driver (v2, testers wanted)

Convert the wm8731 codec driver to the new (standard) device driver binding model.

---
This second version fixes a bug reported by Manuel Lauss where codec->control_data was used before being initialized.

Warning: this assumes that the corgi, poodle and eti_b1 have their codec chips on I2C bus 0, which may or may not be the case. Someone with these machines please test and report.

 include/linux/i2c-id.h         |    1 
 sound/soc/at91/eti_b1_wm8731.c |    1 
 sound/soc/codecs/wm8731.c      |  108 +++++++++++++++++++---------------------
 sound/soc/codecs/wm8731.h      |    1 
 sound/soc/pxa/corgi.c          |    1 
 sound/soc/pxa/poodle.c         |    1 
 6 files changed, 57 insertions(+), 56 deletions(-)
include/linux/i2c-id.h +0 -1
@@ -64,7 +64,6 @@
 #define I2C_DRIVERID_SAA717X	80	/* saa717x video encoder	*/
 #define I2C_DRIVERID_DS1672	81	/* Dallas/Maxim DS1672 RTC	*/
 #define I2C_DRIVERID_TLV320AIC23B 87	/* TI TLV320AIC23B audio codec  */
-#define I2C_DRIVERID_WM8731	89	/* Wolfson WM8731 audio codec */
 #define I2C_DRIVERID_WM8753	91	/* Wolfson WM8753 audio codec */
 #define I2C_DRIVERID_LM4857 	92 	/* LM4857 Audio Amplifier */
 #define I2C_DRIVERID_VP27SMPX	93	/* Panasonic VP27s tuner internal MPX */
sound/soc/at91/eti_b1_wm8731.c +1 -0
@@ -243,6 +243,7 @@ static struct snd_soc_machine snd_soc_ma
 };
 
 static struct wm8731_setup_data eti_b1_wm8731_setup = {
+	.i2c_bus = 0,
 	.i2c_address = 0x1a,
 };
 
sound/soc/codecs/wm8731.c +53 -55

156 lines not on this page · raw message

sound/soc/codecs/wm8731.h +1 -0
@@ -35,6 +35,7 @@
 #define WM8731_DAI		0
 
 struct wm8731_setup_data {
+	int            i2c_bus;
 	unsigned short i2c_address;
 };
 
sound/soc/pxa/corgi.c +1 -0
@@ -330,6 +330,7 @@ static struct snd_soc_machine snd_soc_ma
 
 /* corgi audio private data */
 static struct wm8731_setup_data corgi_wm8731_setup = {
+	.i2c_bus = 0,
 	.i2c_address = 0x1b,
 };
 
sound/soc/pxa/poodle.c +1 -0
@@ -284,6 +284,7 @@ static struct snd_soc_machine snd_soc_ma
 
 /* poodle audio private data */
 static struct wm8731_setup_data poodle_wm8731_setup = {
+	.i2c_bus = 0,
 	.i2c_address = 0x1b,
 };
 
Signature · 1 line
Jean Delvare