aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2011-07-07 15:11:23 -0400
committerTony Lindgren <tony@atomide.com>2011-07-07 15:11:23 -0400
commit345e397d841068c4ba2829a226fbe6613bac1d0d (patch)
tree70ba905bd380876b57b5ce47fb55f198e149ee6c /arch
parent727e18b429e3badda12d1de74f492bfa363a2e94 (diff)
parent21385eeb02e59cb2a72b60cd146f9c1ce3cb0acd (diff)
Merge branch 'peter/topic/for-tony' of git://gitorious.org/omap-audio/linux-audio into twl-asoc
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c56
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c6
-rw-r--r--arch/arm/mach-omap2/board-zoom-peripherals.c10
-rw-r--r--arch/arm/mach-omap2/twl-common.c10
-rw-r--r--arch/arm/plat-omap/include/plat/irqs.h12
5 files changed, 79 insertions, 15 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 933b25bb10de..d4448a0624d9 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -22,6 +22,7 @@
22#include <linux/i2c/twl.h> 22#include <linux/i2c/twl.h>
23#include <linux/gpio_keys.h> 23#include <linux/gpio_keys.h>
24#include <linux/regulator/machine.h> 24#include <linux/regulator/machine.h>
25#include <linux/regulator/fixed.h>
25#include <linux/leds.h> 26#include <linux/leds.h>
26#include <linux/leds_pwm.h> 27#include <linux/leds_pwm.h>
27 28
@@ -275,11 +276,40 @@ static struct platform_device sdp4430_lcd_device = {
275 .id = -1, 276 .id = -1,
276}; 277};
277 278
279static struct regulator_consumer_supply sdp4430_vbat_supply[] = {
280 REGULATOR_SUPPLY("vddvibl", "twl6040-vibra"),
281 REGULATOR_SUPPLY("vddvibr", "twl6040-vibra"),
282};
283
284static struct regulator_init_data sdp4430_vbat_data = {
285 .constraints = {
286 .always_on = 1,
287 },
288 .num_consumer_supplies = ARRAY_SIZE(sdp4430_vbat_supply),
289 .consumer_supplies = sdp4430_vbat_supply,
290};
291
292static struct fixed_voltage_config sdp4430_vbat_pdata = {
293 .supply_name = "VBAT",
294 .microvolts = 3750000,
295 .init_data = &sdp4430_vbat_data,
296 .gpio = -EINVAL,
297};
298
299static struct platform_device sdp4430_vbat = {
300 .name = "reg-fixed-voltage",
301 .id = -1,
302 .dev = {
303 .platform_data = &sdp4430_vbat_pdata,
304 },
305};
306
278static struct platform_device *sdp4430_devices[] __initdata = { 307static struct platform_device *sdp4430_devices[] __initdata = {
279 &sdp4430_lcd_device, 308 &sdp4430_lcd_device,
280 &sdp4430_gpio_keys_device, 309 &sdp4430_gpio_keys_device,
281 &sdp4430_leds_gpio, 310 &sdp4430_leds_gpio,
282 &sdp4430_leds_pwm, 311 &sdp4430_leds_pwm,
312 &sdp4430_vbat,
283}; 313};
284 314
285static struct omap_lcd_config sdp4430_lcd_config __initdata = { 315static struct omap_lcd_config sdp4430_lcd_config __initdata = {
@@ -395,7 +425,33 @@ static struct regulator_init_data sdp4430_vusim = {
395 }, 425 },
396}; 426};
397 427
428static struct twl4030_codec_data twl6040_codec = {
429 /* single-step ramp for headset and handsfree */
430 .hs_left_step = 0x0f,
431 .hs_right_step = 0x0f,
432 .hf_left_step = 0x1d,
433 .hf_right_step = 0x1d,
434};
435
436static struct twl4030_vibra_data twl6040_vibra = {
437 .vibldrv_res = 8,
438 .vibrdrv_res = 3,
439 .viblmotor_res = 10,
440 .vibrmotor_res = 10,
441 .vddvibl_uV = 0, /* fixed volt supply - VBAT */
442 .vddvibr_uV = 0, /* fixed volt supply - VBAT */
443};
444
445static struct twl4030_audio_data twl6040_audio = {
446 .codec = &twl6040_codec,
447 .vibra = &twl6040_vibra,
448 .audpwron_gpio = 127,
449 .naudint_irq = OMAP44XX_IRQ_SYS_2N,
450 .irq_base = TWL6040_CODEC_IRQ_BASE,
451};
452
398static struct twl4030_platform_data sdp4430_twldata = { 453static struct twl4030_platform_data sdp4430_twldata = {
454 .audio = &twl6040_audio,
399 /* Regulators */ 455 /* Regulators */
400 .vusim = &sdp4430_vusim, 456 .vusim = &sdp4430_vusim,
401 .vaux1 = &sdp4430_vaux1, 457 .vaux1 = &sdp4430_vaux1,
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 6140290721a0..f52bc61f35ae 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -741,11 +741,11 @@ static struct twl4030_power_data rx51_t2scripts_data __initdata = {
741 .resource_config = twl4030_rconfig, 741 .resource_config = twl4030_rconfig,
742}; 742};
743 743
744struct twl4030_codec_vibra_data rx51_vibra_data __initdata = { 744struct twl4030_vibra_data rx51_vibra_data __initdata = {
745 .coexist = 0, 745 .coexist = 0,
746}; 746};
747 747
748struct twl4030_codec_data rx51_codec_data __initdata = { 748struct twl4030_audio_data rx51_audio_data __initdata = {
749 .audio_mclk = 26000000, 749 .audio_mclk = 26000000,
750 .vibra = &rx51_vibra_data, 750 .vibra = &rx51_vibra_data,
751}; 751};
@@ -755,7 +755,7 @@ static struct twl4030_platform_data rx51_twldata __initdata = {
755 .gpio = &rx51_gpio_data, 755 .gpio = &rx51_gpio_data,
756 .keypad = &rx51_kp_data, 756 .keypad = &rx51_kp_data,
757 .power = &rx51_t2scripts_data, 757 .power = &rx51_t2scripts_data,
758 .codec = &rx51_codec_data, 758 .audio = &rx51_audio_data,
759 759
760 .vaux1 = &rx51_vaux1, 760 .vaux1 = &rx51_vaux1,
761 .vaux2 = &rx51_vaux2, 761 .vaux2 = &rx51_vaux2,
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 13a644233667..6d0aa4fcb7c3 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -274,12 +274,12 @@ static int __init omap_i2c_init(void)
274 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); 274 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
275 275
276 if (machine_is_omap_zoom2()) { 276 if (machine_is_omap_zoom2()) {
277 struct twl4030_codec_audio_data *audio_data; 277 struct twl4030_codec_data *codec_data;
278 audio_data = zoom_twldata.codec->audio; 278 codec_data = zoom_twldata.audio->codec;
279 279
280 audio_data->ramp_delay_value = 3; /* 161 ms */ 280 codec_data->ramp_delay_value = 3; /* 161 ms */
281 audio_data->hs_extmute = 1; 281 codec_data->hs_extmute = 1;
282 audio_data->set_hs_extmute = zoom2_set_hs_extmute; 282 codec_data->set_hs_extmute = zoom2_set_hs_extmute;
283 } 283 }
284 omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata); 284 omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata);
285 omap_register_i2c_bus(2, 400, NULL, 0); 285 omap_register_i2c_bus(2, 400, NULL, 0);
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index 3aaa46f6cd12..2543342dbccb 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -80,11 +80,11 @@ static struct twl4030_madc_platform_data omap3_madc_pdata = {
80 .irq_line = 1, 80 .irq_line = 1,
81}; 81};
82 82
83static struct twl4030_codec_audio_data omap3_audio; 83static struct twl4030_codec_data omap3_codec;
84 84
85static struct twl4030_codec_data omap3_codec_pdata = { 85static struct twl4030_audio_data omap3_audio_pdata = {
86 .audio_mclk = 26000000, 86 .audio_mclk = 26000000,
87 .audio = &omap3_audio, 87 .codec = &omap3_codec,
88}; 88};
89 89
90static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = { 90static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = {
@@ -292,8 +292,8 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
292 if (pdata_flags & TWL_COMMON_PDATA_MADC && !pmic_data->madc) 292 if (pdata_flags & TWL_COMMON_PDATA_MADC && !pmic_data->madc)
293 pmic_data->madc = &omap3_madc_pdata; 293 pmic_data->madc = &omap3_madc_pdata;
294 294
295 if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->codec) 295 if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->audio)
296 pmic_data->codec = &omap3_codec_pdata; 296 pmic_data->audio = &omap3_audio_pdata;
297 297
298 /* Common regulator configurations */ 298 /* Common regulator configurations */
299 if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac) 299 if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h
index c88432005665..926d25c780f3 100644
--- a/arch/arm/plat-omap/include/plat/irqs.h
+++ b/arch/arm/plat-omap/include/plat/irqs.h
@@ -407,11 +407,19 @@
407#endif 407#endif
408#define TWL6030_IRQ_END (TWL6030_IRQ_BASE + TWL6030_BASE_NR_IRQS) 408#define TWL6030_IRQ_END (TWL6030_IRQ_BASE + TWL6030_BASE_NR_IRQS)
409 409
410#define TWL6040_CODEC_IRQ_BASE TWL6030_IRQ_END
411#ifdef CONFIG_TWL6040_CODEC
412#define TWL6040_CODEC_NR_IRQS 6
413#else
414#define TWL6040_CODEC_NR_IRQS 0
415#endif
416#define TWL6040_CODEC_IRQ_END (TWL6040_CODEC_IRQ_BASE + TWL6040_CODEC_NR_IRQS)
417
410/* Total number of interrupts depends on the enabled blocks above */ 418/* Total number of interrupts depends on the enabled blocks above */
411#if (TWL4030_GPIO_IRQ_END > TWL6030_IRQ_END) 419#if (TWL4030_GPIO_IRQ_END > TWL6040_CODEC_IRQ_END)
412#define TWL_IRQ_END TWL4030_GPIO_IRQ_END 420#define TWL_IRQ_END TWL4030_GPIO_IRQ_END
413#else 421#else
414#define TWL_IRQ_END TWL6030_IRQ_END 422#define TWL_IRQ_END TWL6040_CODEC_IRQ_END
415#endif 423#endif
416 424
417/* GPMC related */ 425/* GPMC related */