Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 153718
b: refs/heads/master
c: 8776b26
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown authored and Eric Miao committed Jun 16, 2009
1 parent 3f6ead2 commit af03aa0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 73 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: e567b74caff03c0ed66b3d3e11c0acd17fbcfb9a
refs/heads/master: 8776b268c6b0b671c2c744b06fee021b6da3e45f
6 changes: 6 additions & 0 deletions trunk/arch/arm/mach-pxa/corgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/pm.h>
#include <linux/gpio.h>
#include <linux/backlight.h>
#include <linux/i2c.h>
#include <linux/io.h>
#include <linux/spi/spi.h>
#include <linux/spi/ads7846.h>
Expand Down Expand Up @@ -600,6 +601,10 @@ static struct platform_device *devices[] __initdata = {
&sharpsl_rom_device,
};

static struct i2c_board_info __initdata corgi_i2c_devices[] = {
{ I2C_BOARD_INFO("wm8731", 0x1b) },
};

static void corgi_poweroff(void)
{
if (!machine_is_corgi())
Expand Down Expand Up @@ -634,6 +639,7 @@ static void __init corgi_init(void)
pxa_set_mci_info(&corgi_mci_platform_data);
pxa_set_ficp_info(&corgi_ficp_platform_data);
pxa_set_i2c_info(NULL);
i2c_register_board_info(0, ARRAY_AND_SIZE(corgi_i2c_devices));

platform_scoop_config = &corgi_pcmcia_config;

Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/arm/mach-pxa/poodle.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/delay.h>
#include <linux/mtd/physmap.h>
#include <linux/gpio.h>
#include <linux/i2c.h>
#include <linux/spi/spi.h>
#include <linux/spi/ads7846.h>
#include <linux/mtd/sharpsl.h>
Expand Down Expand Up @@ -486,6 +487,10 @@ static struct platform_device *devices[] __initdata = {
&sharpsl_rom_device,
};

static struct i2c_board_info __initdata poodle_i2c_devices[] = {
{ I2C_BOARD_INFO("wm8731", 0x1b) },
};

static void poodle_poweroff(void)
{
arm_machine_restart('h', NULL);
Expand Down Expand Up @@ -519,6 +524,7 @@ static void __init poodle_init(void)
pxa_set_mci_info(&poodle_mci_platform_data);
pxa_set_ficp_info(&poodle_ficp_platform_data);
pxa_set_i2c_info(NULL);
i2c_register_board_info(0, ARRAY_AND_SIZE(poodle_i2c_devices));
poodle_init_spi();
}

Expand Down
36 changes: 0 additions & 36 deletions trunk/sound/soc/pxa/corgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,38 +320,6 @@ static struct snd_soc_device corgi_snd_devdata = {
.codec_dev = &soc_codec_dev_wm8731,
};

/*
* 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 platform_device *corgi_snd_device;

static int __init corgi_init(void)
Expand All @@ -362,10 +330,6 @@ static int __init corgi_init(void)
machine_is_husky()))
return -ENODEV;

ret = wm8731_i2c_register();
if (ret != 0)
return ret;

corgi_snd_device = platform_device_alloc("soc-audio", -1);
if (!corgi_snd_device)
return -ENOMEM;
Expand Down
36 changes: 0 additions & 36 deletions trunk/sound/soc/pxa/poodle.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,38 +280,6 @@ static struct snd_soc_card snd_soc_poodle = {
.num_links = 1,
};

/*
* 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;
}

/* poodle audio subsystem */
static struct snd_soc_device poodle_snd_devdata = {
.card = &snd_soc_poodle,
Expand All @@ -327,10 +295,6 @@ static int __init poodle_init(void)
if (!machine_is_poodle())
return -ENODEV;

ret = wm8731_i2c_register();
if (ret != 0)
return ret;

locomo_gpio_set_dir(&poodle_locomo_device.dev,
POODLE_LOCOMO_GPIO_AMP_ON, 0);
/* should we mute HP at startup - burning power ?*/
Expand Down

0 comments on commit af03aa0

Please sign in to comment.