diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-05-31 08:21:13 -0400 |
---|---|---|
committer | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-07-04 11:44:02 -0400 |
commit | 4ae6df5e1018796ce260be59b2c603bd0f9faa94 (patch) | |
tree | 0a673e318826a51ce2660ed7e978eaa6e64fc6d6 | |
parent | 57fe7251f5bfc4332f24479376de48a1e8ca6211 (diff) |
MFD: twl4030-audio: Rename platform data
Allign the platform data names for twl4030 audio submodule:
twl4030_audio_data: for the core MFD driver
twl4030_codec_data: for ASoC codec driver
twl4030_vibra_data: for the input/ForceFeedback driver
To avoid breakage, change all depending drivers, files
to use the new types.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r-- | arch/arm/mach-omap2/board-rx51-peripherals.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-zoom-peripherals.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/twl-common.c | 10 | ||||
-rw-r--r-- | drivers/input/misc/twl4030-vibra.c | 2 | ||||
-rw-r--r-- | drivers/mfd/twl-core.c | 8 | ||||
-rw-r--r-- | drivers/mfd/twl4030-audio.c | 8 | ||||
-rw-r--r-- | include/linux/i2c/twl.h | 12 | ||||
-rw-r--r-- | sound/soc/codecs/twl4030.c | 6 | ||||
-rw-r--r-- | sound/soc/codecs/twl6040.c | 2 |
9 files changed, 32 insertions, 32 deletions
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 | ||
744 | struct twl4030_codec_vibra_data rx51_vibra_data __initdata = { | 744 | struct twl4030_vibra_data rx51_vibra_data __initdata = { |
745 | .coexist = 0, | 745 | .coexist = 0, |
746 | }; | 746 | }; |
747 | 747 | ||
748 | struct twl4030_codec_data rx51_codec_data __initdata = { | 748 | struct 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 | ||
83 | static struct twl4030_codec_audio_data omap3_audio; | 83 | static struct twl4030_codec_data omap3_codec; |
84 | 84 | ||
85 | static struct twl4030_codec_data omap3_codec_pdata = { | 85 | static 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 | ||
90 | static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = { | 90 | static 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/drivers/input/misc/twl4030-vibra.c b/drivers/input/misc/twl4030-vibra.c index 7abca85b5a74..3c1a432c14dc 100644 --- a/drivers/input/misc/twl4030-vibra.c +++ b/drivers/input/misc/twl4030-vibra.c | |||
@@ -196,7 +196,7 @@ static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops, | |||
196 | 196 | ||
197 | static int __devinit twl4030_vibra_probe(struct platform_device *pdev) | 197 | static int __devinit twl4030_vibra_probe(struct platform_device *pdev) |
198 | { | 198 | { |
199 | struct twl4030_codec_vibra_data *pdata = pdev->dev.platform_data; | 199 | struct twl4030_vibra_data *pdata = pdev->dev.platform_data; |
200 | struct vibra_info *info; | 200 | struct vibra_info *info; |
201 | int ret; | 201 | int ret; |
202 | 202 | ||
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index b8f2a4e7f6e7..f9d7880fd638 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c | |||
@@ -815,20 +815,20 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features) | |||
815 | return PTR_ERR(child); | 815 | return PTR_ERR(child); |
816 | } | 816 | } |
817 | 817 | ||
818 | if (twl_has_codec() && pdata->codec && twl_class_is_4030()) { | 818 | if (twl_has_codec() && pdata->audio && twl_class_is_4030()) { |
819 | sub_chip_id = twl_map[TWL_MODULE_AUDIO_VOICE].sid; | 819 | sub_chip_id = twl_map[TWL_MODULE_AUDIO_VOICE].sid; |
820 | child = add_child(sub_chip_id, "twl4030-audio", | 820 | child = add_child(sub_chip_id, "twl4030-audio", |
821 | pdata->codec, sizeof(*pdata->codec), | 821 | pdata->audio, sizeof(*pdata->audio), |
822 | false, 0, 0); | 822 | false, 0, 0); |
823 | if (IS_ERR(child)) | 823 | if (IS_ERR(child)) |
824 | return PTR_ERR(child); | 824 | return PTR_ERR(child); |
825 | } | 825 | } |
826 | 826 | ||
827 | /* Phoenix codec driver is probed directly atm */ | 827 | /* Phoenix codec driver is probed directly atm */ |
828 | if (twl_has_codec() && pdata->codec && twl_class_is_6030()) { | 828 | if (twl_has_codec() && pdata->audio && twl_class_is_6030()) { |
829 | sub_chip_id = twl_map[TWL_MODULE_AUDIO_VOICE].sid; | 829 | sub_chip_id = twl_map[TWL_MODULE_AUDIO_VOICE].sid; |
830 | child = add_child(sub_chip_id, "twl6040-codec", | 830 | child = add_child(sub_chip_id, "twl6040-codec", |
831 | pdata->codec, sizeof(*pdata->codec), | 831 | pdata->audio, sizeof(*pdata->audio), |
832 | false, 0, 0); | 832 | false, 0, 0); |
833 | if (IS_ERR(child)) | 833 | if (IS_ERR(child)) |
834 | return PTR_ERR(child); | 834 | return PTR_ERR(child); |
diff --git a/drivers/mfd/twl4030-audio.c b/drivers/mfd/twl4030-audio.c index 5cdf84146799..ae51ab5d0e5d 100644 --- a/drivers/mfd/twl4030-audio.c +++ b/drivers/mfd/twl4030-audio.c | |||
@@ -159,7 +159,7 @@ EXPORT_SYMBOL_GPL(twl4030_audio_get_mclk); | |||
159 | static int __devinit twl4030_audio_probe(struct platform_device *pdev) | 159 | static int __devinit twl4030_audio_probe(struct platform_device *pdev) |
160 | { | 160 | { |
161 | struct twl4030_audio *audio; | 161 | struct twl4030_audio *audio; |
162 | struct twl4030_codec_data *pdata = pdev->dev.platform_data; | 162 | struct twl4030_audio_data *pdata = pdev->dev.platform_data; |
163 | struct mfd_cell *cell = NULL; | 163 | struct mfd_cell *cell = NULL; |
164 | int ret, childs = 0; | 164 | int ret, childs = 0; |
165 | u8 val; | 165 | u8 val; |
@@ -206,11 +206,11 @@ static int __devinit twl4030_audio_probe(struct platform_device *pdev) | |||
206 | audio->resource[TWL4030_AUDIO_RES_APLL].reg = TWL4030_REG_APLL_CTL; | 206 | audio->resource[TWL4030_AUDIO_RES_APLL].reg = TWL4030_REG_APLL_CTL; |
207 | audio->resource[TWL4030_AUDIO_RES_APLL].mask = TWL4030_APLL_EN; | 207 | audio->resource[TWL4030_AUDIO_RES_APLL].mask = TWL4030_APLL_EN; |
208 | 208 | ||
209 | if (pdata->audio) { | 209 | if (pdata->codec) { |
210 | cell = &audio->cells[childs]; | 210 | cell = &audio->cells[childs]; |
211 | cell->name = "twl4030-codec"; | 211 | cell->name = "twl4030-codec"; |
212 | cell->platform_data = pdata->audio; | 212 | cell->platform_data = pdata->codec; |
213 | cell->pdata_size = sizeof(*pdata->audio); | 213 | cell->pdata_size = sizeof(*pdata->codec); |
214 | childs++; | 214 | childs++; |
215 | } | 215 | } |
216 | if (pdata->vibra) { | 216 | if (pdata->vibra) { |
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index ba4f88624fcd..e0aba2b92fa1 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
@@ -657,7 +657,7 @@ struct twl4030_power_data { | |||
657 | extern void twl4030_power_init(struct twl4030_power_data *triton2_scripts); | 657 | extern void twl4030_power_init(struct twl4030_power_data *triton2_scripts); |
658 | extern int twl4030_remove_script(u8 flags); | 658 | extern int twl4030_remove_script(u8 flags); |
659 | 659 | ||
660 | struct twl4030_codec_audio_data { | 660 | struct twl4030_codec_data { |
661 | unsigned int digimic_delay; /* in ms */ | 661 | unsigned int digimic_delay; /* in ms */ |
662 | unsigned int ramp_delay_value; | 662 | unsigned int ramp_delay_value; |
663 | unsigned int offset_cncl_path; | 663 | unsigned int offset_cncl_path; |
@@ -667,14 +667,14 @@ struct twl4030_codec_audio_data { | |||
667 | void (*set_hs_extmute)(int mute); | 667 | void (*set_hs_extmute)(int mute); |
668 | }; | 668 | }; |
669 | 669 | ||
670 | struct twl4030_codec_vibra_data { | 670 | struct twl4030_vibra_data { |
671 | unsigned int coexist; | 671 | unsigned int coexist; |
672 | }; | 672 | }; |
673 | 673 | ||
674 | struct twl4030_codec_data { | 674 | struct twl4030_audio_data { |
675 | unsigned int audio_mclk; | 675 | unsigned int audio_mclk; |
676 | struct twl4030_codec_audio_data *audio; | 676 | struct twl4030_codec_data *codec; |
677 | struct twl4030_codec_vibra_data *vibra; | 677 | struct twl4030_vibra_data *vibra; |
678 | 678 | ||
679 | /* twl6040 */ | 679 | /* twl6040 */ |
680 | int audpwron_gpio; /* audio power-on gpio */ | 680 | int audpwron_gpio; /* audio power-on gpio */ |
@@ -690,7 +690,7 @@ struct twl4030_platform_data { | |||
690 | struct twl4030_keypad_data *keypad; | 690 | struct twl4030_keypad_data *keypad; |
691 | struct twl4030_usb_data *usb; | 691 | struct twl4030_usb_data *usb; |
692 | struct twl4030_power_data *power; | 692 | struct twl4030_power_data *power; |
693 | struct twl4030_codec_data *codec; | 693 | struct twl4030_audio_data *audio; |
694 | 694 | ||
695 | /* Common LDO regulators for TWL4030/TWL6030 */ | 695 | /* Common LDO regulators for TWL4030/TWL6030 */ |
696 | struct regulator_init_data *vdac; | 696 | struct regulator_init_data *vdac; |
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index 5e648d33d559..71674bec9604 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c | |||
@@ -297,7 +297,7 @@ static inline void twl4030_reset_registers(struct snd_soc_codec *codec) | |||
297 | 297 | ||
298 | static void twl4030_init_chip(struct snd_soc_codec *codec) | 298 | static void twl4030_init_chip(struct snd_soc_codec *codec) |
299 | { | 299 | { |
300 | struct twl4030_codec_audio_data *pdata = dev_get_platdata(codec->dev); | 300 | struct twl4030_codec_data *pdata = dev_get_platdata(codec->dev); |
301 | struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); | 301 | struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); |
302 | u8 reg, byte; | 302 | u8 reg, byte; |
303 | int i = 0; | 303 | int i = 0; |
@@ -732,7 +732,7 @@ static int aif_event(struct snd_soc_dapm_widget *w, | |||
732 | 732 | ||
733 | static void headset_ramp(struct snd_soc_codec *codec, int ramp) | 733 | static void headset_ramp(struct snd_soc_codec *codec, int ramp) |
734 | { | 734 | { |
735 | struct twl4030_codec_audio_data *pdata = codec->dev->platform_data; | 735 | struct twl4030_codec_data *pdata = codec->dev->platform_data; |
736 | unsigned char hs_gain, hs_pop; | 736 | unsigned char hs_gain, hs_pop; |
737 | struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); | 737 | struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); |
738 | /* Base values for ramp delay calculation: 2^19 - 2^26 */ | 738 | /* Base values for ramp delay calculation: 2^19 - 2^26 */ |
@@ -2297,7 +2297,7 @@ static struct snd_soc_codec_driver soc_codec_dev_twl4030 = { | |||
2297 | 2297 | ||
2298 | static int __devinit twl4030_codec_probe(struct platform_device *pdev) | 2298 | static int __devinit twl4030_codec_probe(struct platform_device *pdev) |
2299 | { | 2299 | { |
2300 | struct twl4030_codec_audio_data *pdata = pdev->dev.platform_data; | 2300 | struct twl4030_codec_data *pdata = pdev->dev.platform_data; |
2301 | 2301 | ||
2302 | if (!pdata) { | 2302 | if (!pdata) { |
2303 | dev_err(&pdev->dev, "platform_data is missing\n"); | 2303 | dev_err(&pdev->dev, "platform_data is missing\n"); |
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index 4c336636d4f5..ade6616bb790 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c | |||
@@ -1600,7 +1600,7 @@ static int twl6040_resume(struct snd_soc_codec *codec) | |||
1600 | 1600 | ||
1601 | static int twl6040_probe(struct snd_soc_codec *codec) | 1601 | static int twl6040_probe(struct snd_soc_codec *codec) |
1602 | { | 1602 | { |
1603 | struct twl4030_codec_data *twl_codec = codec->dev->platform_data; | 1603 | struct twl4030_audio_data *twl_codec = codec->dev->platform_data; |
1604 | struct twl6040_data *priv; | 1604 | struct twl6040_data *priv; |
1605 | int audpwron, naudint; | 1605 | int audpwron, naudint; |
1606 | int ret = 0; | 1606 | int ret = 0; |