Loading arch/arm/mach-omap2/board-4430sdp.c +56 −0 Original line number Original line Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include <linux/i2c/twl.h> #include <linux/i2c/twl.h> #include <linux/gpio_keys.h> #include <linux/gpio_keys.h> #include <linux/regulator/machine.h> #include <linux/regulator/machine.h> #include <linux/regulator/fixed.h> #include <linux/leds.h> #include <linux/leds.h> #include <linux/leds_pwm.h> #include <linux/leds_pwm.h> Loading Loading @@ -275,11 +276,40 @@ static struct platform_device sdp4430_lcd_device = { .id = -1, .id = -1, }; }; static struct regulator_consumer_supply sdp4430_vbat_supply[] = { REGULATOR_SUPPLY("vddvibl", "twl6040-vibra"), REGULATOR_SUPPLY("vddvibr", "twl6040-vibra"), }; static struct regulator_init_data sdp4430_vbat_data = { .constraints = { .always_on = 1, }, .num_consumer_supplies = ARRAY_SIZE(sdp4430_vbat_supply), .consumer_supplies = sdp4430_vbat_supply, }; static struct fixed_voltage_config sdp4430_vbat_pdata = { .supply_name = "VBAT", .microvolts = 3750000, .init_data = &sdp4430_vbat_data, .gpio = -EINVAL, }; static struct platform_device sdp4430_vbat = { .name = "reg-fixed-voltage", .id = -1, .dev = { .platform_data = &sdp4430_vbat_pdata, }, }; static struct platform_device *sdp4430_devices[] __initdata = { static struct platform_device *sdp4430_devices[] __initdata = { &sdp4430_lcd_device, &sdp4430_lcd_device, &sdp4430_gpio_keys_device, &sdp4430_gpio_keys_device, &sdp4430_leds_gpio, &sdp4430_leds_gpio, &sdp4430_leds_pwm, &sdp4430_leds_pwm, &sdp4430_vbat, }; }; static struct omap_lcd_config sdp4430_lcd_config __initdata = { static struct omap_lcd_config sdp4430_lcd_config __initdata = { Loading Loading @@ -395,7 +425,33 @@ static struct regulator_init_data sdp4430_vusim = { }, }, }; }; static struct twl4030_codec_data twl6040_codec = { /* single-step ramp for headset and handsfree */ .hs_left_step = 0x0f, .hs_right_step = 0x0f, .hf_left_step = 0x1d, .hf_right_step = 0x1d, }; static struct twl4030_vibra_data twl6040_vibra = { .vibldrv_res = 8, .vibrdrv_res = 3, .viblmotor_res = 10, .vibrmotor_res = 10, .vddvibl_uV = 0, /* fixed volt supply - VBAT */ .vddvibr_uV = 0, /* fixed volt supply - VBAT */ }; static struct twl4030_audio_data twl6040_audio = { .codec = &twl6040_codec, .vibra = &twl6040_vibra, .audpwron_gpio = 127, .naudint_irq = OMAP44XX_IRQ_SYS_2N, .irq_base = TWL6040_CODEC_IRQ_BASE, }; static struct twl4030_platform_data sdp4430_twldata = { static struct twl4030_platform_data sdp4430_twldata = { .audio = &twl6040_audio, /* Regulators */ /* Regulators */ .vusim = &sdp4430_vusim, .vusim = &sdp4430_vusim, .vaux1 = &sdp4430_vaux1, .vaux1 = &sdp4430_vaux1, Loading arch/arm/mach-omap2/board-rx51-peripherals.c +3 −3 Original line number Original line Diff line number Diff line Loading @@ -741,11 +741,11 @@ static struct twl4030_power_data rx51_t2scripts_data __initdata = { .resource_config = twl4030_rconfig, .resource_config = twl4030_rconfig, }; }; struct twl4030_codec_vibra_data rx51_vibra_data __initdata = { struct twl4030_vibra_data rx51_vibra_data __initdata = { .coexist = 0, .coexist = 0, }; }; struct twl4030_codec_data rx51_codec_data __initdata = { struct twl4030_audio_data rx51_audio_data __initdata = { .audio_mclk = 26000000, .audio_mclk = 26000000, .vibra = &rx51_vibra_data, .vibra = &rx51_vibra_data, }; }; Loading @@ -755,7 +755,7 @@ static struct twl4030_platform_data rx51_twldata __initdata = { .gpio = &rx51_gpio_data, .gpio = &rx51_gpio_data, .keypad = &rx51_kp_data, .keypad = &rx51_kp_data, .power = &rx51_t2scripts_data, .power = &rx51_t2scripts_data, .codec = &rx51_codec_data, .audio = &rx51_audio_data, .vaux1 = &rx51_vaux1, .vaux1 = &rx51_vaux1, .vaux2 = &rx51_vaux2, .vaux2 = &rx51_vaux2, Loading arch/arm/mach-omap2/board-zoom-peripherals.c +5 −5 Original line number Original line Diff line number Diff line Loading @@ -274,12 +274,12 @@ static int __init omap_i2c_init(void) TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); if (machine_is_omap_zoom2()) { if (machine_is_omap_zoom2()) { struct twl4030_codec_audio_data *audio_data; struct twl4030_codec_data *codec_data; audio_data = zoom_twldata.codec->audio; codec_data = zoom_twldata.audio->codec; audio_data->ramp_delay_value = 3; /* 161 ms */ codec_data->ramp_delay_value = 3; /* 161 ms */ audio_data->hs_extmute = 1; codec_data->hs_extmute = 1; audio_data->set_hs_extmute = zoom2_set_hs_extmute; codec_data->set_hs_extmute = zoom2_set_hs_extmute; } } omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata); omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata); omap_register_i2c_bus(2, 400, NULL, 0); omap_register_i2c_bus(2, 400, NULL, 0); Loading arch/arm/mach-omap2/twl-common.c +5 −5 Original line number Original line Diff line number Diff line Loading @@ -80,11 +80,11 @@ static struct twl4030_madc_platform_data omap3_madc_pdata = { .irq_line = 1, .irq_line = 1, }; }; static struct twl4030_codec_audio_data omap3_audio; static struct twl4030_codec_data omap3_codec; static struct twl4030_codec_data omap3_codec_pdata = { static struct twl4030_audio_data omap3_audio_pdata = { .audio_mclk = 26000000, .audio_mclk = 26000000, .audio = &omap3_audio, .codec = &omap3_codec, }; }; static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = { static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = { Loading Loading @@ -292,8 +292,8 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data, if (pdata_flags & TWL_COMMON_PDATA_MADC && !pmic_data->madc) if (pdata_flags & TWL_COMMON_PDATA_MADC && !pmic_data->madc) pmic_data->madc = &omap3_madc_pdata; pmic_data->madc = &omap3_madc_pdata; if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->codec) if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->audio) pmic_data->codec = &omap3_codec_pdata; pmic_data->audio = &omap3_audio_pdata; /* Common regulator configurations */ /* Common regulator configurations */ if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac) if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac) Loading arch/arm/plat-omap/include/plat/irqs.h +10 −2 Original line number Original line Diff line number Diff line Loading @@ -407,11 +407,19 @@ #endif #endif #define TWL6030_IRQ_END (TWL6030_IRQ_BASE + TWL6030_BASE_NR_IRQS) #define TWL6030_IRQ_END (TWL6030_IRQ_BASE + TWL6030_BASE_NR_IRQS) #define TWL6040_CODEC_IRQ_BASE TWL6030_IRQ_END #ifdef CONFIG_TWL6040_CODEC #define TWL6040_CODEC_NR_IRQS 6 #else #define TWL6040_CODEC_NR_IRQS 0 #endif #define TWL6040_CODEC_IRQ_END (TWL6040_CODEC_IRQ_BASE + TWL6040_CODEC_NR_IRQS) /* Total number of interrupts depends on the enabled blocks above */ /* Total number of interrupts depends on the enabled blocks above */ #if (TWL4030_GPIO_IRQ_END > TWL6030_IRQ_END) #if (TWL4030_GPIO_IRQ_END > TWL6040_CODEC_IRQ_END) #define TWL_IRQ_END TWL4030_GPIO_IRQ_END #define TWL_IRQ_END TWL4030_GPIO_IRQ_END #else #else #define TWL_IRQ_END TWL6030_IRQ_END #define TWL_IRQ_END TWL6040_CODEC_IRQ_END #endif #endif /* GPMC related */ /* GPMC related */ Loading Loading
arch/arm/mach-omap2/board-4430sdp.c +56 −0 Original line number Original line Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include <linux/i2c/twl.h> #include <linux/i2c/twl.h> #include <linux/gpio_keys.h> #include <linux/gpio_keys.h> #include <linux/regulator/machine.h> #include <linux/regulator/machine.h> #include <linux/regulator/fixed.h> #include <linux/leds.h> #include <linux/leds.h> #include <linux/leds_pwm.h> #include <linux/leds_pwm.h> Loading Loading @@ -275,11 +276,40 @@ static struct platform_device sdp4430_lcd_device = { .id = -1, .id = -1, }; }; static struct regulator_consumer_supply sdp4430_vbat_supply[] = { REGULATOR_SUPPLY("vddvibl", "twl6040-vibra"), REGULATOR_SUPPLY("vddvibr", "twl6040-vibra"), }; static struct regulator_init_data sdp4430_vbat_data = { .constraints = { .always_on = 1, }, .num_consumer_supplies = ARRAY_SIZE(sdp4430_vbat_supply), .consumer_supplies = sdp4430_vbat_supply, }; static struct fixed_voltage_config sdp4430_vbat_pdata = { .supply_name = "VBAT", .microvolts = 3750000, .init_data = &sdp4430_vbat_data, .gpio = -EINVAL, }; static struct platform_device sdp4430_vbat = { .name = "reg-fixed-voltage", .id = -1, .dev = { .platform_data = &sdp4430_vbat_pdata, }, }; static struct platform_device *sdp4430_devices[] __initdata = { static struct platform_device *sdp4430_devices[] __initdata = { &sdp4430_lcd_device, &sdp4430_lcd_device, &sdp4430_gpio_keys_device, &sdp4430_gpio_keys_device, &sdp4430_leds_gpio, &sdp4430_leds_gpio, &sdp4430_leds_pwm, &sdp4430_leds_pwm, &sdp4430_vbat, }; }; static struct omap_lcd_config sdp4430_lcd_config __initdata = { static struct omap_lcd_config sdp4430_lcd_config __initdata = { Loading Loading @@ -395,7 +425,33 @@ static struct regulator_init_data sdp4430_vusim = { }, }, }; }; static struct twl4030_codec_data twl6040_codec = { /* single-step ramp for headset and handsfree */ .hs_left_step = 0x0f, .hs_right_step = 0x0f, .hf_left_step = 0x1d, .hf_right_step = 0x1d, }; static struct twl4030_vibra_data twl6040_vibra = { .vibldrv_res = 8, .vibrdrv_res = 3, .viblmotor_res = 10, .vibrmotor_res = 10, .vddvibl_uV = 0, /* fixed volt supply - VBAT */ .vddvibr_uV = 0, /* fixed volt supply - VBAT */ }; static struct twl4030_audio_data twl6040_audio = { .codec = &twl6040_codec, .vibra = &twl6040_vibra, .audpwron_gpio = 127, .naudint_irq = OMAP44XX_IRQ_SYS_2N, .irq_base = TWL6040_CODEC_IRQ_BASE, }; static struct twl4030_platform_data sdp4430_twldata = { static struct twl4030_platform_data sdp4430_twldata = { .audio = &twl6040_audio, /* Regulators */ /* Regulators */ .vusim = &sdp4430_vusim, .vusim = &sdp4430_vusim, .vaux1 = &sdp4430_vaux1, .vaux1 = &sdp4430_vaux1, Loading
arch/arm/mach-omap2/board-rx51-peripherals.c +3 −3 Original line number Original line Diff line number Diff line Loading @@ -741,11 +741,11 @@ static struct twl4030_power_data rx51_t2scripts_data __initdata = { .resource_config = twl4030_rconfig, .resource_config = twl4030_rconfig, }; }; struct twl4030_codec_vibra_data rx51_vibra_data __initdata = { struct twl4030_vibra_data rx51_vibra_data __initdata = { .coexist = 0, .coexist = 0, }; }; struct twl4030_codec_data rx51_codec_data __initdata = { struct twl4030_audio_data rx51_audio_data __initdata = { .audio_mclk = 26000000, .audio_mclk = 26000000, .vibra = &rx51_vibra_data, .vibra = &rx51_vibra_data, }; }; Loading @@ -755,7 +755,7 @@ static struct twl4030_platform_data rx51_twldata __initdata = { .gpio = &rx51_gpio_data, .gpio = &rx51_gpio_data, .keypad = &rx51_kp_data, .keypad = &rx51_kp_data, .power = &rx51_t2scripts_data, .power = &rx51_t2scripts_data, .codec = &rx51_codec_data, .audio = &rx51_audio_data, .vaux1 = &rx51_vaux1, .vaux1 = &rx51_vaux1, .vaux2 = &rx51_vaux2, .vaux2 = &rx51_vaux2, Loading
arch/arm/mach-omap2/board-zoom-peripherals.c +5 −5 Original line number Original line Diff line number Diff line Loading @@ -274,12 +274,12 @@ static int __init omap_i2c_init(void) TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); if (machine_is_omap_zoom2()) { if (machine_is_omap_zoom2()) { struct twl4030_codec_audio_data *audio_data; struct twl4030_codec_data *codec_data; audio_data = zoom_twldata.codec->audio; codec_data = zoom_twldata.audio->codec; audio_data->ramp_delay_value = 3; /* 161 ms */ codec_data->ramp_delay_value = 3; /* 161 ms */ audio_data->hs_extmute = 1; codec_data->hs_extmute = 1; audio_data->set_hs_extmute = zoom2_set_hs_extmute; codec_data->set_hs_extmute = zoom2_set_hs_extmute; } } omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata); omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata); omap_register_i2c_bus(2, 400, NULL, 0); omap_register_i2c_bus(2, 400, NULL, 0); Loading
arch/arm/mach-omap2/twl-common.c +5 −5 Original line number Original line Diff line number Diff line Loading @@ -80,11 +80,11 @@ static struct twl4030_madc_platform_data omap3_madc_pdata = { .irq_line = 1, .irq_line = 1, }; }; static struct twl4030_codec_audio_data omap3_audio; static struct twl4030_codec_data omap3_codec; static struct twl4030_codec_data omap3_codec_pdata = { static struct twl4030_audio_data omap3_audio_pdata = { .audio_mclk = 26000000, .audio_mclk = 26000000, .audio = &omap3_audio, .codec = &omap3_codec, }; }; static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = { static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = { Loading Loading @@ -292,8 +292,8 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data, if (pdata_flags & TWL_COMMON_PDATA_MADC && !pmic_data->madc) if (pdata_flags & TWL_COMMON_PDATA_MADC && !pmic_data->madc) pmic_data->madc = &omap3_madc_pdata; pmic_data->madc = &omap3_madc_pdata; if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->codec) if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->audio) pmic_data->codec = &omap3_codec_pdata; pmic_data->audio = &omap3_audio_pdata; /* Common regulator configurations */ /* Common regulator configurations */ if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac) if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac) Loading
arch/arm/plat-omap/include/plat/irqs.h +10 −2 Original line number Original line Diff line number Diff line Loading @@ -407,11 +407,19 @@ #endif #endif #define TWL6030_IRQ_END (TWL6030_IRQ_BASE + TWL6030_BASE_NR_IRQS) #define TWL6030_IRQ_END (TWL6030_IRQ_BASE + TWL6030_BASE_NR_IRQS) #define TWL6040_CODEC_IRQ_BASE TWL6030_IRQ_END #ifdef CONFIG_TWL6040_CODEC #define TWL6040_CODEC_NR_IRQS 6 #else #define TWL6040_CODEC_NR_IRQS 0 #endif #define TWL6040_CODEC_IRQ_END (TWL6040_CODEC_IRQ_BASE + TWL6040_CODEC_NR_IRQS) /* Total number of interrupts depends on the enabled blocks above */ /* Total number of interrupts depends on the enabled blocks above */ #if (TWL4030_GPIO_IRQ_END > TWL6030_IRQ_END) #if (TWL4030_GPIO_IRQ_END > TWL6040_CODEC_IRQ_END) #define TWL_IRQ_END TWL4030_GPIO_IRQ_END #define TWL_IRQ_END TWL4030_GPIO_IRQ_END #else #else #define TWL_IRQ_END TWL6030_IRQ_END #define TWL_IRQ_END TWL6040_CODEC_IRQ_END #endif #endif /* GPMC related */ /* GPMC related */ Loading