mfd: Use mfd cell platform_data for ab3550 cells platform bits
Subsystems (25)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/19 mfd: Use mfd cell platform_data for ab3550 cells platform bits
With the addition of a platform device mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.
--- drivers/mfd/ab3550-core.c | 6 ++++-- include/linux/mfd/abx500.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-)
drivers/mfd/ab3550-core.c +4 -2
@@ -1320,8 +1320,10 @@ static int __init ab3550_probe(struct i2c_client *client, goto exit_no_ops;/* Set up and register the platform devices. */ -for (i =0 ; i <AB3550_NUM_DEVICES ; i++) - ab3550_devs[i].mfd_data = ab3550_plf_data->dev_data[i]; +for (i =0 ; i <AB3550_NUM_DEVICES ; i++) { + ab3550_devs[i].platform_data = ab3550_plf_data->dev_data[i]; + ab3550_devs[i].pdata_size = ab3550_plf_data->dev_data_sz[i]; + } err = mfd_add_devices(&client->dev, 0, ab3550_devs, ARRAY_SIZE(ab3550_devs), NULL,
include/linux/mfd/abx500.h +1 -0
@@ -186,6 +186,7 @@ struct abx500_init_settings {struct ab3550_platform_data {struct {unsigned int base;unsigned int count; } irq;void *dev_data[AB3550_NUM_DEVICES ]; +size_t dev_data_sz[AB3550_NUM_DEVICES ];struct abx500_init_settings *init_settings;unsigned int init_settings_sz; };
Signature · 1 line
1.7.2.3
2011/5/9 Samuel Ortiz <[email protected]>:
Quoted 7 lines
With the addition of a platform device
mfd_cellpointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for anmfd_cell->mfd_dataremoval and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.Cc Linus Walleij <[email protected]>Signed-off-by Samuel Ortiz <[email protected]>
I was always just puzzled by that stuff anyway...
Thanks,
Linus Walleij
PATCH 3/19 mfd: Use mfd cell platform_data for ab3100 cells platform bits
In reply to a message not in the archiveWith the addition of a platform device mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.
--- drivers/mfd/ab3100-core.c | 6 ++++-- drivers/regulator/ab3100.c | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/mfd/ab3100-core.c +4 -2
@@ -949,8 +949,10 @@ static int __devinit ab3100_probe(struct i2c_client *client, goto exit_no_ops;/* Set up and register the platform devices. */ -for (i =0 ; i <ARRAY_SIZE (ab3100_devs); i++) - ab3100_devs[i].mfd_data = ab3100_plf_data; +for (i =0 ; i <ARRAY_SIZE (ab3100_devs); i++) { + ab3100_devs[i].platform_data = ab3100_plf_data; + ab3100_devs[i].pdata_size =sizeof (struct ab3100_platform_data ); + } err =mfd_add_devices (&client->dev,0 , ab3100_devs,ARRAY_SIZE (ab3100_devs),NULL ,0 );
drivers/regulator/ab3100.c +1 -2
@@ -17,7 +17,6 @@#include <linux/platform_device.h> #include <linux/regulator/driver.h> #include <linux/mfd/abx500.h> -#include <linux/mfd/core.h> /* LDO registers and some handy masking definitions for AB3100 */ #define AB3100_LDO_A 0x40
@@ -582,7 +581,7 @@ ab3100_regulator_desc[AB3100_NUM_REGULATORS] = {static int __devinit ab3100_regulators_probe (struct platform_device *pdev) { -struct ab3100_platform_data *plfdata =mfd_get_data (pdev); +struct ab3100_platform_data *plfdata = pdev->dev.platform_data;int err =0 ;u8 data;int i;
Signature · 1 line
1.7.2.3
Re: [PATCH 03/19] mfd: Use mfd cell platform_data for ab3100 cells platform bits
2011/5/9 Samuel Ortiz <[email protected]>:
Quoted 7 lines
With the addition of a platform device
mfd_cellpointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for anmfd_cell->mfd_dataremoval and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.Cc Linus Walleij <[email protected]>Signed-off-by Samuel Ortiz <[email protected]>
Thanks,
Linus Walleij
PATCH 4/19 mmc: Use device platform_data to retrieve tmio_mmc platform bits
In reply to a message not in the archiveWith the addition of the platform device mfd_cell pointer, we can now cleanly pass the sub device drivers platform data pointers through the regular device platform_data one, and get rid of mfd_get_data()
--- drivers/mfd/asic3.c | 3 ++- drivers/mfd/t7l66xb.c | 3 ++- drivers/mfd/tc6387xb.c | 3 ++- drivers/mfd/tc6393xb.c | 3 ++- drivers/mmc/host/tmio_mmc.c | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-)
drivers/mfd/asic3.c +2 -1
@@ -777,7 +777,8 @@ static struct mfd_cell asic3_cell_mmc = { .name = "tmio-mmc", .enable = asic3_mmc_enable, .disable = asic3_mmc_disable, - .mfd_data = &asic3_mmc_data, + .platform_data = &asic3_mmc_data, + .pdata_size = sizeof(asic3_mmc_data), .num_resources = ARRAY_SIZE(asic3_mmc_resources), .resources = asic3_mmc_resources, };
drivers/mfd/t7l66xb.c +2 -1
@@ -170,7 +170,8 @@ static struct mfd_cell t7l66xb_cells[] = { .name = "tmio-mmc", .enable = t7l66xb_mmc_enable, .disable = t7l66xb_mmc_disable, - .mfd_data = &t7166xb_mmc_data, + .platform_data = &t7166xb_mmc_data, + .pdata_size = sizeof(t7166xb_mmc_data), .num_resources = ARRAY_SIZE(t7l66xb_mmc_resources), .resources = t7l66xb_mmc_resources, },
drivers/mfd/tc6387xb.c +2 -1
@@ -131,7 +131,8 @@ static struct mfd_cell tc6387xb_cells[] = { .name = "tmio-mmc", .enable = tc6387xb_mmc_enable, .disable = tc6387xb_mmc_disable, - .mfd_data = &tc6387xb_mmc_data, + .platform_data = &tc6387xb_mmc_data, + .pdata_size = sizeof(tc6387xb_mmc_data), .num_resources = ARRAY_SIZE(tc6387xb_mmc_resources), .resources = tc6387xb_mmc_resources, },
drivers/mfd/tc6393xb.c +2 -1
@@ -393,7 +393,8 @@ static struct mfd_cell __devinitdata tc6393xb_cells[] = { .name = "tmio-mmc", .enable = tc6393xb_mmc_enable, .resume = tc6393xb_mmc_resume, - .mfd_data = &tc6393xb_mmc_data, + .platform_data = &tc6393xb_mmc_data, + .pdata_size = sizeof(tc6393xb_mmc_data), .num_resources = ARRAY_SIZE(tc6393xb_mmc_resources), .resources = tc6393xb_mmc_resources, },
drivers/mmc/host/tmio_mmc.c +1 -1
@@ -72,7 +72,7 @@ static int __devinit tmio_mmc_probe(struct platform_device *pdev)if (pdev->num_resources !=2 ) goto out; - pdata =mfd_get_data (pdev); + pdata = pdev->dev.platform_data;if (!pdata || !pdata->hclk) goto out;
Signature · 1 line
1.7.2.3
PATCH 5/19 w1: Use device platform_data to retrieve ds1wm platform bits
In reply to a message not in the archiveWith the addition of the platform device mfd_cell pointer, we can now cleanly pass the sub device drivers platform data pointers through the regular device platform_data one, and get rid of mfd_get_data().
--- drivers/mfd/asic3.c | 3 ++- drivers/mfd/htc-pasic3.c | 3 ++- drivers/w1/masters/ds1wm.c | 12 ++++++++++-- 3 files changed, 14 insertions(+), 4 deletions(-)
drivers/mfd/asic3.c +2 -1
@@ -676,7 +676,8 @@ static struct mfd_cell asic3_cell_ds1wm = { .name = "ds1wm", .enable = ds1wm_enable, .disable = ds1wm_disable, - .mfd_data = &ds1wm_pdata, + .platform_data = &ds1wm_pdata, + .pdata_size = sizeof(ds1wm_pdata), .num_resources = ARRAY_SIZE(ds1wm_resources), .resources = ds1wm_resources, };
drivers/mfd/htc-pasic3.c +2 -1
@@ -117,7 +117,8 @@ static struct mfd_cell ds1wm_cell __initdata = { .name = "ds1wm", .enable = ds1wm_enable, .disable = ds1wm_disable, - .mfd_data = &ds1wm_pdata, + .platform_data = &ds1wm_pdata, + .pdata_size = sizeof(ds1wm_pdata), .num_resources = 2, .resources = ds1wm_resources, };
drivers/w1/masters/ds1wm.c +10 -2
@@ -216,7 +216,7 @@ static int ds1wm_find_divisor(int gclk)static void ds1wm_up (struct ds1wm_data *ds1wm_data) {int divisor; -struct ds1wm_driver_data *plat =mfd_get_data (ds1wm_data->pdev); +struct ds1wm_driver_data *plat = ds1wm_data->pdev->dev.platform_data;if (ds1wm_data->cell->enable) ds1wm_data->cell->enable (ds1wm_data->pdev);
@@ -351,13 +351,21 @@ static int ds1wm_probe(struct platform_device *pdev) ret = -ENOMEM ; goto err0; } - plat =mfd_get_data (pdev);/* calculate bus shift from mem resource */ ds1wm_data->bus_shift =resource_size (res) >>3 ; ds1wm_data->pdev = pdev; ds1wm_data->cell =mfd_get_cell (pdev); +if (!ds1wm_data->cell) { + ret = -ENODEV ; + goto err1; + } + plat = pdev->dev.platform_data; +if (!plat) { + ret = -ENODEV ; + goto err1; + } res =platform_get_resource (pdev,IORESOURCE_IRQ ,0 );if (!res) {
Signature · 1 line
1.7.2.3
PATCH 6/19 mfd: Pass htc-pasic3 led platform data through the cell platform_data
In reply to a message not in the archive--- drivers/mfd/htc-pasic3.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/mfd/htc-pasic3.c +2 -0
@@ -173,6 +173,8 @@ static int __init pasic3_probe(struct platform_device *pdev) }if (pdata && pdata->led_pdata) { + led_cell.platform_data = pdata->led_pdata; + led_cell.pdata_size =sizeof (struct pasic3_leds_machinfo ); ret =mfd_add_devices (&pdev->dev, pdev->id, &led_cell,1 , r,0 );if (ret <0 )dev_warn (dev,"failed to register LED device\n" );
Signature · 1 line
1.7.2.3
Re: [PATCH 06/19] mfd: Pass htc-pasic3 led platform data through the cell platform_data
Hi Samuel,
I presume an earlier post called "mfd: Remove mfd_data" provided the patch for struct mfd_cell. If so would you please forward it to the list since I have no visibility of the change. Perhaps linux-kernel bounced the original post?
Regards,
Paul
Quoted 21 lines · Samuel Ortiz
drivers/mfd/htc-pasic3.c +2
-0@@ -173,6 +173,8 @@ static int __init pasic3_probe(struct platform_device *pdev) } if (pdata && pdata->led_pdata) { + led_cell.platform_data = pdata->led_pdata; + led_cell.pdata_size=
sizeof(struct pasic3_leds_machinfo);
ret =
mfd_add_devices(&pdev->dev,pdev->id,&led_cell, 1, r, 0);
if (ret < 0)dev_warn(dev, "failed to register LED device\n");
Re: [PATCH 06/19] mfd: Pass htc-pasic3 led platform data through the cell platform_data
Hi Paul,
Quoted 4 lines · Paul Parsons
Hi Samuel,
I presume an earlier post called "mfd: Remove
mfd_data" provided the patch for structmfd_cell. If so would you please forward it to the list since I have no visibility of the change. Perhaps linux-kernel bounced the original post?
I just realized that it did, yes. Maybe the Cc list was too long. Anyway, I reposted it to lkml only:
http://lkml.org/lkml/2011/5/9/132
And http://lkml.org/lkml/2011/5/9/131 for the cover letter.
Cheers,
Samuel.
Quoted 26 lines
Regards,
PaulQuoted 21 lines · Samuel Ortiz
drivers/mfd/htc-pasic3.c +2
-0@@ -173,6 +173,8 @@ static int __init pasic3_probe(struct platform_device *pdev) } if (pdata && pdata->led_pdata) { + led_cell.platform_data = pdata->led_pdata; + led_cell.pdata_size=
sizeof(struct pasic3_leds_machinfo);
ret =
mfd_add_devices(&pdev->dev,pdev->id,&led_cell, 1, r, 0);
if (ret < 0)dev_warn(dev, "failed to register LED device\n");
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/
PATCH 7/19 mfd: Use mfd cell platform_data for wl1273 cells platform bits
In reply to a message not in the archiveWith the addition of a platform device mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.
--- drivers/media/radio/radio-wl1273.c | 2 +- drivers/mfd/wl1273-core.c | 6 ++++-- sound/soc/codecs/wl1273.c | 3 +-- 3 files changed, 6 insertions(+), 5 deletions(-)
drivers/media/radio/radio-wl1273.c +1 -1
@@ -1990,7 +1990,7 @@ static int wl1273_fm_radio_remove(struct platform_device *pdev)static int __devinit wl1273_fm_radio_probe (struct platform_device *pdev) { -struct wl1273_core **core =mfd_get_data (pdev); +struct wl1273_core **core = pdev->dev.platform_data;struct wl1273_device *radio;struct v4l2_ctrl *ctrl;int r =0 ;
drivers/mfd/wl1273-core.c +4 -2
@@ -217,7 +217,8 @@ static int __devinit wl1273_core_probe(struct i2c_client *client, cell = &core->cells[children]; cell->name ="wl1273_fm_radio" ; - cell->mfd_data = &core; + cell->platform_data = &core; + cell->pdata_size =sizeof (core); children++; core->read = wl1273_fm_read_reg;
@@ -231,7 +232,8 @@ static int __devinit wl1273_core_probe(struct i2c_client *client,dev_dbg (&client->dev,"%s: Have codec.\n" , __func__); cell->name ="wl1273-codec" ; - cell->mfd_data = &core; + cell->platform_data = &core; + cell->pdata_size =sizeof (core); children++; }
sound/soc/codecs/wl1273.c +1 -2
@@ -441,8 +441,7 @@ EXPORT_SYMBOL_GPL(wl1273_get_format);static int wl1273_probe (struct snd_soc_codec *codec) { -struct wl1273_core **core = -mfd_get_data (to_platform_device (codec->dev)); +struct wl1273_core **core = codec->dev->platform_data;struct wl1273_priv *wl1273;int r;
Signature · 1 line
1.7.2.3
Re: [PATCH 07/19] mfd: Use mfd cell platform_data for wl1273 cells platform bits
Quoted 56 lines · ext Samuel Ortiz
With the addition of a platform device
mfd_cellpointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for anmfd_cell->mfd_dataremoval and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.Cc Matti Aaltonen <[email protected]>Signed-off-by Samuel Ortiz <[email protected]>--- drivers/media/radio/radio-wl1273.c | 2 +- drivers/mfd/wl1273-core.c | 6 ++++-- sound/soc/codecs/wl1273.c | 3 +-- 3 files changed, 6 insertions(+), 5 deletions(-)drivers/media/radio/radio-wl1273.c +1
-1@@ -1990,7 +1990,7 @@ static int wl1273_fm_radio_remove(struct platform_device *pdev)static int __devinit wl1273_fm_radio_probe (struct platform_device *pdev) { -struct wl1273_core **core =mfd_get_data (pdev); +struct wl1273_core **core = pdev->dev.platform_data;struct wl1273_device *radio;struct v4l2_ctrl *ctrl;int r =0 ;drivers/mfd/wl1273-core.c +4
-2@@ -217,7 +217,8 @@ static int __devinit wl1273_core_probe(struct i2c_client *client, cell = &core->cells[children]; cell->name ="wl1273_fm_radio" ; - cell->mfd_data = &core; + cell->platform_data = &core; + cell->pdata_size =sizeof (core); children++; core->read = wl1273_fm_read_reg;@@ -231,7 +232,8 @@ static int __devinit wl1273_core_probe(struct i2c_client *client,dev_dbg (&client->dev,"%s: Have codec.\n" , __func__); cell->name ="wl1273-codec" ; - cell->mfd_data = &core; + cell->platform_data = &core; + cell->pdata_size =sizeof (core); children++; }sound/soc/codecs/wl1273.c +0
-0
sound/soc/codecs/wl1273.c EXPORT_SYMBOL_GPL(wl1273_get_format); · line 447
Quoted 9 lines
sound/soc/codecs/wl1273.c +1
-2@@ -441,8 +441,7 @@ EXPORT_SYMBOL_GPL(wl1273_get_format);static int wl1273_probe (struct snd_soc_codec *codec) { -struct wl1273_core **core = -mfd_get_data (to_platform_device (codec->dev)); +struct wl1273_core **core = codec->dev->platform_data;struct wl1273_priv *wl1273;int r;
Looks good.
B.R.
Matti A.
PATCH 8/19 fb: Use platform_data to retrieve tmiofb platform bits
In reply to a message not in the archiveWith the addition of the platform device mfd_cell pointer, we can now cleanly pass the sub device drivers platform data pointers through the regular device platform_data one, and get rid of mfd_get_data().
--- drivers/mfd/tc6393xb.c | 3 ++- drivers/video/tmiofb.c | 12 +++++------- 2 files changed, 7 insertions(+), 8 deletions(-)
drivers/mfd/tc6393xb.c +2 -1
@@ -694,7 +694,8 @@ static int __devinit tc6393xb_probe(struct platform_device *dev) } tc6393xb_cells[TC6393XB_CELL_NAND ].mfd_data = tcpd->nand_data; - tc6393xb_cells[TC6393XB_CELL_FB ].mfd_data = tcpd->fb_data; + tc6393xb_cells[TC6393XB_CELL_FB ].platform_data = tcpd->fb_data; + tc6393xb_cells[TC6393XB_CELL_FB ].pdata_size =sizeof (*tcpd->fb_data); ret = mfd_add_devices(&dev->dev, dev->id, tc6393xb_cells, ARRAY_SIZE(tc6393xb_cells),
drivers/video/tmiofb.c +5 -7
@@ -250,7 +250,7 @@ static irqreturn_t tmiofb_irq(int irq, void *__info)*/ static int tmiofb_hw_stop (struct platform_device *dev) { -struct tmio_fb_data *data =mfd_get_data (dev); +struct tmio_fb_data *data = dev->dev.platform_data;struct fb_info *info =platform_get_drvdata (dev);struct tmiofb_par *par = info->par;
@@ -311,7 +311,7 @@ static int tmiofb_hw_init(struct platform_device *dev)*/ static void tmiofb_hw_mode (struct platform_device *dev) { -struct tmio_fb_data *data =mfd_get_data (dev); +struct tmio_fb_data *data = dev->dev.platform_data;struct fb_info *info =platform_get_drvdata (dev);struct fb_videomode *mode = info->mode;struct tmiofb_par *par = info->par;
@@ -557,8 +557,7 @@ static int tmiofb_ioctl(struct fb_info *fbi,static struct fb_videomode *tmiofb_find_mode (struct fb_info *info,struct fb_var_screeninfo *var) { -struct tmio_fb_data *data = -mfd_get_data (to_platform_device (info->device)); +struct tmio_fb_data *data = info->device->platform_data;struct fb_videomode *best =NULL ;int i;
@@ -578,8 +577,7 @@ static int tmiofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) {struct fb_videomode *mode; -struct tmio_fb_data *data = -mfd_get_data (to_platform_device (info->device)); +struct tmio_fb_data *data = info->device->platform_data; mode =tmiofb_find_mode (info, var);if (!mode || var->bits_per_pixel >16 )
@@ -680,7 +678,7 @@ static struct fb_ops tmiofb_ops = {static int __devinit tmiofb_probe (struct platform_device *dev) {const struct mfd_cell *cell =mfd_get_cell (dev); -struct tmio_fb_data *data =mfd_get_data (dev); +struct tmio_fb_data *data = dev->dev.platform_data;struct resource *ccr =platform_get_resource (dev,IORESOURCE_MEM ,1 );struct resource *lcr =platform_get_resource (dev,IORESOURCE_MEM ,0 );struct resource *vram =platform_get_resource (dev,IORESOURCE_MEM ,2 );
Signature · 1 line
1.7.2.3
PATCH 9/19 mtd: Use platform_data to retrieve tmio_nand platform bits
In reply to a message not in the archiveWith the addition of the platform device mfd_cell pointer, we can now cleanly pass the sub device drivers platform data pointers through the regular device platform_data one, and get rid of mfd_get_data().
--- drivers/mfd/t7l66xb.c | 3 ++- drivers/mfd/tc6393xb.c | 4 +++- drivers/mtd/nand/tmio_nand.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-)
drivers/mfd/t7l66xb.c +2 -1
@@ -383,7 +383,8 @@ static int t7l66xb_probe(struct platform_device *dev)t7l66xb_attach_irq (dev); - t7l66xb_cells[T7L66XB_CELL_NAND ].mfd_data = pdata->nand_data; + t7l66xb_cells[T7L66XB_CELL_NAND ].platform_data = pdata->nand_data; + t7l66xb_cells[T7L66XB_CELL_NAND ].pdata_size =sizeof (*pdata->nand_data); ret = mfd_add_devices(&dev->dev, dev->id, t7l66xb_cells, ARRAY_SIZE(t7l66xb_cells),
drivers/mfd/tc6393xb.c +3 -1
@@ -693,7 +693,9 @@ static int __devinit tc6393xb_probe(struct platform_device *dev) goto err_setup; } - tc6393xb_cells[TC6393XB_CELL_NAND ].mfd_data = tcpd->nand_data; + tc6393xb_cells[TC6393XB_CELL_NAND ].platform_data = tcpd->nand_data; + tc6393xb_cells[TC6393XB_CELL_NAND ].pdata_size = +sizeof (*tcpd->nand_data); tc6393xb_cells[TC6393XB_CELL_FB ].platform_data = tcpd->fb_data; tc6393xb_cells[TC6393XB_CELL_FB ].pdata_size =sizeof (*tcpd->fb_data);
drivers/mtd/nand/tmio_nand.c +1 -1
@@ -372,7 +372,7 @@ static void tmio_hw_stop(struct platform_device *dev, struct tmio_nand *tmio)static int tmio_probe (struct platform_device *dev) { -struct tmio_nand_data *data =mfd_get_data (dev); +struct tmio_nand_data *data = dev->dev.platform_data;struct resource *fcr =platform_get_resource (dev,IORESOURCE_MEM ,0 ); struct resource *ccr = platform_get_resource(dev,
Signature · 1 line
1.7.2.3
PATCH 10/19 mfd: Use mfd cell platform_data for timberdale cells platform bits
In reply to a message not in the archiveWith the addition of a device platform mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.
--- drivers/dma/timb_dma.c | 3 +- drivers/gpio/timbgpio.c | 6 +- drivers/i2c/busses/i2c-ocores.c | 3 +- drivers/i2c/busses/i2c-xiic.c | 3 +- drivers/media/radio/radio-timb.c | 3 +- drivers/media/video/timblogiw.c | 3 +- drivers/mfd/timberdale.c | 81 +++++++++++++++++++++++++------------- drivers/net/ks8842.c | 3 +- drivers/spi/xilinx_spi.c | 3 +- 9 files changed, 64 insertions(+), 44 deletions(-)
drivers/dma/timb_dma.c +1 -2
@@ -27,7 +27,6 @@#include <linux/io.h> #include <linux/module.h> #include <linux/platform_device.h> -#include <linux/mfd/core.h> #include <linux/slab.h> #include <linux/timb_dma.h>
@@ -685,7 +684,7 @@ static irqreturn_t td_irq(int irq, void *devid)static int __devinit td_probe (struct platform_device *pdev) { -struct timb_dma_platform_data *pdata =mfd_get_data (pdev); +struct timb_dma_platform_data *pdata = pdev->dev.platform_data;struct timb_dma *td;struct resource *iomem;int irq;
drivers/gpio/timbgpio.c +3 -3
@@ -23,7 +23,6 @@#include <linux/module.h> #include <linux/gpio.h> #include <linux/platform_device.h> -#include <linux/mfd/core.h> #include <linux/irq.h> #include <linux/io.h> #include <linux/timb_gpio.h>
@@ -229,7 +228,7 @@ static int __devinit timbgpio_probe(struct platform_device *pdev)struct gpio_chip *gc;struct timbgpio *tgpio;struct resource *iomem; -struct timbgpio_platform_data *pdata =mfd_get_data (pdev); +struct timbgpio_platform_data *pdata = pdev->dev.platform_data;int irq =platform_get_irq (pdev,0 );if (!pdata || pdata->nr_pins >32 ) {
@@ -320,13 +319,14 @@ err_mem: static int __devexit timbgpio_remove(struct platform_device *pdev) {int err; +struct timbgpio_platform_data *pdata = pdev->dev.platform_data;struct timbgpio *tgpio =platform_get_drvdata (pdev);struct resource *iomem =platform_get_resource (pdev,IORESOURCE_MEM ,0 );int irq =platform_get_irq (pdev,0 );if (irq >=0 && tgpio->irq_base >0 ) {int i; -for (i =0 ; i < tgpio->gpio.ngpio; i++) { +for (i =0 ; i < pdata->nr_pins; i++) {irq_set_chip (tgpio->irq_base + i,NULL );irq_set_chip_data (tgpio->irq_base + i,NULL ); }
drivers/i2c/busses/i2c-ocores.c +1 -2
@@ -49,7 +49,6 @@#include <linux/init.h> #include <linux/errno.h> #include <linux/platform_device.h> -#include <linux/mfd/core.h> #include <linux/i2c.h> #include <linux/interrupt.h> #include <linux/wait.h>
@@ -306,7 +305,7 @@ static int __devinit ocores_i2c_probe(struct platform_device *pdev)return -EIO ; } - pdata =mfd_get_data (pdev); + pdata = pdev->dev.platform_data;if (pdata) { i2c->regstep = pdata->regstep; i2c->clock_khz = pdata->clock_khz;
drivers/i2c/busses/i2c-xiic.c +1 -2
@@ -34,7 +34,6 @@#include <linux/errno.h> #include <linux/delay.h> #include <linux/platform_device.h> -#include <linux/mfd/core.h> #include <linux/i2c.h> #include <linux/interrupt.h> #include <linux/wait.h>
@@ -705,7 +704,7 @@ static int __devinit xiic_i2c_probe(struct platform_device *pdev)if (irq <0 ) goto resource_missing; - pdata =mfd_get_data (pdev); + pdata = (struct xiic_i2c_platform_data *) pdev->dev.platform_data;if (!pdata)return -EINVAL ;
drivers/media/radio/radio-timb.c +1 -2
@@ -21,7 +21,6 @@#include <media/v4l2-ioctl.h> #include <media/v4l2-device.h> #include <linux/platform_device.h> -#include <linux/mfd/core.h> #include <linux/interrupt.h> #include <linux/slab.h> #include <linux/i2c.h>
@@ -149,7 +148,7 @@ static const struct v4l2_file_operations timbradio_fops = {static int __devinit timbradio_probe (struct platform_device *pdev) { -struct timb_radio_platform_data *pdata =mfd_get_data (pdev); +struct timb_radio_platform_data *pdata = pdev->dev.platform_data;struct timbradio *tr;int err;
drivers/media/video/timblogiw.c +1 -2
@@ -24,7 +24,6 @@#include <linux/platform_device.h> #include <linux/slab.h> #include <linux/dmaengine.h> -#include <linux/mfd/core.h> #include <linux/scatterlist.h> #include <linux/interrupt.h> #include <linux/list.h>
@@ -791,7 +790,7 @@ static int __devinit timblogiw_probe(struct platform_device *pdev) {int err;struct timblogiw *lw =NULL ; -struct timb_video_platform_data *pdata =mfd_get_data (pdev); +struct timb_video_platform_data *pdata = pdev->dev.platform_data;if (!pdata) {dev_err (&pdev->dev,"No platform data\n" );
drivers/mfd/timberdale.c +54 -27
225 lines not on this page · raw message
drivers/net/ks8842.c +1 -2
@@ -26,7 +26,6 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/platform_device.h> -#include <linux/mfd/core.h> #include <linux/netdevice.h> #include <linux/etherdevice.h> #include <linux/ethtool.h>
@@ -1146,7 +1145,7 @@ static int __devinit ks8842_probe(struct platform_device *pdev)struct resource *iomem;struct net_device *netdev;struct ks8842_adapter *adapter; -struct ks8842_platform_data *pdata =mfd_get_data (pdev); +struct ks8842_platform_data *pdata = pdev->dev.platform_data;u16 id;unsigned i;
drivers/spi/xilinx_spi.c +1 -2
@@ -18,7 +18,6 @@#include <linux/interrupt.h> #include <linux/of.h> #include <linux/platform_device.h> -#include <linux/mfd/core.h> #include <linux/spi/spi.h> #include <linux/spi/spi_bitbang.h> #include <linux/spi/xilinx_spi.h>
@@ -471,7 +470,7 @@ static int __devinit xilinx_spi_probe(struct platform_device *dev)struct spi_master *master;u8 i; - pdata =mfd_get_data (dev); + pdata = dev->dev.platform_data;if (pdata) { num_cs = pdata->num_chipselect; little_endian = pdata->little_endian;
Signature · 1 line
1.7.2.3
PATCH 11/19 mfd: Use mfd cell platform_data for rdc321x cells platform bits
In reply to a message not in the archiveWith the addition of a platform device mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.
--- drivers/gpio/rdc321x-gpio.c | 3 +-- drivers/mfd/rdc321x-southbridge.c | 6 ++++-- drivers/watchdog/rdc321x_wdt.c | 3 +-- 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/gpio/rdc321x-gpio.c +1 -2
@@ -27,7 +27,6 @@#include <linux/pci.h> #include <linux/gpio.h> #include <linux/mfd/rdc321x.h> -#include <linux/mfd/core.h> #include <linux/slab.h> struct rdc321x_gpio {
@@ -136,7 +135,7 @@ static int __devinit rdc321x_gpio_probe(struct platform_device *pdev)struct rdc321x_gpio *rdc321x_gpio_dev;struct rdc321x_gpio_pdata *pdata; - pdata =mfd_get_data (pdev); + pdata = pdev->dev.platform_data;if (!pdata) {dev_err (&pdev->dev,"no platform data supplied\n" );return -ENODEV ;
drivers/mfd/rdc321x-southbridge.c +4 -2
@@ -61,12 +61,14 @@ static struct mfd_cell rdc321x_sb_cells[] = { .name = "rdc321x-wdt", .resources = rdc321x_wdt_resource, .num_resources = ARRAY_SIZE(rdc321x_wdt_resource), - .mfd_data = &rdc321x_wdt_pdata, + .platform_data = &rdc321x_wdt_pdata, + .pdata_size = sizeof(rdc321x_wdt_pdata), }, { .name = "rdc321x-gpio", .resources = rdc321x_gpio_resources, .num_resources = ARRAY_SIZE(rdc321x_gpio_resources), - .mfd_data = &rdc321x_gpio_pdata, + .platform_data = &rdc321x_gpio_pdata, + .pdata_size = sizeof(rdc321x_gpio_pdata), }, };
drivers/watchdog/rdc321x_wdt.c +1 -2
@@ -37,7 +37,6 @@#include <linux/io.h> #include <linux/uaccess.h> #include <linux/mfd/rdc321x.h> -#include <linux/mfd/core.h> #define RDC_WDT_MASK 0x80000000/* Mask */ #define RDC_WDT_EN 0x00800000/* Enable bit */
@@ -232,7 +231,7 @@ static int __devinit rdc321x_wdt_probe(struct platform_device *pdev)struct resource *r;struct rdc321x_wdt_pdata *pdata; - pdata =mfd_get_data (pdev); + pdata = pdev->dev.platform_data;if (!pdata) {dev_err (&pdev->dev,"no platform data supplied\n" );return -ENODEV ;
Signature · 1 line
1.7.2.3
PATCH 12/19 mfd: Use mfd cell platform_data for wm8400 cells platform bits
In reply to a message not in the archiveWith the addition of a platform device mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.
--- drivers/mfd/wm8400-core.c | 3 ++- sound/soc/codecs/wm8400.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/mfd/wm8400-core.c +2 -1
@@ -245,7 +245,8 @@ static int wm8400_register_codec(struct wm8400 *wm8400) {struct mfd_cell cell = { .name ="wm8400-codec" , - .mfd_data = wm8400, + .platform_data = wm8400, + .pdata_size =sizeof (*wm8400), };return mfd_add_devices (wm8400->dev,-1 , &cell,1 ,NULL ,0 );
sound/soc/codecs/wm8400.c +1 -1
@@ -1378,7 +1378,7 @@ static void wm8400_probe_deferred(struct work_struct *work)static int wm8400_codec_probe (struct snd_soc_codec *codec) { -struct wm8400 *wm8400 =mfd_get_data (to_platform_device (codec->dev)); +struct wm8400 *wm8400 = codec->dev->platform_data;struct wm8400_priv *priv;int ret;u16 reg;
Signature · 1 line
1.7.2.3
Re: [PATCH 12/19] mfd: Use mfd cell platform_data for wm8400 cells platform bits
sound/soc/codecs/wm8400.c static void wm8400_probe_deferred(struct work_struct *work) · line 1381
Quoted 4 lines · Samuel Ortiz
static int
wm8400_codec_probe(struct snd_soc_codec *codec){sound/soc/codecs/wm8400.c +1
-1-struct wm8400 *wm8400 =mfd_get_data (to_platform_device (codec->dev)); +struct wm8400 *wm8400 = codec->dev->platform_data;
It'd be better to use platform_get_drvdata() here rather than accessing the pointer directly.
Re: [PATCH 12/19] mfd: Use mfd cell platform_data for wm8400 cells platform bits
Hi Mark,
Quoted 9 lines · Mark Brown
sound/soc/codecs/wm8400.c static void wm8400_probe_deferred(struct work_struct *work) · line 1381
Quoted 4 lines · Samuel Ortiz
static int
wm8400_codec_probe(struct snd_soc_codec *codec){sound/soc/codecs/wm8400.c +1
-1-struct wm8400 *wm8400 =mfd_get_data (to_platform_device (codec->dev)); +struct wm8400 *wm8400 = codec->dev->platform_data;It'd be better to use
platform_get_drvdata()here rather than accessing the pointer directly.
Is the core codec code setting the driver_data pointer appropriately ?
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/
Re: [PATCH 12/19] mfd: Use mfd cell platform_data for wm8400 cells platform bits
Quoted 7 lines · Samuel Ortiz
Quoted 5 lines
sound/soc/codecs/wm8400.c static void wm8400_probe_deferred(struct work_struct *work) · line 1381
Quoted 2 lines
sound/soc/codecs/wm8400.c +1
-1-struct wm8400 *wm8400 =mfd_get_data (to_platform_device (codec->dev)); +struct wm8400 *wm8400 = codec->dev->platform_data;It'd be better to use
platform_get_drvdata()here rather than accessing the pointer directly.Is the core codec code setting the
driver_datapointer appropriately ?
Sorry, I meant _get_platdata().
PATCH 12/19 mfd: Use mfd cell platform_data for wm8400 cells platform bits
With the addition of a platform device mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.
---
v0 -> v1: Use dev_get_platdata instead of directly accessing the platform_data pointer.
--- drivers/mfd/wm8400-core.c | 3 ++- sound/soc/codecs/wm8400.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/mfd/wm8400-core.c +2 -1
@@ -245,7 +245,8 @@ static int wm8400_register_codec(struct wm8400 *wm8400) {struct mfd_cell cell = { .name ="wm8400-codec" , - .mfd_data = wm8400, + .platform_data = wm8400, + .pdata_size =sizeof (*wm8400), };return mfd_add_devices (wm8400->dev,-1 , &cell,1 ,NULL ,0 );
sound/soc/codecs/wm8400.c +1 -1
@@ -1378,7 +1378,7 @@ static void wm8400_probe_deferred(struct work_struct *work)static int wm8400_codec_probe (struct snd_soc_codec *codec) { -struct wm8400 *wm8400 =mfd_get_data (to_platform_device (codec->dev)); +struct wm8400 *wm8400 =dev_get_platdata (codec->dev);struct wm8400_priv *priv;int ret;u16 reg;
Signature · 5 lines
1.7.2.3 -- Intel Open Source Technology Centre http://oss.intel.com/
Re: [PATCH v1 12/19] mfd: Use mfd cell platform_data for wm8400 cells platform bits
Quoted 8 lines · Samuel Ortiz
With the addition of a platform device
mfd_cellpointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for anmfd_cell->mfd_dataremoval and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.Cc Mark Brown <[email protected]>Signed-off-by Samuel Ortiz <[email protected]>
PATCH 13/19 mfd: Use mfd cell platform_data for mc13xxx cells platform bits
In reply to a message not in the archiveWith the addition of a platform device mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.
--- drivers/leds/leds-mc13783.c | 7 +++---- drivers/mfd/mc13xxx-core.c | 12 +++++++----- drivers/regulator/mc13783-regulator.c | 7 ++++--- drivers/regulator/mc13892-regulator.c | 7 ++++--- 4 files changed, 18 insertions(+), 15 deletions(-)
drivers/leds/leds-mc13783.c +3 -4
@@ -22,7 +22,6 @@#include <linux/leds.h> #include <linux/workqueue.h> #include <linux/mfd/mc13783.h> -#include <linux/mfd/core.h> #include <linux/slab.h> struct mc13783_led {
@@ -184,7 +183,7 @@ static int __devinit mc13783_led_setup(struct mc13783_led *led, int max_current)static int __devinit mc13783_leds_prepare (struct platform_device *pdev) { -struct mc13783_leds_platform_data *pdata =mfd_get_data (pdev); +struct mc13783_leds_platform_data *pdata =dev_get_platdata (&pdev->dev);struct mc13783 *dev =dev_get_drvdata (pdev->dev.parent);int ret =0 ;int reg =0 ;
@@ -265,7 +264,7 @@ out:static int __devinit mc13783_led_probe (struct platform_device *pdev) { -struct mc13783_leds_platform_data *pdata =mfd_get_data (pdev); +struct mc13783_leds_platform_data *pdata =dev_get_platdata (&pdev->dev);struct mc13783_led_platform_data *led_cur;struct mc13783_led *led, *led_dat;int ret, i;
@@ -352,7 +351,7 @@ err_free: static int __devexit mc13783_led_remove(struct platform_device *pdev) { -struct mc13783_leds_platform_data *pdata =mfd_get_data (pdev); +struct mc13783_leds_platform_data *pdata =dev_get_platdata (&pdev->dev);struct mc13783_led *led =platform_get_drvdata (pdev);struct mc13783 *dev =dev_get_drvdata (pdev->dev.parent);int i;
drivers/mfd/mc13xxx-core.c +7 -5
@@ -683,13 +683,14 @@ out:EXPORT_SYMBOL_GPL (mc13783_adc_do_conversion);static int mc13xxx_add_subdevice_pdata (struct mc13xxx *mc13xxx, -const char *format,void *pdata) +const char *format,void *pdata,size_t pdata_size) {char buf[30 ];const char *name =mc13xxx_get_chipname (mc13xxx);struct mfd_cell cell = { - .mfd_data = pdata, + .platform_data = pdata, + .pdata_size = pdata_size, };/* there is no asnprintf in the kernel :-( */
@@ -705,7 +706,7 @@ static int mc13xxx_add_subdevice_pdata(struct mc13xxx *mc13xxx,static int mc13xxx_add_subdevice (struct mc13xxx *mc13xxx,const char *format) { -return mc13xxx_add_subdevice_pdata (mc13xxx, format,NULL ); +return mc13xxx_add_subdevice_pdata (mc13xxx, format,NULL ,0 ); }static int mc13xxx_probe (struct spi_device *spi)
@@ -764,7 +765,7 @@ err_revision:if (pdata->flags &MC13XXX_USE_REGULATOR ) {mc13xxx_add_subdevice_pdata (mc13xxx,"%s-regulator" , - &pdata->regulators); + &pdata->regulators,sizeof (pdata->regulators)); }if (pdata->flags &MC13XXX_USE_RTC )
@@ -774,7 +775,8 @@ err_revision:mc13xxx_add_subdevice (mc13xxx,"%s-ts" );if (pdata->flags &MC13XXX_USE_LED ) -mc13xxx_add_subdevice_pdata (mc13xxx,"%s-led" , pdata->leds); +mc13xxx_add_subdevice_pdata (mc13xxx,"%s-led" , + pdata->leds,sizeof (*pdata->leds));return 0 ; }
drivers/regulator/mc13783-regulator.c +4 -3
@@ -15,7 +15,6 @@#include <linux/regulator/driver.h> #include <linux/platform_device.h> #include <linux/kernel.h> -#include <linux/mfd/core.h> #include <linux/slab.h> #include <linux/init.h> #include <linux/err.h>
@@ -337,7 +336,8 @@ static int __devinit mc13783_regulator_probe(struct platform_device *pdev) {struct mc13xxx_regulator_priv *priv;struct mc13xxx *mc13783 =dev_get_drvdata (pdev->dev.parent); -struct mc13783_regulator_platform_data *pdata =mfd_get_data (pdev); +struct mc13783_regulator_platform_data *pdata = +dev_get_platdata (&pdev->dev);struct mc13783_regulator_init_data *init_data;int i, ret;
@@ -381,7 +381,8 @@ err: static int __devexit mc13783_regulator_remove(struct platform_device *pdev) {struct mc13xxx_regulator_priv *priv =platform_get_drvdata (pdev); -struct mc13783_regulator_platform_data *pdata =mfd_get_data (pdev); +struct mc13783_regulator_platform_data *pdata = +dev_get_platdata (&pdev->dev);int i;platform_set_drvdata (pdev,NULL );
drivers/regulator/mc13892-regulator.c +4 -3
@@ -15,7 +15,6 @@#include <linux/regulator/driver.h> #include <linux/platform_device.h> #include <linux/kernel.h> -#include <linux/mfd/core.h> #include <linux/slab.h> #include <linux/init.h> #include <linux/err.h>
@@ -521,7 +520,8 @@ static int __devinit mc13892_regulator_probe(struct platform_device *pdev) {struct mc13xxx_regulator_priv *priv;struct mc13xxx *mc13892 =dev_get_drvdata (pdev->dev.parent); -struct mc13xxx_regulator_platform_data *pdata =mfd_get_data (pdev); +struct mc13xxx_regulator_platform_data *pdata = +dev_get_platdata (&pdev->dev);struct mc13xxx_regulator_init_data *init_data;int i, ret;u32 val;
@@ -595,7 +595,8 @@ err_free: static int __devexit mc13892_regulator_remove(struct platform_device *pdev) {struct mc13xxx_regulator_priv *priv =platform_get_drvdata (pdev); -struct mc13xxx_regulator_platform_data *pdata =mfd_get_data (pdev); +struct mc13xxx_regulator_platform_data *pdata = +dev_get_platdata (&pdev->dev);int i;platform_set_drvdata (pdev,NULL );
Signature · 1 line
1.7.2.3
PATCH 14/19 mfd: Use mfd cell platform_data for janz cells platform bits
In reply to a message not in the archiveWith the addition of a platform device mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.
--- drivers/gpio/janz-ttl.c | 3 +-- drivers/mfd/janz-cmodio.c | 3 ++- drivers/net/can/janz-ican3.c | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-)
drivers/gpio/janz-ttl.c +1 -2
@@ -15,7 +15,6 @@#include <linux/interrupt.h> #include <linux/delay.h> #include <linux/platform_device.h> -#include <linux/mfd/core.h> #include <linux/io.h> #include <linux/gpio.h> #include <linux/slab.h>
@@ -150,7 +149,7 @@ static int __devinit ttl_probe(struct platform_device *pdev)struct resource *res;int ret; - pdata =mfd_get_data (pdev); + pdata = pdev->dev.platform_data;if (!pdata) {dev_err (dev,"no platform data\n" ); ret = -ENXIO ;
drivers/mfd/janz-cmodio.c +2 -1
@@ -86,7 +86,8 @@ static int __devinit cmodio_setup_subdevice(struct cmodio_device *priv,/* Add platform data */ pdata->modno = modno; - cell->mfd_data = pdata; + cell->platform_data = pdata; + cell->pdata_size =sizeof (*pdata);/* MODULbus registers -- PCI BAR3 is big-endian MODULbus access */ res->flags =IORESOURCE_MEM ;
drivers/net/can/janz-ican3.c +1 -2
@@ -15,7 +15,6 @@#include <linux/interrupt.h> #include <linux/delay.h> #include <linux/platform_device.h> -#include <linux/mfd/core.h> #include <linux/netdevice.h> #include <linux/can.h>
@@ -1644,7 +1643,7 @@ static int __devinit ican3_probe(struct platform_device *pdev)struct device *dev;int ret; - pdata =mfd_get_data (pdev); + pdata = pdev->dev.platform_data;if (!pdata)return -ENXIO ;
Signature · 1 line
1.7.2.3
PATCH 15/19 mfd: Use mfd cell platform_data for twl4030 codec cells platform bits
In reply to a message not in the archiveWith the addition of a platform device mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.
--- drivers/input/misc/twl4030-vibra.c | 3 +-- drivers/mfd/twl4030-codec.c | 6 ++++-- sound/soc/codecs/twl4030.c | 6 ++---- 3 files changed, 7 insertions(+), 8 deletions(-)
drivers/input/misc/twl4030-vibra.c +1 -2
@@ -29,7 +29,6 @@#include <linux/workqueue.h> #include <linux/i2c/twl.h> #include <linux/mfd/twl4030-codec.h> -#include <linux/mfd/core.h> #include <linux/input.h> #include <linux/slab.h>
@@ -197,7 +196,7 @@ static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops,static int __devinit twl4030_vibra_probe (struct platform_device *pdev) { -struct twl4030_codec_vibra_data *pdata =mfd_get_data (pdev); +struct twl4030_codec_vibra_data *pdata = pdev->dev.platform_data;struct vibra_info *info;int ret;
drivers/mfd/twl4030-codec.c +4 -2
@@ -208,13 +208,15 @@ static int __devinit twl4030_codec_probe(struct platform_device *pdev)if (pdata->audio) { cell = &codec->cells[childs]; cell->name ="twl4030-codec" ; - cell->mfd_data = pdata->audio; + cell->platform_data = pdata->audio; + cell->pdata_size =sizeof (*pdata->audio); childs++; }if (pdata->vibra) { cell = &codec->cells[childs]; cell->name ="twl4030-vibra" ; - cell->mfd_data = pdata->vibra; + cell->platform_data = pdata->vibra; + cell->pdata_size =sizeof (*pdata->vibra); childs++; }
sound/soc/codecs/twl4030.c +2 -4
@@ -26,7 +26,6 @@#include <linux/pm.h> #include <linux/i2c.h> #include <linux/platform_device.h> -#include <linux/mfd/core.h> #include <linux/i2c/twl.h> #include <linux/slab.h> #include <sound/core.h>
@@ -733,8 +732,7 @@ static int aif_event(struct snd_soc_dapm_widget *w,static void headset_ramp (struct snd_soc_codec *codec,int ramp) { -struct twl4030_codec_audio_data *pdata = -mfd_get_data (to_platform_device (codec->dev)); +struct twl4030_codec_audio_data *pdata = codec->dev->platform_data;unsigned char hs_gain, hs_pop;struct twl4030_priv *twl4030 =snd_soc_codec_get_drvdata (codec);/* Base values for ramp delay calculation: 2^19 - 2^26 */
@@ -2299,7 +2297,7 @@ static struct snd_soc_codec_driver soc_codec_dev_twl4030 = {static int __devinit twl4030_codec_probe (struct platform_device *pdev) { -struct twl4030_codec_audio_data *pdata =mfd_get_data (pdev); +struct twl4030_codec_audio_data *pdata = pdev->dev.platform_data;if (!pdata) {dev_err (&pdev->dev,"platform_data is missing\n" );
Signature · 1 line
1.7.2.3
PATCH 16/19 mfd: Use mfd cell platform_data for tps6105x cells platform bits
In reply to a message not in the archiveWith the addition of a platform device mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.
--- drivers/mfd/tps6105x.c | 3 ++- drivers/regulator/tps6105x-regulator.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-)
drivers/mfd/tps6105x.c +2 -1
@@ -183,7 +183,8 @@ static int __devinit tps6105x_probe(struct i2c_client *client,/* Set up and register the platform devices. */ for (i =0 ; i <ARRAY_SIZE (tps6105x_cells); i++) {/* One state holder for all drivers, this is simple */ - tps6105x_cells[i].mfd_data = tps6105x; + tps6105x_cells[i].platform_data = tps6105x; + tps6105x_cells[i].pdata_size =sizeof (*tps6105x); } ret = mfd_add_devices(&client->dev, 0, tps6105x_cells,
drivers/regulator/tps6105x-regulator.c +2 -2
@@ -137,7 +137,7 @@ static struct regulator_desc tps6105x_regulator_desc = {*/ static int __devinit tps6105x_regulator_probe (struct platform_device *pdev) { -struct tps6105x *tps6105x =mfd_get_data (pdev); +struct tps6105x *tps6105x = pdev->dev.platform_data;struct tps6105x_platform_data *pdata = tps6105x->pdata;int ret;
@@ -164,7 +164,7 @@ static int __devinit tps6105x_regulator_probe(struct platform_device *pdev) static int __devexit tps6105x_regulator_remove(struct platform_device *pdev) { -struct tps6105x *tps6105x =platform_get_drvdata (pdev); +struct tps6105x *tps6105x = pdev->dev.platform_data;regulator_unregister (tps6105x->regulator);return 0 ; }
Signature · 1 line
1.7.2.3
Re: [PATCH 16/19] mfd: Use mfd cell platform_data for tps6105x cells platform bits
2011/5/9 Samuel Ortiz <[email protected]>:
Quoted 10 lines
With the addition of a platform device
mfd_cellpointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for anmfd_cell->mfd_dataremoval and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.Cc Mark Brown <[email protected]>Cc Liam Girdwood <[email protected]>Cc Linus Walleij <[email protected]>Signed-off-by Samuel Ortiz <[email protected]>
I have some question marks on this one...
drivers/mfd/tps6105x.c static int __devinit tps6105x_probe(struct i2c_client *client, · line 187
Quoted 9 lines
drivers/mfd/tps6105x.c +2
-1@@ -183,7 +183,8 @@ static int __devinit tps6105x_probe(struct i2c_client *client, /* Set up and register the platform devices. */ for (i = 0; i < ARRAY_SIZE(tps6105x_cells); i++) { /* One state holder for all drivers, this is simple */ - tps6105x_cells[i].mfd_data = tps6105x; + tps6105x_cells[i].platform_data = tps6105x; + tps6105x_cells[i].pdata_size = sizeof(*tps6105x);
ACK
drivers/regulator/tps6105x-regulator.c static struct regulator_desc tps6105x_regulator_desc = { · line 140
Quoted 8 lines
drivers/regulator/tps6105x-regulator.c +1
-1@@ -137,7 +137,7 @@ static struct regulator_desc tps6105x_regulator_desc = {*/ static int __devinit tps6105x_regulator_probe(struct platform_device *pdev) { - struct tps6105x *tps6105x = mfd_get_data(pdev); + struct tps6105x *tps6105x = pdev->dev.platform_data;
Can you use platform_get_drvdata(pdev); instead?
drivers/regulator/tps6105x-regulator.c static int __devinit tps6105x_regulator_probe(struct platform_device *pdev) · line 167
Quoted 9 lines
drivers/regulator/tps6105x-regulator.c +1
-1struct tps6105x_platform_data *pdata = tps6105x->pdata; int ret;@@ -164,7 +164,7 @@ static int __devinit tps6105x_regulator_probe(struct platform_device *pdev) static int __devexit tps6105x_regulator_remove(struct platform_device *pdev) { - struct tps6105x *tps6105x = platform_get_drvdata(pdev); + struct tps6105x *tps6105x = pdev->dev.platform_data;
And this is a NO-OP, actually a bug in the present code, just leave it as it is and the other changes removing the mfd->mfd_data fixes the bug...
Yours,
Linus Walleij
Re: [PATCH 16/19] mfd: Use mfd cell platform_data for tps6105x cells platform bits
Hi Linus,
Quoted 27 lines · Linus Walleij
2011/5/9 Samuel Ortiz <[email protected]>:
Quoted 10 lines
With the addition of a platform device
mfd_cellpointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for anmfd_cell->mfd_dataremoval and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.Cc Mark Brown <[email protected]>Cc Liam Girdwood <[email protected]>Cc Linus Walleij <[email protected]>Signed-off-by Samuel Ortiz <[email protected]>I have some question marks on this one...
drivers/mfd/tps6105x.c static int __devinit tps6105x_probe(struct i2c_client *client, · line 187
Quoted 9 lines
drivers/mfd/tps6105x.c +2
-1@@ -183,7 +183,8 @@ static int __devinit tps6105x_probe(struct i2c_client *client, /* Set up and register the platform devices. */ for (i = 0; i < ARRAY_SIZE(tps6105x_cells); i++) { /* One state holder for all drivers, this is simple */ - tps6105x_cells[i].mfd_data = tps6105x; + tps6105x_cells[i].platform_data = tps6105x; + tps6105x_cells[i].pdata_size = sizeof(*tps6105x);ACK
Quoted 10 lines
drivers/regulator/tps6105x-regulator.c static struct regulator_desc tps6105x_regulator_desc = { · line 140
Quoted 8 lines
drivers/regulator/tps6105x-regulator.c +1
-1@@ -137,7 +137,7 @@ static struct regulator_desc tps6105x_regulator_desc = {*/ static int __devinit tps6105x_regulator_probe(struct platform_device *pdev) { - struct tps6105x *tps6105x = mfd_get_data(pdev); + struct tps6105x *tps6105x = pdev->dev.platform_data;Can you use
platform_get_drvdata(pdev); instead?
I suppose you mean dev_get_platdata() ?
Quoted 5 lines
Quoted 5 lines
drivers/regulator/tps6105x-regulator.c +0
-0struct tps6105x_platform_data *pdata = tps6105x->pdata; int ret;@@ -164,7 +164,7 @@ static int __devinit tps6105x_regulator_probe(struct platform_device *pdev)
Quoted 7 lines
drivers/regulator/tps6105x-regulator.c static int __devinit tps6105x_regulator_probe(struct platform_device *pdev) · line 167
Quoted 4 lines
drivers/regulator/tps6105x-regulator.c +1
-1static int __devexit tps6105x_regulator_remove(struct platform_device *pdev) { - struct tps6105x *tps6105x = platform_get_drvdata(pdev); + struct tps6105x *tps6105x = pdev->dev.platform_data;And this is a NO-OP, actually a bug in the present code, just leave it as it is and the other changes removing the
mfd->mfd_datafixes the bug...
I agree it's a bug in the current code. But I need to fetch the platform_data pointer, so here again I would have to call dev_get_platdata().
Cheers,
Samuel.
Quoted 2 lines
Yours,
Linus Walleij
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/
Re: [PATCH 16/19] mfd: Use mfd cell platform_data for tps6105x cells platform bits
2011/5/11 Samuel Ortiz <[email protected]>:
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
- struct tps6105x *tps6105x =
mfd_get_data(pdev);
+ struct tps6105x *tps6105x =pdev->dev.platform_data;Can you use
platform_get_drvdata(pdev); instead?I suppose you mean
dev_get_platdata()?
Yes, sorry.
Quoted 10 lines
Quoted 7 lines
Quoted 4 lines
static int
__devexittps6105x_regulator_remove(struct platform_device *pdev){
- struct tps6105x *tps6105x =platform_get_drvdata(pdev);
+ struct tps6105x *tps6105x =pdev->dev.platform_data;And this is a NO-OP, actually a bug in the present code, just leave it as it is and the other changes removing the
mfd->mfd_datafixes the bug...I agree it's a bug in the current code. But I need to fetch the
platform_datapointer, so here again I would have to calldev_get_platdata().
Yes again, you're right.
I was mainly after using the pretty accessor functions rather than direct dereferencing, no big deal.
Thanks,
Linus Walleij
PATCH 16/19 mfd: Use mfd cell platform_data for tps6105x cells platform bits
In reply to Linus WalleijWith the addition of a platform device mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.
---
v0 -> v1: Use dev_get_platdata instead of accessing the platform_data pointer directly.
--- drivers/mfd/tps6105x.c | 3 ++- drivers/regulator/tps6105x-regulator.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-)
drivers/mfd/tps6105x.c +2 -1
@@ -183,7 +183,8 @@ static int __devinit tps6105x_probe(struct i2c_client *client,/* Set up and register the platform devices. */ for (i =0 ; i <ARRAY_SIZE (tps6105x_cells); i++) {/* One state holder for all drivers, this is simple */ - tps6105x_cells[i].mfd_data = tps6105x; + tps6105x_cells[i].platform_data = tps6105x; + tps6105x_cells[i].pdata_size =sizeof (*tps6105x); } ret = mfd_add_devices(&client->dev, 0, tps6105x_cells,
drivers/regulator/tps6105x-regulator.c +2 -2
@@ -137,7 +137,7 @@ static struct regulator_desc tps6105x_regulator_desc = {*/ static int __devinit tps6105x_regulator_probe (struct platform_device *pdev) { -struct tps6105x *tps6105x =mfd_get_data (pdev); +struct tps6105x *tps6105x =dev_get_platdata (&pdev->dev);struct tps6105x_platform_data *pdata = tps6105x->pdata;int ret;
@@ -164,7 +164,7 @@ static int __devinit tps6105x_regulator_probe(struct platform_device *pdev) static int __devexit tps6105x_regulator_remove(struct platform_device *pdev) { -struct tps6105x *tps6105x =platform_get_drvdata (pdev); +struct tps6105x *tps6105x =dev_get_platdata (&pdev->dev);regulator_unregister (tps6105x->regulator);return 0 ; }
Signature · 5 lines
1.7.2.3 -- Intel Open Source Technology Centre http://oss.intel.com/
PATCH 17/19 mfd: Use mfd cell platform_data for 88pm860x cells platform bits
In reply to a message not in the archiveWith the addition of a platform device mfd_cell pointer, MFD drivers can go back to passing platform back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.
--- drivers/leds/leds-88pm860x.c | 7 +------ drivers/mfd/88pm860x-core.c | 18 ++++++++++++------ drivers/regulator/88pm8607.c | 7 +------ drivers/video/backlight/88pm860x_bl.c | 7 +------ 4 files changed, 15 insertions(+), 24 deletions(-)
drivers/leds/leds-88pm860x.c +1 -6
@@ -17,7 +17,6 @@#include <linux/leds.h> #include <linux/slab.h> #include <linux/workqueue.h> -#include <linux/mfd/core.h> #include <linux/mfd/88pm860x.h> #define LED_PWM_SHIFT (3)
@@ -171,7 +170,6 @@ static int pm860x_led_probe(struct platform_device *pdev)struct pm860x_chip *chip =dev_get_drvdata (pdev->dev.parent);struct pm860x_led_pdata *pdata;struct pm860x_led *data; -struct mfd_cell *cell;struct resource *res;int ret;
@@ -181,10 +179,7 @@ static int pm860x_led_probe(struct platform_device *pdev)return -EINVAL ; } - cell = pdev->dev.platform_data; -if (cell ==NULL ) -return -ENODEV ; - pdata = cell->mfd_data; + pdata = pdev->dev.platform_data;if (pdata ==NULL ) {dev_err (&pdev->dev,"No platform data!\n" );return -EINVAL ;
drivers/mfd/88pm860x-core.c +12 -6
@@ -516,7 +516,8 @@ static void __devinit device_bk_init(struct pm860x_chip *chip,for (i =0 ; i < pdata->num_backlights; i++) {memcpy (&bk_pdata[i], &pdata->backlight[i],sizeof (struct pm860x_backlight_pdata )); - bk_devs[i].mfd_data = &bk_pdata[i]; + bk_devs[i].platform_data = &bk_pdata[i]; + bk_devs[i].pdata_size =sizeof (bk_pdata[i]);for (j =0 ; j <ARRAY_SIZE (bk_devs); j++) { id = bk_resources[j].start;
@@ -553,7 +554,8 @@ static void __devinit device_led_init(struct pm860x_chip *chip,for (i =0 ; i < pdata->num_leds; i++) {memcpy (&led_pdata[i], &pdata->led[i],sizeof (struct pm860x_led_pdata )); - led_devs[i].mfd_data = &led_pdata[i]; + led_devs[i].platform_data = &led_pdata[i]; + led_devs[i].pdata_size =sizeof (led_pdata[i]);for (j =0 ; j <ARRAY_SIZE (led_devs); j++) { id = led_resources[j].start;
@@ -617,7 +619,8 @@ static void __devinit device_regulator_init(struct pm860x_chip *chip, }memcpy (®ulator_pdata[i], &pdata->regulator[i],sizeof (struct regulator_init_data )); - regulator_devs[i].mfd_data = ®ulator_pdata[i]; + regulator_devs[i].platform_data = ®ulator_pdata[i]; + regulator_devs[i].pdata_size =sizeof (regulator_pdata[i]); regulator_devs[i].num_resources =1 ; regulator_devs[i].resources = ®ulator_resources[j];
@@ -642,7 +645,8 @@ static void __devinit device_touch_init(struct pm860x_chip *chip,return ;memcpy (&touch_pdata, pdata->touch,sizeof (struct pm860x_touch_pdata )); - touch_devs[0 ].mfd_data = &touch_pdata; + touch_devs[0 ].platform_data = &touch_pdata; + touch_devs[0 ].pdata_size =sizeof (touch_pdata); touch_devs[0 ].num_resources =ARRAY_SIZE (touch_resources); touch_devs[0 ].resources = &touch_resources[0 ]; ret = mfd_add_devices(chip->dev, 0, &touch_devs[0],
@@ -662,7 +666,8 @@ static void __devinit device_power_init(struct pm860x_chip *chip,return ;memcpy (&power_pdata, pdata->power,sizeof (struct pm860x_power_pdata )); - power_devs[0 ].mfd_data = &power_pdata; + power_devs[0 ].platform_data = &power_pdata; + power_devs[0 ].pdata_size =sizeof (power_pdata); power_devs[0 ].num_resources =ARRAY_SIZE (battery_resources); power_devs[0 ].resources = &battery_resources[0 ], ret = mfd_add_devices(chip->dev, 0, &power_devs[0], 1,
@@ -670,7 +675,8 @@ static void __devinit device_power_init(struct pm860x_chip *chip,if (ret <0 )dev_err (chip->dev,"Failed to add battery subdev\n" ); - power_devs[1 ].mfd_data = &power_pdata; + power_devs[1 ].platform_data = &power_pdata; + power_devs[0 ].pdata_size =sizeof (power_pdata); power_devs[1 ].num_resources =ARRAY_SIZE (charger_resources); power_devs[1 ].resources = &charger_resources[0 ], ret = mfd_add_devices(chip->dev, 0, &power_devs[1], 1,
drivers/regulator/88pm8607.c +1 -6
@@ -15,7 +15,6 @@#include <linux/platform_device.h> #include <linux/regulator/driver.h> #include <linux/regulator/machine.h> -#include <linux/mfd/core.h> #include <linux/mfd/88pm860x.h> struct pm8607_regulator_info {
@@ -400,13 +399,9 @@ static int __devinit pm8607_regulator_probe(struct platform_device *pdev)struct pm860x_chip *chip =dev_get_drvdata (pdev->dev.parent);struct pm8607_regulator_info *info =NULL ;struct regulator_init_data *pdata; -struct mfd_cell *cell;int i; - cell = pdev->dev.platform_data; -if (cell ==NULL ) -return -ENODEV ; - pdata = cell->mfd_data; + pdata = pdev->dev.platform_data;if (pdata ==NULL )return -EINVAL ;
drivers/video/backlight/88pm860x_bl.c +1 -6
@@ -16,7 +16,6 @@#include <linux/fb.h> #include <linux/i2c.h> #include <linux/backlight.h> -#include <linux/mfd/core.h> #include <linux/mfd/88pm860x.h> #define MAX_BRIGHTNESS (0xFF)
@@ -168,7 +167,6 @@ static int pm860x_backlight_probe(struct platform_device *pdev)struct pm860x_backlight_pdata *pdata =NULL ;struct pm860x_backlight_data *data;struct backlight_device *bl; -struct mfd_cell *cell;struct resource *res;struct backlight_properties props;unsigned char value;
@@ -181,10 +179,7 @@ static int pm860x_backlight_probe(struct platform_device *pdev)return -EINVAL ; } - cell = pdev->dev.platform_data; -if (cell ==NULL ) -return -ENODEV ; - pdata = cell->mfd_data; + pdata = pdev->dev.platform_data;if (pdata ==NULL ) {dev_err (&pdev->dev,"platform data isn't assigned to " "backlight\n" );
Signature · 1 line
1.7.2.3
RE: [PATCH 17/19] mfd: Use mfd cell platform_data for 88pm860x cells platform bits
Quoted 22 lines
-----Original Message-----
From: Samuel Ortiz [mailto:[email protected]]
Sent: 2011年5月9日 8:32 AM
To: linux-kernel
Cc: Samuel Ortiz; Haojian Zhuang; Mark Brown; Liam Girdwood; Richard Purdie
Subject: [PATCH 17/19] mfd: Use mfd cellplatform_datafor 88pm860x cells platform bitsWith the addition of a platform device
mfd_cellpointer, MFD drivers can go back to passing platform back to their sub drivers. This allows for anmfd_cell->mfd_dataremoval and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.Cc Haojian Zhuang <[email protected]>Cc Mark Brown <[email protected]>Cc Liam Girdwood <[email protected]>Cc Richard Purdie <[email protected]>Signed-off-by Samuel Ortiz <[email protected]>
Quoted 7 lines
---
drivers/leds/leds-88pm860x.c | 7 +------ drivers/mfd/88pm860x-core.c | 18 ++++++++++++------ drivers/regulator/88pm8607.c | 7 +------ drivers/video/backlight/88pm860x_bl.c | 7 +------ 4 files changed, 15 insertions(+), 24 deletions(-)
Tested. It's OK. �翳簕.n�+壏煯壄�+%娝�遍荻w�簕.n�+壏{炳G珴�妠ay�蕠跈�,jf"穐殢飦�戧鐉_璁(殠娸"濟�m���G珴�⒏?櫒璀�&x忈秈O曟瑉窔v豝�m����鹅�⒏?朓�
PATCH 18/19 mfd: Use mfd cell platform_data for davinci cells platform bits
In reply to a message not in the archiveWith the addition of a platform device mfd_cell pointer, MFD drivers can go back to passing platform back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.
--- drivers/mfd/davinci_voicecodec.c | 6 ++++-- sound/soc/codecs/cq93vc.c | 3 +-- sound/soc/davinci/davinci-vcif.c | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-)
drivers/mfd/davinci_voicecodec.c +4 -2
@@ -119,12 +119,14 @@ static int __init davinci_vc_probe(struct platform_device *pdev)/* Voice codec interface client */ cell = &davinci_vc->cells[DAVINCI_VC_VCIF_CELL ]; cell->name ="davinci-vcif" ; - cell->mfd_data = davinci_vc; + cell->platform_data = davinci_vc; + cell->pdata_size =sizeof (*davinci_vc);/* Voice codec CQ93VC client */ cell = &davinci_vc->cells[DAVINCI_VC_CQ93VC_CELL ]; cell->name ="cq93vc-codec" ; - cell->mfd_data = davinci_vc; + cell->platform_data = davinci_vc; + cell->pdata_size =sizeof (*davinci_vc); ret =mfd_add_devices (&pdev->dev, pdev->id, davinci_vc->cells,DAVINCI_VC_CELLS ,NULL ,0 );
sound/soc/codecs/cq93vc.c +1 -2
@@ -153,8 +153,7 @@ static int cq93vc_resume(struct snd_soc_codec *codec)static int cq93vc_probe (struct snd_soc_codec *codec) { -struct davinci_vc *davinci_vc = -mfd_get_data (to_platform_device (codec->dev)); +struct davinci_vc *davinci_vc = codec->dev->platform_data; davinci_vc->cq93vc.codec = codec; codec->control_data = davinci_vc;
sound/soc/davinci/davinci-vcif.c +1 -1
@@ -205,7 +205,7 @@ static struct snd_soc_dai_driver davinci_vcif_dai = {static int davinci_vcif_probe (struct platform_device *pdev) { -struct davinci_vc *davinci_vc =mfd_get_data (pdev); +struct davinci_vc *davinci_vc = pdev->dev.platform_data;struct davinci_vcif_dev *davinci_vcif_dev;int ret;
Signature · 1 line
1.7.2.3
A message that is not in the archive (sent off-list or not yet received): [email protected]
RE: [PATCH 19/19] mfd: Remove mfd_data
Quoted 42 lines
-----Original Message-----
From: Samuel Ortiz [mailto:[email protected]]
Sent: 2011年5月9日 8:32 AM
To: linux-kernel
Cc: Samuel Ortiz; Andres Salomon; Artem Bityutskiy; Dmitry Baryshkov; Dmitry Torokhov; Florian Fainelli; Grant Likely; Guennadi Liakhovetski; Haojian Zhuang; Ian Molton; Ira W. Snyder; Liam Girdwood; Linus Walleij; Mark Brown; Matti Aaltonen; Matt Reimer; Miguel Aguilar; Paul Mundt; Peter Ujfalusi; Philipp Zabel; Richard Purdie; Richard Röjfors; Uwe Kleine-König; Wim Van Sebroeck; Wolfgang Grandegger
Subject: [PATCH 19/19] mfd: Removemfd_dataCell pointers are passed through
device->mfd_celland platform data is passed through the MFD cellplatform_datapointer.Cc Andres Salomon <[email protected]>Cc Artem Bityutskiy <[email protected]>Cc Dmitry Baryshkov <[email protected]>Cc Dmitry Torokhov <[email protected]>Cc Florian Fainelli <[email protected]>Cc Grant Likely <[email protected]>Cc Guennadi Liakhovetski <[email protected]>Cc Haojian Zhuang <[email protected]>Cc Ian Molton <[email protected]>Cc Ira W. Snyder <[email protected]>Cc Liam Girdwood <[email protected]>Cc Linus Walleij <[email protected]>Cc Mark Brown <[email protected]>Cc Matti Aaltonen <[email protected]>Cc Matt Reimer <[email protected]>Cc Miguel Aguilar <[email protected]>Cc Paul Mundt <[email protected]>Cc Peter Ujfalusi <[email protected]>Cc Philipp Zabel <[email protected]>Cc Richard Purdie <[email protected]>Cc Richard Röjfors <[email protected]>Cc Uwe Kleine-König <[email protected]>Cc Wim Van Sebroeck <[email protected]>Cc Wolfgang Grandegger <[email protected]>Signed-off-by Samuel Ortiz <[email protected]>
Quoted 4 lines
---
include/linux/mfd/core.h| 21 ---------------------1 files changed, 0 insertions(+), 21 deletions(-)
Tested. It's OK. ���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m����������?�I�
A message that is not in the archive (sent off-list or not yet received): [email protected]
RE: [PATCH 01/19] mfd: Add platform data pointer back
Quoted 43 lines
-----Original Message-----
From: Samuel Ortiz [mailto:[email protected]]
Sent: 2011年5月9日 8:32 AM
To: linux-kernel
Cc: Samuel Ortiz; Andres Salomon; Artem Bityutskiy; Dmitry Baryshkov; Dmitry Torokhov; Florian Fainelli; Grant Likely; Guennadi Liakhovetski; Haojian Zhuang; Ian Molton; Ira W. Snyder; Liam Girdwood; Linus Walleij; Mark Brown; Matti Aaltonen; Matt Reimer; Miguel Aguilar; Paul Mundt; Peter Ujfalusi; Philipp Zabel; Richard Purdie; Richard Röjfors; Uwe Kleine-König; Wim Van Sebroeck; Wolfgang Grandegger
Subject: [PATCH 01/19] mfd: Add platform data pointer backNow that we have a way to pass MFD cells down to the sub drivers, we can gradually get rid of
mfd_databy putting the platform pointer back in place.Cc Andres Salomon <[email protected]>Cc Artem Bityutskiy <[email protected]>Cc Dmitry Baryshkov <[email protected]>Cc Dmitry Torokhov <[email protected]>Cc Florian Fainelli <[email protected]>Cc Grant Likely <[email protected]>Cc Guennadi Liakhovetski <[email protected]>Cc Haojian Zhuang <[email protected]>Cc Ian Molton <[email protected]>Cc Ira W. Snyder <[email protected]>Cc Liam Girdwood <[email protected]>Cc Linus Walleij <[email protected]>Cc Mark Brown <[email protected]>Cc Matti Aaltonen <[email protected]>Cc Matt Reimer <[email protected]>Cc Miguel Aguilar <[email protected]>Cc Paul Mundt <[email protected]>Cc Peter Ujfalusi <[email protected]>Cc Philipp Zabel <[email protected]>Cc Richard Purdie <[email protected]>Cc Richard Röjfors <[email protected]>Cc Uwe Kleine-König <[email protected]>Cc Wim Van Sebroeck <[email protected]>Cc Wolfgang Grandegger <[email protected]>Signed-off-by Samuel Ortiz <[email protected]>
Quoted 5 lines
---
drivers/mfd/mfd-core.c | 7 +++++++ include/linux/mfd/core.h | 4 ++++ 2 files changed, 11 insertions(+), 0 deletions(-)
Tested. It's OK. ���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m����������?�I�
PATCH 1/19 mfd: Add platform data pointer back
In reply to a message not in the archiveNow that we have a way to pass MFD cells down to the sub drivers, we can gradually get rid of mfd_data by putting the platform pointer back in place.
--- drivers/mfd/mfd-core.c | 7 +++++++ include/linux/mfd/core.h | 4 ++++ 2 files changed, 11 insertions(+), 0 deletions(-)
drivers/mfd/mfd-core.c +7 -0
@@ -88,6 +88,13 @@ static int mfd_add_device(struct device *parent, int id, pdev->dev.parent = parent; +if (cell->pdata_size) { + ret =platform_device_add_data (pdev, + cell->platform_data, cell->pdata_size); +if (ret) + goto fail_res; + } + ret =mfd_platform_add_cell (pdev, cell);if (ret) goto fail_res;
include/linux/mfd/core.h +4 -0
@@ -36,6 +36,10 @@ struct mfd_cell {/* mfd_data can be used to pass data to client drivers */ void *mfd_data; +/* platform data passed to the sub devices drivers */ +void *platform_data; +size_t pdata_size; +/* * These resources can be specified relative to the parent device. * For accessing hardware you should use resources from the platform dev
Signature · 5 lines
1.7.2.3 -- Intel Open Source Technology Centre http://oss.intel.com/
cover mfd: mfd_data removal
In reply to a message not in the archiveThis patchset is using the newly added platform_device mfd_cell pointer to get rid of the mfd_data cell pointer.
Drivers willing to access their parent MFD cell will do so through the mfd_get_cell accessor. Other drivers (and in particular the non MFD ones) will get their platform data bits from the cell's platform_data pointer. This allows for non MFD sub drivers to not depend on the MFD core APIs if they don't need to.
---
Samuel Ortiz (19):
mfd: Add platform data pointer back
mfd: Use mfd cell platform_data for ab3550 cells platform bits
mfd: Use mfd cell platform_data for ab3100 cells platform bits
mmc: Use device platform_data to retrieve tmio_mmc platform bits
w1: Use device platform_data to retrieve ds1wm platform bits
mfd: Pass htc-pasic3 led platform data through the cell platform_data
mfd: Use mfd cell platform_data for wl1273 cells platform bits
fb: Use platform_data to retrieve tmiofb platform bits
mtd: Use platform_data to retrieve tmio_nand platform bits
mfd: Use mfd cell platform_data for timberdale cells platform bits
mfd: Use mfd cell platform_data for rdc321x cells platform bits
mfd: Use mfd cell platform_data for wm8400 cells platform bits
mfd: Use mfd cell platform_data for mc13xxx cells platform bits
mfd: Use mfd cell platform_data for janz cells platform bits
mfd: Use mfd cell platform_data for twl4030 codec cells platform bits
mfd: Use mfd cell platform_data for tps6105x cells platform bits
mfd: Use mfd cell platform_data for 88pm860x cells platform bits
mfd: Use mfd cell platform_data for davinci cells platform bits
mfd: Remove mfd_data
drivers/dma/timb_dma.c | 3 +- drivers/gpio/janz-ttl.c | 3 +- drivers/gpio/rdc321x-gpio.c | 3 +- drivers/gpio/timbgpio.c | 6 +- drivers/i2c/busses/i2c-ocores.c | 3 +- drivers/i2c/busses/i2c-xiic.c | 3 +- drivers/input/misc/twl4030-vibra.c | 3 +- drivers/leds/leds-88pm860x.c | 7 +-- drivers/leds/leds-mc13783.c | 7 +-- drivers/media/radio/radio-timb.c | 3 +- drivers/media/radio/radio-wl1273.c | 2 +- drivers/media/video/timblogiw.c | 3 +- drivers/mfd/88pm860x-core.c | 18 +++++-- drivers/mfd/ab3100-core.c | 6 ++- drivers/mfd/ab3550-core.c | 6 ++- drivers/mfd/asic3.c | 6 ++- drivers/mfd/davinci_voicecodec.c | 6 ++- drivers/mfd/htc-pasic3.c | 5 ++- drivers/mfd/janz-cmodio.c | 3 +- drivers/mfd/mc13xxx-core.c | 12 +++-- drivers/mfd/mfd-core.c | 7 +++ drivers/mfd/rdc321x-southbridge.c | 6 ++- drivers/mfd/t7l66xb.c | 6 ++- drivers/mfd/tc6387xb.c | 3 +- drivers/mfd/tc6393xb.c | 10 +++- drivers/mfd/timberdale.c | 81 +++++++++++++++++++++----------- drivers/mfd/tps6105x.c | 3 +- drivers/mfd/twl4030-codec.c | 6 ++- drivers/mfd/wl1273-core.c | 6 ++- drivers/mfd/wm8400-core.c | 3 +- drivers/mmc/host/tmio_mmc.c | 2 +- drivers/mtd/nand/tmio_nand.c | 2 +- drivers/net/can/janz-ican3.c | 3 +- drivers/net/ks8842.c | 3 +- drivers/regulator/88pm8607.c | 7 +-- drivers/regulator/ab3100.c | 3 +- drivers/regulator/mc13783-regulator.c | 7 ++- drivers/regulator/mc13892-regulator.c | 7 ++- drivers/regulator/tps6105x-regulator.c | 4 +- drivers/spi/xilinx_spi.c | 3 +- drivers/video/backlight/88pm860x_bl.c | 7 +-- drivers/video/tmiofb.c | 12 ++--- drivers/w1/masters/ds1wm.c | 12 ++++- drivers/watchdog/rdc321x_wdt.c | 3 +- include/linux/mfd/abx500.h | 1 + include/linux/mfd/core.h | 23 +-------- sound/soc/codecs/cq93vc.c | 3 +- sound/soc/codecs/twl4030.c | 6 +-- sound/soc/codecs/wl1273.c | 3 +- sound/soc/codecs/wm8400.c | 2 +- sound/soc/davinci/davinci-vcif.c | 2 +- 51 files changed, 191 insertions(+), 163 deletions(-)
Signature · 5 lines
1.7.2.3 -- Intel Open Source Technology Centre http://oss.intel.com/
Richard Röjfors
Acked-byRe: [PATCH 00/19] mfd: mfd_data removal
In reply to a message not in the archiveQuoted 99 lines · Samuel Ortiz
This patchset is using the newly added
platform_devicemfd_cellpointer to get rid of themfd_datacell pointer.
Drivers willing to access their parent MFD cell will do so through themfd_get_cellaccessor. Other drivers (and in particular the non MFD ones) will get their platform data bits from the cell'splatform_datapointer. This allows for non MFD sub drivers to not depend on the MFD core APIs if they don't need to.Cc Andres Salomon <[email protected]>Cc Artem Bityutskiy <[email protected]>Cc Dmitry Baryshkov <[email protected]>Cc Dmitry Torokhov <[email protected]>Cc Florian Fainelli <[email protected]>Cc Grant Likely <[email protected]>Cc Guennadi Liakhovetski <[email protected]>Cc Haojian Zhuang <[email protected]>Cc Ian Molton <[email protected]>Cc Ira W. Snyder <[email protected]>Cc Liam Girdwood <[email protected]>Cc Linus Walleij <[email protected]>Cc Mark Brown <[email protected]>Cc Matti Aaltonen <[email protected]>Cc Matt Reimer <[email protected]>Cc Miguel Aguilar <[email protected]>Cc Paul Mundt <[email protected]>Cc Peter Ujfalusi <[email protected]>Cc Philipp Zabel <[email protected]>Cc Richard Purdie <[email protected]>Cc Richard Röjfors <[email protected]>Cc Uwe Kleine-König <[email protected]>Cc Wim Van Sebroeck <[email protected]>Cc Wolfgang Grandegger <[email protected]>---
Samuel Ortiz (19):
mfd: Add platform data pointer back
mfd: Use mfd cellplatform_datafor ab3550 cells platform bits
mfd: Use mfd cellplatform_datafor ab3100 cells platform bits
mmc: Use deviceplatform_datato retrievetmio_mmcplatform bits
w1: Use deviceplatform_datato retrieve ds1wm platform bits
mfd: Pass htc-pasic3 led platform data through the cellplatform_data
mfd: Use mfd cellplatform_datafor wl1273 cells platform bits
fb: Useplatform_datato retrieve tmiofb platform bits
mtd: Useplatform_datato retrievetmio_nandplatform bits
mfd: Use mfd cellplatform_datafor timberdale cells platform bits
mfd: Use mfd cellplatform_datafor rdc321x cells platform bits
mfd: Use mfd cellplatform_datafor wm8400 cells platform bits
mfd: Use mfd cellplatform_datafor mc13xxx cells platform bits
mfd: Use mfd cellplatform_datafor janz cells platform bits
mfd: Use mfd cellplatform_datafor twl4030 codec cells platform bits
mfd: Use mfd cellplatform_datafor tps6105x cells platform bits
mfd: Use mfd cellplatform_datafor 88pm860x cells platform bits
mfd: Use mfd cellplatform_datafor davinci cells platform bits
mfd: Removemfd_datadrivers/dma/timb_dma.c | 3 +- drivers/gpio/janz-ttl.c | 3 +- drivers/gpio/rdc321x-gpio.c | 3 +- drivers/gpio/timbgpio.c | 6 +- drivers/i2c/busses/i2c-ocores.c | 3 +- drivers/i2c/busses/i2c-xiic.c | 3 +- drivers/input/misc/twl4030-vibra.c | 3 +- drivers/leds/leds-88pm860x.c | 7 +-- drivers/leds/leds-mc13783.c | 7 +-- drivers/media/radio/radio-timb.c | 3 +- drivers/media/radio/radio-wl1273.c | 2 +- drivers/media/video/timblogiw.c | 3 +- drivers/mfd/88pm860x-core.c | 18 +++++-- drivers/mfd/ab3100-core.c | 6 ++- drivers/mfd/ab3550-core.c | 6 ++- drivers/mfd/asic3.c | 6 ++- drivers/mfd/davinci_voicecodec.c | 6 ++- drivers/mfd/htc-pasic3.c | 5 ++- drivers/mfd/janz-cmodio.c | 3 +- drivers/mfd/mc13xxx-core.c | 12 +++-- drivers/mfd/mfd-core.c | 7 +++ drivers/mfd/rdc321x-southbridge.c | 6 ++- drivers/mfd/t7l66xb.c | 6 ++- drivers/mfd/tc6387xb.c | 3 +- drivers/mfd/tc6393xb.c | 10 +++- drivers/mfd/timberdale.c | 81 +++++++++++++++++++++----------- drivers/mfd/tps6105x.c | 3 +- drivers/mfd/twl4030-codec.c | 6 ++- drivers/mfd/wl1273-core.c | 6 ++- drivers/mfd/wm8400-core.c | 3 +- drivers/mmc/host/tmio_mmc.c | 2 +- drivers/mtd/nand/tmio_nand.c | 2 +- drivers/net/can/janz-ican3.c | 3 +- drivers/net/ks8842.c | 3 +- drivers/regulator/88pm8607.c | 7 +-- drivers/regulator/ab3100.c | 3 +- drivers/regulator/mc13783-regulator.c | 7 ++- drivers/regulator/mc13892-regulator.c | 7 ++- drivers/regulator/tps6105x-regulator.c | 4 +- drivers/spi/xilinx_spi.c | 3 +- drivers/video/backlight/88pm860x_bl.c | 7 +-- drivers/video/tmiofb.c | 12 ++--- drivers/w1/masters/ds1wm.c | 12 ++++- drivers/watchdog/rdc321x_wdt.c | 3 +-
Quoted 9 lines
include/linux/mfd/abx500.h | 1 + include/linux/mfd/core.h | 23 +-------- sound/soc/codecs/cq93vc.c | 3 +- sound/soc/codecs/twl4030.c | 6 +-- sound/soc/codecs/wl1273.c | 3 +- sound/soc/codecs/wm8400.c | 2 +- sound/soc/davinci/davinci-vcif.c | 2 +- 51 files changed, 191 insertions(+), 163 deletions(-)
The timberdale part looks good.
--Richard