mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
[ARM] 5596/1: at91sam9g20-ek: Register WM8731 in board file
The WM8731 driver has been updated to allow registration via normal device model methods rather than from within the ASoC driver probe so update the AT91SAM9G20-EK to make use of this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
b319ff8085
commit
d7dbf6ea40
2 changed files with 1 additions and 36 deletions
|
@ -221,6 +221,7 @@ static struct gpio_led ek_leds[] = {
|
|||
static struct i2c_board_info __initdata ek_i2c_devices[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("24c512", 0x50),
|
||||
I2C_BOARD_INFO("wm8731", 0x1b),
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -281,38 +281,6 @@ static struct snd_soc_card snd_soc_at91sam9g20ek = {
|
|||
.set_bias_level = at91sam9g20ek_set_bias_level,
|
||||
};
|
||||
|
||||
/*
|
||||
* FIXME: This is a temporary bodge to avoid cross-tree merge issues.
|
||||
* New drivers should register the wm8731 I2C device in the machine
|
||||
* setup code (under arch/arm for ARM systems).
|
||||
*/
|
||||
static int wm8731_i2c_register(void)
|
||||
{
|
||||
struct i2c_board_info info;
|
||||
struct i2c_adapter *adapter;
|
||||
struct i2c_client *client;
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
info.addr = 0x1b;
|
||||
strlcpy(info.type, "wm8731", I2C_NAME_SIZE);
|
||||
|
||||
adapter = i2c_get_adapter(0);
|
||||
if (!adapter) {
|
||||
printk(KERN_ERR "can't get i2c adapter 0\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
client = i2c_new_device(adapter, &info);
|
||||
i2c_put_adapter(adapter);
|
||||
if (!client) {
|
||||
printk(KERN_ERR "can't add i2c device at 0x%x\n",
|
||||
(unsigned int)info.addr);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_soc_device at91sam9g20ek_snd_devdata = {
|
||||
.card = &snd_soc_at91sam9g20ek,
|
||||
.codec_dev = &soc_codec_dev_wm8731,
|
||||
|
@ -367,10 +335,6 @@ static int __init at91sam9g20ek_init(void)
|
|||
}
|
||||
ssc_p->ssc = ssc;
|
||||
|
||||
ret = wm8731_i2c_register();
|
||||
if (ret != 0)
|
||||
goto err_ssc;
|
||||
|
||||
at91sam9g20ek_snd_device = platform_device_alloc("soc-audio", -1);
|
||||
if (!at91sam9g20ek_snd_device) {
|
||||
printk(KERN_ERR "ASoC: Platform device allocation failed\n");
|
||||
|
|
Loading…
Reference in a new issue