diff options
author | Arnaud Patard <arnaud.patard@rtp-net.org> | 2011-03-02 16:27:41 -0500 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2011-03-03 16:26:59 -0500 |
commit | 9d3e1c56dee5e09c6babc96810c7105a7993908e (patch) | |
tree | 9cfc126d4eb24dfd5b9c227845780511bdcf7ebb /arch/arm/mach-kirkwood/t5325-setup.c | |
parent | 17718e17a25cc989954a8430985b3133ca21422e (diff) |
[ARM] Kirkwood: t5325: add audio support
This patch declares the i2c audio codec and initialise audio.
It's adding the alc5621 codec in the i2c board info and is calling
kirkwood_audio_init() to initialize kirkwood audio.
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Diffstat (limited to 'arch/arm/mach-kirkwood/t5325-setup.c')
-rw-r--r-- | arch/arm/mach-kirkwood/t5325-setup.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-kirkwood/t5325-setup.c b/arch/arm/mach-kirkwood/t5325-setup.c index ce50e61aac9f..f38c282d864b 100644 --- a/arch/arm/mach-kirkwood/t5325-setup.c +++ b/arch/arm/mach-kirkwood/t5325-setup.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
24 | #include <linux/gpio_keys.h> | 24 | #include <linux/gpio_keys.h> |
25 | #include <linux/input.h> | 25 | #include <linux/input.h> |
26 | #include <sound/alc5623.h> | ||
26 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
27 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
28 | #include <mach/kirkwood.h> | 29 | #include <mach/kirkwood.h> |
@@ -134,6 +135,7 @@ static unsigned int hp_t5325_mpp_config[] __initdata = { | |||
134 | MPP33_GE1_TXCTL, | 135 | MPP33_GE1_TXCTL, |
135 | MPP39_AU_I2SBCLK, | 136 | MPP39_AU_I2SBCLK, |
136 | MPP40_AU_I2SDO, | 137 | MPP40_AU_I2SDO, |
138 | MPP43_AU_I2SDI, | ||
137 | MPP41_AU_I2SLRCLK, | 139 | MPP41_AU_I2SLRCLK, |
138 | MPP42_AU_I2SMCLK, | 140 | MPP42_AU_I2SMCLK, |
139 | MPP45_GPIO, /* Power button */ | 141 | MPP45_GPIO, /* Power button */ |
@@ -141,6 +143,18 @@ static unsigned int hp_t5325_mpp_config[] __initdata = { | |||
141 | 0 | 143 | 0 |
142 | }; | 144 | }; |
143 | 145 | ||
146 | static struct alc5623_platform_data alc5621_data = { | ||
147 | .add_ctrl = 0x3700, | ||
148 | .jack_det_ctrl = 0x4810, | ||
149 | }; | ||
150 | |||
151 | static struct i2c_board_info i2c_board_info[] __initdata = { | ||
152 | { | ||
153 | I2C_BOARD_INFO("alc5621", 0x1a), | ||
154 | .platform_data = &alc5621_data, | ||
155 | }, | ||
156 | }; | ||
157 | |||
144 | #define HP_T5325_GPIO_POWER_OFF 48 | 158 | #define HP_T5325_GPIO_POWER_OFF 48 |
145 | 159 | ||
146 | static void hp_t5325_power_off(void) | 160 | static void hp_t5325_power_off(void) |
@@ -166,6 +180,9 @@ static void __init hp_t5325_init(void) | |||
166 | kirkwood_ehci_init(); | 180 | kirkwood_ehci_init(); |
167 | platform_device_register(&hp_t5325_button_device); | 181 | platform_device_register(&hp_t5325_button_device); |
168 | 182 | ||
183 | i2c_register_board_info(0, i2c_board_info, ARRAY_SIZE(i2c_board_info)); | ||
184 | kirkwood_audio_init(); | ||
185 | |||
169 | if (gpio_request(HP_T5325_GPIO_POWER_OFF, "power-off") == 0 && | 186 | if (gpio_request(HP_T5325_GPIO_POWER_OFF, "power-off") == 0 && |
170 | gpio_direction_output(HP_T5325_GPIO_POWER_OFF, 0) == 0) | 187 | gpio_direction_output(HP_T5325_GPIO_POWER_OFF, 0) == 0) |
171 | pm_power_off = hp_t5325_power_off; | 188 | pm_power_off = hp_t5325_power_off; |