diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-zoom2.c')
-rw-r--r-- | arch/arm/mach-omap2/board-zoom2.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/board-zoom2.c b/arch/arm/mach-omap2/board-zoom2.c index 803ef14cbf2d..410fe006c0f6 100644 --- a/arch/arm/mach-omap2/board-zoom2.c +++ b/arch/arm/mach-omap2/board-zoom2.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/input.h> | 15 | #include <linux/input.h> |
16 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
17 | #include <linux/i2c/twl.h> | ||
17 | 18 | ||
18 | #include <asm/mach-types.h> | 19 | #include <asm/mach-types.h> |
19 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
@@ -34,8 +35,11 @@ static void __init omap_zoom2_init_irq(void) | |||
34 | omap_gpio_init(); | 35 | omap_gpio_init(); |
35 | } | 36 | } |
36 | 37 | ||
37 | /* REVISIT: These audio entries can be removed once MFD code is merged */ | 38 | /* EXTMUTE callback function */ |
38 | #if 0 | 39 | void zoom2_set_hs_extmute(int mute) |
40 | { | ||
41 | gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute); | ||
42 | } | ||
39 | 43 | ||
40 | static struct twl4030_madc_platform_data zoom2_madc_data = { | 44 | static struct twl4030_madc_platform_data zoom2_madc_data = { |
41 | .irq_line = 1, | 45 | .irq_line = 1, |
@@ -43,6 +47,9 @@ static struct twl4030_madc_platform_data zoom2_madc_data = { | |||
43 | 47 | ||
44 | static struct twl4030_codec_audio_data zoom2_audio_data = { | 48 | static struct twl4030_codec_audio_data zoom2_audio_data = { |
45 | .audio_mclk = 26000000, | 49 | .audio_mclk = 26000000, |
50 | .ramp_delay_value = 3, /* 161 ms */ | ||
51 | .hs_extmute = 1, | ||
52 | .set_hs_extmute = zoom2_set_hs_extmute, | ||
46 | }; | 53 | }; |
47 | 54 | ||
48 | static struct twl4030_codec_data zoom2_codec_data = { | 55 | static struct twl4030_codec_data zoom2_codec_data = { |
@@ -64,10 +71,24 @@ static struct twl4030_platform_data zoom2_twldata = { | |||
64 | .vmmc1 = &zoom2_vmmc1, | 71 | .vmmc1 = &zoom2_vmmc1, |
65 | .vmmc2 = &zoom2_vmmc2, | 72 | .vmmc2 = &zoom2_vmmc2, |
66 | .vsim = &zoom2_vsim, | 73 | .vsim = &zoom2_vsim, |
74 | }; | ||
67 | 75 | ||
76 | static struct i2c_board_info __initdata zoom2_i2c_boardinfo[] = { | ||
77 | { | ||
78 | I2C_BOARD_INFO("twl4030", 0x48), | ||
79 | .flags = I2C_CLIENT_WAKE, | ||
80 | .irq = INT_34XX_SYS_NIRQ, | ||
81 | .platform_data = &zoom2_twldata, | ||
82 | }, | ||
68 | }; | 83 | }; |
69 | 84 | ||
70 | #endif | 85 | static int __init omap3_zoom2_i2c_init(void) |
86 | { | ||
87 | omap_register_i2c_bus(1, 2600, zoom2_i2c_boardinfo, | ||
88 | ARRAY_SIZE(zoom2_i2c_boardinfo)); | ||
89 | return 0; | ||
90 | } | ||
91 | |||
71 | 92 | ||
72 | #ifdef CONFIG_OMAP_MUX | 93 | #ifdef CONFIG_OMAP_MUX |
73 | static struct omap_board_mux board_mux[] __initdata = { | 94 | static struct omap_board_mux board_mux[] __initdata = { |
@@ -81,6 +102,7 @@ static void __init omap_zoom2_init(void) | |||
81 | { | 102 | { |
82 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 103 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
83 | zoom_peripherals_init(); | 104 | zoom_peripherals_init(); |
105 | omap3_zoom2_i2c_init(); | ||
84 | zoom_debugboard_init(); | 106 | zoom_debugboard_init(); |
85 | } | 107 | } |
86 | 108 | ||