* [PATCH 1/2] regulator: make max8925 sharing one driver structure
@ 2010-05-04 7:21 Haojian Zhuang
2010-05-04 10:14 ` Mark Brown
2010-05-09 22:46 ` Samuel Ortiz
0 siblings, 2 replies; 4+ messages in thread
From: Haojian Zhuang @ 2010-05-04 7:21 UTC (permalink / raw
To: linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] regulator: make max8925 sharing one driver structure
2010-05-04 7:21 [PATCH 1/2] regulator: make max8925 sharing one driver structure Haojian Zhuang
@ 2010-05-04 10:14 ` Mark Brown
2010-05-09 22:46 ` Samuel Ortiz
1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2010-05-04 10:14 UTC (permalink / raw
To: linux-arm-kernel
On Tue, May 04, 2010 at 03:21:42AM -0400, Haojian Zhuang wrote:
> From 782297964a48a3b8547a99de3b5c24d8f02b99ec Mon Sep 17 00:00:00 2001
> From: Haojian Zhuang <haojian.zhuang@marvell.com>
> Date: Thu, 29 Apr 2010 13:33:50 -0400
> Subject: [PATCH] regulator: make max8925 sharing one driver structure
>
> Remove a lot of driver structures in max8925 driver. Make regulators share
> one driver structure.
>
> Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] regulator: make max8925 sharing one driver structure
2010-05-04 7:21 [PATCH 1/2] regulator: make max8925 sharing one driver structure Haojian Zhuang
2010-05-04 10:14 ` Mark Brown
@ 2010-05-09 22:46 ` Samuel Ortiz
2010-05-10 7:33 ` Liam Girdwood
1 sibling, 1 reply; 4+ messages in thread
From: Samuel Ortiz @ 2010-05-09 22:46 UTC (permalink / raw
To: linux-arm-kernel
Hi Haojian,
On Tue, May 04, 2010 at 03:21:42AM -0400, Haojian Zhuang wrote:
> From 782297964a48a3b8547a99de3b5c24d8f02b99ec Mon Sep 17 00:00:00 2001
> From: Haojian Zhuang <haojian.zhuang@marvell.com>
> Date: Thu, 29 Apr 2010 13:33:50 -0400
> Subject: [PATCH] regulator: make max8925 sharing one driver structure
>
> Remove a lot of driver structures in max8925 driver. Make regulators share
> one driver structure.
Patch applied, thanks.
Liam, I'll carry those 2 patches with my mfd tree if you're fine with it.
Cheers,
Samuel.
> Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
> ---
> drivers/mfd/88pm860x-core.c | 34 ++++++++++++++--------------
> drivers/regulator/88pm8607.c | 51 ++++++++---------------------------------
> 2 files changed, 27 insertions(+), 58 deletions(-)
>
> diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c
> index 6a14d2b..21de38d 100644
> --- a/drivers/mfd/88pm860x-core.c
> +++ b/drivers/mfd/88pm860x-core.c
> @@ -176,30 +176,30 @@ static struct resource regulator_resources[] = {
> PM8607_REG_RESOURCE(LDO14, LDO14),
> };
>
> -#define PM8607_REG_DEVS(_name, _id) \
> +#define PM8607_REG_DEVS(_id) \
> { \
> - .name = "88pm8607-" #_name, \
> + .name = "88pm860x-regulator", \
> .num_resources = 1, \
> .resources = ®ulator_resources[PM8607_ID_##_id], \
> .id = PM8607_ID_##_id, \
> }
>
> static struct mfd_cell regulator_devs[] = {
> - PM8607_REG_DEVS(buck1, BUCK1),
> - PM8607_REG_DEVS(buck2, BUCK2),
> - PM8607_REG_DEVS(buck3, BUCK3),
> - PM8607_REG_DEVS(ldo1, LDO1),
> - PM8607_REG_DEVS(ldo2, LDO2),
> - PM8607_REG_DEVS(ldo3, LDO3),
> - PM8607_REG_DEVS(ldo4, LDO4),
> - PM8607_REG_DEVS(ldo5, LDO5),
> - PM8607_REG_DEVS(ldo6, LDO6),
> - PM8607_REG_DEVS(ldo7, LDO7),
> - PM8607_REG_DEVS(ldo8, LDO8),
> - PM8607_REG_DEVS(ldo9, LDO9),
> - PM8607_REG_DEVS(ldo10, LDO10),
> - PM8607_REG_DEVS(ldo12, LDO12),
> - PM8607_REG_DEVS(ldo14, LDO14),
> + PM8607_REG_DEVS(BUCK1),
> + PM8607_REG_DEVS(BUCK2),
> + PM8607_REG_DEVS(BUCK3),
> + PM8607_REG_DEVS(LDO1),
> + PM8607_REG_DEVS(LDO2),
> + PM8607_REG_DEVS(LDO3),
> + PM8607_REG_DEVS(LDO4),
> + PM8607_REG_DEVS(LDO5),
> + PM8607_REG_DEVS(LDO6),
> + PM8607_REG_DEVS(LDO7),
> + PM8607_REG_DEVS(LDO8),
> + PM8607_REG_DEVS(LDO9),
> + PM8607_REG_DEVS(LDO10),
> + PM8607_REG_DEVS(LDO12),
> + PM8607_REG_DEVS(LDO14),
> };
>
> struct pm860x_irq_data {
> diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c
> index 5fb83e2..121bab4 100644
> --- a/drivers/regulator/88pm8607.c
> +++ b/drivers/regulator/88pm8607.c
> @@ -484,60 +484,29 @@ static int __devexit
> pm8607_regulator_remove(struct platform_device *pdev)
> {
> struct pm8607_regulator_info *info = platform_get_drvdata(pdev);
>
> + platform_set_drvdata(pdev, NULL);
> regulator_unregister(info->regulator);
> return 0;
> }
>
> -#define PM8607_REGULATOR_DRIVER(_name) \
> -{ \
> - .driver = { \
> - .name = "88pm8607-" #_name, \
> - .owner = THIS_MODULE, \
> - }, \
> - .probe = pm8607_regulator_probe, \
> - .remove = __devexit_p(pm8607_regulator_remove), \
> -}
> -
> -static struct platform_driver pm8607_regulator_driver[] = {
> - PM8607_REGULATOR_DRIVER(buck1),
> - PM8607_REGULATOR_DRIVER(buck2),
> - PM8607_REGULATOR_DRIVER(buck3),
> - PM8607_REGULATOR_DRIVER(ldo1),
> - PM8607_REGULATOR_DRIVER(ldo2),
> - PM8607_REGULATOR_DRIVER(ldo3),
> - PM8607_REGULATOR_DRIVER(ldo4),
> - PM8607_REGULATOR_DRIVER(ldo5),
> - PM8607_REGULATOR_DRIVER(ldo6),
> - PM8607_REGULATOR_DRIVER(ldo7),
> - PM8607_REGULATOR_DRIVER(ldo8),
> - PM8607_REGULATOR_DRIVER(ldo9),
> - PM8607_REGULATOR_DRIVER(ldo10),
> - PM8607_REGULATOR_DRIVER(ldo12),
> - PM8607_REGULATOR_DRIVER(ldo14),
> +static struct platform_driver pm8607_regulator_driver = {
> + .driver = {
> + .name = "88pm860x-regulator",
> + .owner = THIS_MODULE,
> + },
> + .probe = pm8607_regulator_probe,
> + .remove = __devexit_p(pm8607_regulator_remove),
> };
>
> static int __init pm8607_regulator_init(void)
> {
> - int i, count, ret;
> -
> - count = ARRAY_SIZE(pm8607_regulator_driver);
> - for (i = 0; i < count; i++) {
> - ret = platform_driver_register(&pm8607_regulator_driver[i]);
> - if (ret != 0)
> - pr_err("Failed to register regulator driver: %d\n",
> - ret);
> - }
> - return 0;
> + return platform_driver_register(&pm8607_regulator_driver);
> }
> subsys_initcall(pm8607_regulator_init);
>
> static void __exit pm8607_regulator_exit(void)
> {
> - int i, count;
> -
> - count = ARRAY_SIZE(pm8607_regulator_driver);
> - for (i = 0; i < count; i++)
> - platform_driver_unregister(&pm8607_regulator_driver[i]);
> + platform_driver_unregister(&pm8607_regulator_driver);
> }
> module_exit(pm8607_regulator_exit);
>
> --
> 1.5.6.5
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] regulator: make max8925 sharing one driver structure
2010-05-09 22:46 ` Samuel Ortiz
@ 2010-05-10 7:33 ` Liam Girdwood
0 siblings, 0 replies; 4+ messages in thread
From: Liam Girdwood @ 2010-05-10 7:33 UTC (permalink / raw
To: linux-arm-kernel
On Mon, 2010-05-10 at 00:46 +0200, Samuel Ortiz wrote:
> Hi Haojian,
>
> On Tue, May 04, 2010 at 03:21:42AM -0400, Haojian Zhuang wrote:
> > From 782297964a48a3b8547a99de3b5c24d8f02b99ec Mon Sep 17 00:00:00 2001
> > From: Haojian Zhuang <haojian.zhuang@marvell.com>
> > Date: Thu, 29 Apr 2010 13:33:50 -0400
> > Subject: [PATCH] regulator: make max8925 sharing one driver structure
> >
> > Remove a lot of driver structures in max8925 driver. Make regulators share
> > one driver structure.
> Patch applied, thanks.
>
> Liam, I'll carry those 2 patches with my mfd tree if you're fine with it.
Both :-
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Thanks
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-05-10 7:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-04 7:21 [PATCH 1/2] regulator: make max8925 sharing one driver structure Haojian Zhuang
2010-05-04 10:14 ` Mark Brown
2010-05-09 22:46 ` Samuel Ortiz
2010-05-10 7:33 ` Liam Girdwood
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.