Skip to content

Commit 4ae6df5

Browse files
author
Peter Ujfalusi
committed
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>
1 parent 57fe725 commit 4ae6df5

9 files changed

Lines changed: 32 additions & 32 deletions

File tree

‎arch/arm/mach-omap2/board-rx51-peripherals.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -741,11 +741,11 @@ static struct twl4030_power_data rx51_t2scripts_data __initdata = {
741741
.resource_config = twl4030_rconfig,
742742
};
743743

744-
struct twl4030_codec_vibra_data rx51_vibra_data __initdata = {
744+
struct twl4030_vibra_data rx51_vibra_data __initdata = {
745745
.coexist = 0,
746746
};
747747

748-
struct twl4030_codec_data rx51_codec_data __initdata = {
748+
struct twl4030_audio_data rx51_audio_data __initdata = {
749749
.audio_mclk = 26000000,
750750
.vibra = &rx51_vibra_data,
751751
};
@@ -755,7 +755,7 @@ static struct twl4030_platform_data rx51_twldata __initdata = {
755755
.gpio = &rx51_gpio_data,
756756
.keypad = &rx51_kp_data,
757757
.power = &rx51_t2scripts_data,
758-
.codec = &rx51_codec_data,
758+
.audio = &rx51_audio_data,
759759

760760
.vaux1 = &rx51_vaux1,
761761
.vaux2 = &rx51_vaux2,

‎arch/arm/mach-omap2/board-zoom-peripherals.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,12 @@ static int __init omap_i2c_init(void)
274274
TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
275275

276276
if (machine_is_omap_zoom2()) {
277-
struct twl4030_codec_audio_data *audio_data;
278-
audio_data = zoom_twldata.codec->audio;
277+
struct twl4030_codec_data *codec_data;
278+
codec_data = zoom_twldata.audio->codec;
279279

280-
audio_data->ramp_delay_value = 3; /* 161 ms */
281-
audio_data->hs_extmute = 1;
282-
audio_data->set_hs_extmute = zoom2_set_hs_extmute;
280+
codec_data->ramp_delay_value = 3; /* 161 ms */
281+
codec_data->hs_extmute = 1;
282+
codec_data->set_hs_extmute = zoom2_set_hs_extmute;
283283
}
284284
omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata);
285285
omap_register_i2c_bus(2, 400, NULL, 0);

‎arch/arm/mach-omap2/twl-common.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ static struct twl4030_madc_platform_data omap3_madc_pdata = {
8080
.irq_line = 1,
8181
};
8282

83-
static struct twl4030_codec_audio_data omap3_audio;
83+
static struct twl4030_codec_data omap3_codec;
8484

85-
static struct twl4030_codec_data omap3_codec_pdata = {
85+
static struct twl4030_audio_data omap3_audio_pdata = {
8686
.audio_mclk = 26000000,
87-
.audio = &omap3_audio,
87+
.codec = &omap3_codec,
8888
};
8989

9090
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,
292292
if (pdata_flags & TWL_COMMON_PDATA_MADC && !pmic_data->madc)
293293
pmic_data->madc = &omap3_madc_pdata;
294294

295-
if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->codec)
296-
pmic_data->codec = &omap3_codec_pdata;
295+
if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->audio)
296+
pmic_data->audio = &omap3_audio_pdata;
297297

298298
/* Common regulator configurations */
299299
if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)

‎drivers/input/misc/twl4030-vibra.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops,
196196

197197
static int __devinit twl4030_vibra_probe(struct platform_device *pdev)
198198
{
199-
struct twl4030_codec_vibra_data *pdata = pdev->dev.platform_data;
199+
struct twl4030_vibra_data *pdata = pdev->dev.platform_data;
200200
struct vibra_info *info;
201201
int ret;
202202

‎drivers/mfd/twl-core.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -815,20 +815,20 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
815815
return PTR_ERR(child);
816816
}
817817

818-
if (twl_has_codec() && pdata->codec && twl_class_is_4030()) {
818+
if (twl_has_codec() && pdata->audio && twl_class_is_4030()) {
819819
sub_chip_id = twl_map[TWL_MODULE_AUDIO_VOICE].sid;
820820
child = add_child(sub_chip_id, "twl4030-audio",
821-
pdata->codec, sizeof(*pdata->codec),
821+
pdata->audio, sizeof(*pdata->audio),
822822
false, 0, 0);
823823
if (IS_ERR(child))
824824
return PTR_ERR(child);
825825
}
826826

827827
/* 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()) {
829829
sub_chip_id = twl_map[TWL_MODULE_AUDIO_VOICE].sid;
830830
child = add_child(sub_chip_id, "twl6040-codec",
831-
pdata->codec, sizeof(*pdata->codec),
831+
pdata->audio, sizeof(*pdata->audio),
832832
false, 0, 0);
833833
if (IS_ERR(child))
834834
return PTR_ERR(child);

‎drivers/mfd/twl4030-audio.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ EXPORT_SYMBOL_GPL(twl4030_audio_get_mclk);
159159
static int __devinit twl4030_audio_probe(struct platform_device *pdev)
160160
{
161161
struct twl4030_audio *audio;
162-
struct twl4030_codec_data *pdata = pdev->dev.platform_data;
162+
struct twl4030_audio_data *pdata = pdev->dev.platform_data;
163163
struct mfd_cell *cell = NULL;
164164
int ret, childs = 0;
165165
u8 val;
@@ -206,11 +206,11 @@ static int __devinit twl4030_audio_probe(struct platform_device *pdev)
206206
audio->resource[TWL4030_AUDIO_RES_APLL].reg = TWL4030_REG_APLL_CTL;
207207
audio->resource[TWL4030_AUDIO_RES_APLL].mask = TWL4030_APLL_EN;
208208

209-
if (pdata->audio) {
209+
if (pdata->codec) {
210210
cell = &audio->cells[childs];
211211
cell->name = "twl4030-codec";
212-
cell->platform_data = pdata->audio;
213-
cell->pdata_size = sizeof(*pdata->audio);
212+
cell->platform_data = pdata->codec;
213+
cell->pdata_size = sizeof(*pdata->codec);
214214
childs++;
215215
}
216216
if (pdata->vibra) {

‎include/linux/i2c/twl.h‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ struct twl4030_power_data {
657657
extern void twl4030_power_init(struct twl4030_power_data *triton2_scripts);
658658
extern int twl4030_remove_script(u8 flags);
659659

660-
struct twl4030_codec_audio_data {
660+
struct twl4030_codec_data {
661661
unsigned int digimic_delay; /* in ms */
662662
unsigned int ramp_delay_value;
663663
unsigned int offset_cncl_path;
@@ -667,14 +667,14 @@ struct twl4030_codec_audio_data {
667667
void (*set_hs_extmute)(int mute);
668668
};
669669

670-
struct twl4030_codec_vibra_data {
670+
struct twl4030_vibra_data {
671671
unsigned int coexist;
672672
};
673673

674-
struct twl4030_codec_data {
674+
struct twl4030_audio_data {
675675
unsigned int audio_mclk;
676-
struct twl4030_codec_audio_data *audio;
677-
struct twl4030_codec_vibra_data *vibra;
676+
struct twl4030_codec_data *codec;
677+
struct twl4030_vibra_data *vibra;
678678

679679
/* twl6040 */
680680
int audpwron_gpio; /* audio power-on gpio */
@@ -690,7 +690,7 @@ struct twl4030_platform_data {
690690
struct twl4030_keypad_data *keypad;
691691
struct twl4030_usb_data *usb;
692692
struct twl4030_power_data *power;
693-
struct twl4030_codec_data *codec;
693+
struct twl4030_audio_data *audio;
694694

695695
/* Common LDO regulators for TWL4030/TWL6030 */
696696
struct regulator_init_data *vdac;

‎sound/soc/codecs/twl4030.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ static inline void twl4030_reset_registers(struct snd_soc_codec *codec)
297297

298298
static void twl4030_init_chip(struct snd_soc_codec *codec)
299299
{
300-
struct twl4030_codec_audio_data *pdata = dev_get_platdata(codec->dev);
300+
struct twl4030_codec_data *pdata = dev_get_platdata(codec->dev);
301301
struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec);
302302
u8 reg, byte;
303303
int i = 0;
@@ -732,7 +732,7 @@ static int aif_event(struct snd_soc_dapm_widget *w,
732732

733733
static void headset_ramp(struct snd_soc_codec *codec, int ramp)
734734
{
735-
struct twl4030_codec_audio_data *pdata = codec->dev->platform_data;
735+
struct twl4030_codec_data *pdata = codec->dev->platform_data;
736736
unsigned char hs_gain, hs_pop;
737737
struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec);
738738
/* Base values for ramp delay calculation: 2^19 - 2^26 */
@@ -2297,7 +2297,7 @@ static struct snd_soc_codec_driver soc_codec_dev_twl4030 = {
22972297

22982298
static int __devinit twl4030_codec_probe(struct platform_device *pdev)
22992299
{
2300-
struct twl4030_codec_audio_data *pdata = pdev->dev.platform_data;
2300+
struct twl4030_codec_data *pdata = pdev->dev.platform_data;
23012301

23022302
if (!pdata) {
23032303
dev_err(&pdev->dev, "platform_data is missing\n");

‎sound/soc/codecs/twl6040.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1600,7 +1600,7 @@ static int twl6040_resume(struct snd_soc_codec *codec)
16001600

16011601
static int twl6040_probe(struct snd_soc_codec *codec)
16021602
{
1603-
struct twl4030_codec_data *twl_codec = codec->dev->platform_data;
1603+
struct twl4030_audio_data *twl_codec = codec->dev->platform_data;
16041604
struct twl6040_data *priv;
16051605
int audpwron, naudint;
16061606
int ret = 0;

0 commit comments

Comments
 (0)