]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: S5PV210: Add i2c information to Goni and Aquila board
authorChanwoo Choi <cw00.choi@samsung.com>
Thu, 14 Oct 2010 06:02:44 +0000 (15:02 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Mon, 25 Oct 2010 07:06:45 +0000 (16:06 +0900)
This patch the I2C board information for the WM8994 used in the Goni/Aquila
as audio codec and adds the I2C platform drivers.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/mach-s5pv210/mach-aquila.c
arch/arm/mach-s5pv210/mach-goni.c

index bf772de6b0c33c81e9148d019b59f59f863fadd0..b0974929dec7a038c97e56cfa02f956ee43bd891 100644 (file)
@@ -404,6 +404,28 @@ static struct i2c_board_info i2c_gpio_pmic_devs[] __initdata = {
 #endif
 };
 
+/* GPIO I2C AP 1.8V */
+#define AP_I2C_GPIO_BUS_5      5
+static struct i2c_gpio_platform_data aquila_i2c_gpio5_data = {
+       .sda_pin        = S5PV210_MP05(3),      /* XM0ADDR_11 */
+       .scl_pin        = S5PV210_MP05(2),      /* XM0ADDR_10 */
+};
+
+static struct platform_device aquila_i2c_gpio5 = {
+       .name           = "i2c-gpio",
+       .id             = AP_I2C_GPIO_BUS_5,
+       .dev            = {
+               .platform_data  = &aquila_i2c_gpio5_data,
+       },
+};
+
+static struct i2c_board_info i2c_gpio5_devs[] __initdata = {
+       {
+               /* CS/ADDR = low 0x34 (FYI: high = 0x36) */
+               I2C_BOARD_INFO("wm8994", 0x1a),
+       },
+};
+
 /* PMIC Power button */
 static struct gpio_keys_button aquila_gpio_keys_table[] = {
        {
@@ -475,6 +497,7 @@ static void aquila_setup_sdhci(void)
 
 static struct platform_device *aquila_devices[] __initdata = {
        &aquila_i2c_gpio_pmic,
+       &aquila_i2c_gpio5,
        &aquila_device_gpiokeys,
        &s3c_device_fb,
        &s5p_device_onenand,
@@ -506,6 +529,10 @@ static void __init aquila_machine_init(void)
        s3c_fimc_setname(1, "s5p-fimc");
        s3c_fimc_setname(2, "s5p-fimc");
 
+       /* SOUND */
+       i2c_register_board_info(AP_I2C_GPIO_BUS_5, i2c_gpio5_devs,
+                       ARRAY_SIZE(i2c_gpio5_devs));
+
        /* FB */
        s3c_fb_set_platdata(&aquila_lcd_pdata);
 
index 1bae3f13f0a02df53897560c9227d158a227ae2f..54d80f3fd5d0fe84dc27e1853ae41d59f8333081 100644 (file)
@@ -545,6 +545,28 @@ static struct i2c_board_info i2c_gpio_pmic_devs[] __initdata = {
 #endif
 };
 
+/* GPIO I2C AP 1.8V */
+#define AP_I2C_GPIO_BUS_5      5
+static struct i2c_gpio_platform_data goni_i2c_gpio5_data = {
+       .sda_pin        = S5PV210_MP05(3),      /* XM0ADDR_11 */
+       .scl_pin        = S5PV210_MP05(2),      /* XM0ADDR_10 */
+};
+
+static struct platform_device goni_i2c_gpio5 = {
+       .name           = "i2c-gpio",
+       .id             = AP_I2C_GPIO_BUS_5,
+       .dev            = {
+               .platform_data  = &goni_i2c_gpio5_data,
+       },
+};
+
+static struct i2c_board_info i2c_gpio5_devs[] __initdata = {
+       {
+               /* CS/ADDR = low 0x34 (FYI: high = 0x36) */
+               I2C_BOARD_INFO("wm8994", 0x1a),
+       },
+};
+
 /* PMIC Power button */
 static struct gpio_keys_button goni_gpio_keys_table[] = {
        {
@@ -645,6 +667,7 @@ static struct platform_device *goni_devices[] __initdata = {
        &s5p_device_onenand,
        &goni_spi_gpio,
        &goni_i2c_gpio_pmic,
+       &goni_i2c_gpio5,
        &mmc2_fixed_voltage,
        &goni_device_gpiokeys,
        &s5p_device_fimc0,
@@ -689,6 +712,10 @@ static void __init goni_machine_init(void)
        /* SDHCI */
        goni_setup_sdhci();
 
+       /* SOUND */
+       i2c_register_board_info(AP_I2C_GPIO_BUS_5, i2c_gpio5_devs,
+                       ARRAY_SIZE(i2c_gpio5_devs));
+
        /* FB */
        s3c_fb_set_platdata(&goni_lcd_pdata);