Skip to contentSkip to conversation

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

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

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

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

Convert the wm8750 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 spitz has its codec chip on I2C bus 0, which may or may not be the case. Someone with this machine please test and report.

 include/linux/i2c-id.h    |    1 
 sound/soc/codecs/wm8750.c |  105 ++++++++++++++++++++++-----------------------
 sound/soc/codecs/wm8750.h |    1 
 sound/soc/pxa/spitz.c     |    1 
 4 files changed, 55 insertions(+), 53 deletions(-)
include/linux/i2c-id.h +0 -1
@@ -65,7 +65,6 @@
 #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_WM8750	90	/* Wolfson WM8750 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/codecs/wm8750.c +53 -52

153 lines not on this page · raw message

sound/soc/codecs/wm8750.h +1 -0
@@ -58,6 +58,7 @@
 #define WM8750_SYSCLK	0
 
 struct wm8750_setup_data {
+	int i2c_bus;
 	unsigned short i2c_address;
 };
 
sound/soc/pxa/spitz.c +1 -0
@@ -337,6 +337,7 @@ static struct snd_soc_machine snd_soc_ma
 
 /* spitz audio private data */
 static struct wm8750_setup_data spitz_wm8750_setup = {
+	.i2c_bus = 0,
 	.i2c_address = 0x1b,
 };
 
Signature · 1 line
Jean Delvare