* [PATCH] mfd: twl-core: Clean up module by removing twl603x pdata handling
@ 2013-11-21 12:13 Ruslan Ruslichenko
2013-11-27 12:19 ` Lee Jones
2013-12-02 13:13 ` Lee Jones
0 siblings, 2 replies; 8+ messages in thread
From: Ruslan Ruslichenko @ 2013-11-21 12:13 UTC (permalink / raw)
To: Samuel Ortiz, Lee Jones; +Cc: linux-kernel, Tony Lindgren, linux-omap
Since currently nobody uses TWL603x platform data and all new
users will supply it through device tree, handling of these
data within twl-core will never be used, so remove it.
Signed-off-by: Ruslan Ruslichenko <ruslan.ruslichenko@globallogic.com>
---
Tested on TI SDP/Tablet OMAP4460 board
Based on:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
commit 5e01dc7 Linux 3.12
drivers/mfd/twl-core.c | 198 -------------------------------------------------
1 file changed, 198 deletions(-)
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 29473c2..c3c28b9 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -701,62 +701,6 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base,
usb3v1[0].dev_name = dev_name(child);
}
}
- if (IS_ENABLED(CONFIG_TWL6030_USB) && pdata->usb &&
- twl_class_is_6030()) {
-
- static struct regulator_consumer_supply usb3v3;
- int regulator;
-
- if (IS_ENABLED(CONFIG_REGULATOR_TWL4030)) {
- /* this is a template that gets copied */
- struct regulator_init_data usb_fixed = {
- .constraints.valid_modes_mask =
- REGULATOR_MODE_NORMAL
- | REGULATOR_MODE_STANDBY,
- .constraints.valid_ops_mask =
- REGULATOR_CHANGE_MODE
- | REGULATOR_CHANGE_STATUS,
- };
-
- if (features & TWL6032_SUBCLASS) {
- usb3v3.supply = "ldousb";
- regulator = TWL6032_REG_LDOUSB;
- } else {
- usb3v3.supply = "vusb";
- regulator = TWL6030_REG_VUSB;
- }
- child = add_regulator_linked(regulator, &usb_fixed,
- &usb3v3, 1,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
- }
-
- pdata->usb->features = features;
-
- child = add_child(TWL_MODULE_USB, "twl6030_usb",
- pdata->usb, sizeof(*pdata->usb), true,
- /* irq1 = VBUS_PRES, irq0 = USB ID */
- irq_base + USBOTG_INTR_OFFSET,
- irq_base + USB_PRES_INTR_OFFSET);
-
- if (IS_ERR(child))
- return PTR_ERR(child);
- /* we need to connect regulators to this transceiver */
- if (IS_ENABLED(CONFIG_REGULATOR_TWL4030) && child)
- usb3v3.dev_name = dev_name(child);
- } else if (IS_ENABLED(CONFIG_REGULATOR_TWL4030) &&
- twl_class_is_6030()) {
- if (features & TWL6032_SUBCLASS)
- child = add_regulator(TWL6032_REG_LDOUSB,
- pdata->ldousb, features);
- else
- child = add_regulator(TWL6030_REG_VUSB,
- pdata->vusb, features);
-
- if (IS_ERR(child))
- return PTR_ERR(child);
- }
if (IS_ENABLED(CONFIG_TWL4030_WATCHDOG) && twl_class_is_4030()) {
child = add_child(TWL_MODULE_PM_RECEIVER, "twl4030_wdt", NULL,
@@ -870,148 +814,6 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base,
return PTR_ERR(child);
}
- /* twl6030 regulators */
- if (IS_ENABLED(CONFIG_REGULATOR_TWL4030) && twl_class_is_6030() &&
- !(features & TWL6032_SUBCLASS)) {
- child = add_regulator(TWL6030_REG_VDD1, pdata->vdd1,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6030_REG_VDD2, pdata->vdd2,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6030_REG_VDD3, pdata->vdd3,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6030_REG_V1V8, pdata->v1v8,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6030_REG_V2V1, pdata->v2v1,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6030_REG_VMMC, pdata->vmmc,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6030_REG_VPP, pdata->vpp,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6030_REG_VUSIM, pdata->vusim,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6030_REG_VCXIO, pdata->vcxio,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6030_REG_VDAC, pdata->vdac,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6030_REG_VAUX1_6030, pdata->vaux1,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6030_REG_VAUX2_6030, pdata->vaux2,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6030_REG_VAUX3_6030, pdata->vaux3,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6030_REG_CLK32KG, pdata->clk32kg,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
- }
-
- /* 6030 and 6025 share this regulator */
- if (IS_ENABLED(CONFIG_REGULATOR_TWL4030) && twl_class_is_6030()) {
- child = add_regulator(TWL6030_REG_VANA, pdata->vana,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
- }
-
- /* twl6032 regulators */
- if (IS_ENABLED(CONFIG_REGULATOR_TWL4030) && twl_class_is_6030() &&
- (features & TWL6032_SUBCLASS)) {
- child = add_regulator(TWL6032_REG_LDO5, pdata->ldo5,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6032_REG_LDO1, pdata->ldo1,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6032_REG_LDO7, pdata->ldo7,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6032_REG_LDO6, pdata->ldo6,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6032_REG_LDOLN, pdata->ldoln,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6032_REG_LDO2, pdata->ldo2,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6032_REG_LDO4, pdata->ldo4,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6032_REG_LDO3, pdata->ldo3,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6032_REG_SMPS3, pdata->smps3,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6032_REG_SMPS4, pdata->smps4,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- child = add_regulator(TWL6032_REG_VIO, pdata->vio6025,
- features);
- if (IS_ERR(child))
- return PTR_ERR(child);
-
- }
-
if (IS_ENABLED(CONFIG_CHARGER_TWL4030) && pdata->bci &&
!(features & (TPS_SUBSET | TWL5031))) {
child = add_child(TWL_MODULE_MAIN_CHARGE, "twl4030_bci",
--
1.8.3.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] mfd: twl-core: Clean up module by removing twl603x pdata handling
2013-11-21 12:13 [PATCH] mfd: twl-core: Clean up module by removing twl603x pdata handling Ruslan Ruslichenko
@ 2013-11-27 12:19 ` Lee Jones
2013-11-28 11:48 ` Ruslan Ruslichenko
[not found] ` <CAK9oHmyq3wOwgzxPYOLjoHuHahPFJE=vEN+GZCzfu-ZFhk9_Hw@mail.gmail.com>
2013-12-02 13:13 ` Lee Jones
1 sibling, 2 replies; 8+ messages in thread
From: Lee Jones @ 2013-11-27 12:19 UTC (permalink / raw)
To: Ruslan Ruslichenko; +Cc: Samuel Ortiz, linux-kernel, Tony Lindgren, linux-omap
On Thu, 21 Nov 2013, Ruslan Ruslichenko wrote:
> Since currently nobody uses TWL603x platform data and all new
Hmm... when you say nobody, how did you come to this conclusion?
Without digging into it and probably not that relevant, it
appears there is some references to it in platform data still:
$ git grep twl603 -- arch/ | grep -v dts
arch/arm/mach-omap2/common.h:extern int omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers);
arch/arm/mach-omap2/omap4-common.c:static int omap4_twl6030_hsmmc_late_init(struct device *dev)
arch/arm/mach-omap2/omap4-common.c: irq = twl6030_mmc_card_detect_config();
arch/arm/mach-omap2/omap4-common.c: pdata->slots[0].card_detect = twl6030_mmc_card_detect;
arch/arm/mach-omap2/omap4-common.c:static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
arch/arm/mach-omap2/omap4-common.c: pdata->init = omap4_twl6030_hsmmc_late_init;
arch/arm/mach-omap2/omap4-common.c:int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
arch/arm/mach-omap2/omap4-common.c: omap4_twl6030_hsmmc_set_late_init(&c->pdev->dev);
arch/arm/mach-omap2/omap4-common.c:int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
arch/arm/mach-omap2/omap_twl.c:static unsigned long twl6030_vsel_to_uv(const u8 vsel)
arch/arm/mach-omap2/omap_twl.c:static u8 twl6030_uv_to_vsel(unsigned long uv)
arch/arm/mach-omap2/omap_twl.c: if (uv > twl6030_vsel_to_uv(0x39)) {
arch/arm/mach-omap2/omap_twl.c: __func__, uv, twl6030_vsel_to_uv(0x39));
arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv = twl6030_vsel_to_uv,
arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel = twl6030_uv_to_vsel,
arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv = twl6030_vsel_to_uv,
arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel = twl6030_uv_to_vsel,
arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv = twl6030_vsel_to_uv,
arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel = twl6030_uv_to_vsel,
> users will supply it through device tree, handling of these
> data within twl-core will never be used, so remove it.
>
> Signed-off-by: Ruslan Ruslichenko <ruslan.ruslichenko@globallogic.com>
> ---
>
> Tested on TI SDP/Tablet OMAP4460 board
> Based on:
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> commit 5e01dc7 Linux 3.12
>
> drivers/mfd/twl-core.c | 198 -------------------------------------------------
> 1 file changed, 198 deletions(-)
>
> diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
> index 29473c2..c3c28b9 100644
> --- a/drivers/mfd/twl-core.c
> +++ b/drivers/mfd/twl-core.c
> @@ -701,62 +701,6 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base,
> usb3v1[0].dev_name = dev_name(child);
> }
> }
> - if (IS_ENABLED(CONFIG_TWL6030_USB) && pdata->usb &&
> - twl_class_is_6030()) {
> -
> - static struct regulator_consumer_supply usb3v3;
> - int regulator;
> -
> - if (IS_ENABLED(CONFIG_REGULATOR_TWL4030)) {
> - /* this is a template that gets copied */
> - struct regulator_init_data usb_fixed = {
> - .constraints.valid_modes_mask =
> - REGULATOR_MODE_NORMAL
> - | REGULATOR_MODE_STANDBY,
> - .constraints.valid_ops_mask =
> - REGULATOR_CHANGE_MODE
> - | REGULATOR_CHANGE_STATUS,
> - };
> -
> - if (features & TWL6032_SUBCLASS) {
> - usb3v3.supply = "ldousb";
> - regulator = TWL6032_REG_LDOUSB;
> - } else {
> - usb3v3.supply = "vusb";
> - regulator = TWL6030_REG_VUSB;
> - }
> - child = add_regulator_linked(regulator, &usb_fixed,
> - &usb3v3, 1,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> - }
> -
> - pdata->usb->features = features;
> -
> - child = add_child(TWL_MODULE_USB, "twl6030_usb",
> - pdata->usb, sizeof(*pdata->usb), true,
> - /* irq1 = VBUS_PRES, irq0 = USB ID */
> - irq_base + USBOTG_INTR_OFFSET,
> - irq_base + USB_PRES_INTR_OFFSET);
> -
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> - /* we need to connect regulators to this transceiver */
> - if (IS_ENABLED(CONFIG_REGULATOR_TWL4030) && child)
> - usb3v3.dev_name = dev_name(child);
> - } else if (IS_ENABLED(CONFIG_REGULATOR_TWL4030) &&
> - twl_class_is_6030()) {
> - if (features & TWL6032_SUBCLASS)
> - child = add_regulator(TWL6032_REG_LDOUSB,
> - pdata->ldousb, features);
> - else
> - child = add_regulator(TWL6030_REG_VUSB,
> - pdata->vusb, features);
> -
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> - }
>
> if (IS_ENABLED(CONFIG_TWL4030_WATCHDOG) && twl_class_is_4030()) {
> child = add_child(TWL_MODULE_PM_RECEIVER, "twl4030_wdt", NULL,
> @@ -870,148 +814,6 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base,
> return PTR_ERR(child);
> }
>
> - /* twl6030 regulators */
> - if (IS_ENABLED(CONFIG_REGULATOR_TWL4030) && twl_class_is_6030() &&
> - !(features & TWL6032_SUBCLASS)) {
> - child = add_regulator(TWL6030_REG_VDD1, pdata->vdd1,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6030_REG_VDD2, pdata->vdd2,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6030_REG_VDD3, pdata->vdd3,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6030_REG_V1V8, pdata->v1v8,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6030_REG_V2V1, pdata->v2v1,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6030_REG_VMMC, pdata->vmmc,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6030_REG_VPP, pdata->vpp,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6030_REG_VUSIM, pdata->vusim,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6030_REG_VCXIO, pdata->vcxio,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6030_REG_VDAC, pdata->vdac,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6030_REG_VAUX1_6030, pdata->vaux1,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6030_REG_VAUX2_6030, pdata->vaux2,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6030_REG_VAUX3_6030, pdata->vaux3,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6030_REG_CLK32KG, pdata->clk32kg,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> - }
> -
> - /* 6030 and 6025 share this regulator */
> - if (IS_ENABLED(CONFIG_REGULATOR_TWL4030) && twl_class_is_6030()) {
> - child = add_regulator(TWL6030_REG_VANA, pdata->vana,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> - }
> -
> - /* twl6032 regulators */
> - if (IS_ENABLED(CONFIG_REGULATOR_TWL4030) && twl_class_is_6030() &&
> - (features & TWL6032_SUBCLASS)) {
> - child = add_regulator(TWL6032_REG_LDO5, pdata->ldo5,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6032_REG_LDO1, pdata->ldo1,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6032_REG_LDO7, pdata->ldo7,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6032_REG_LDO6, pdata->ldo6,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6032_REG_LDOLN, pdata->ldoln,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6032_REG_LDO2, pdata->ldo2,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6032_REG_LDO4, pdata->ldo4,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6032_REG_LDO3, pdata->ldo3,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6032_REG_SMPS3, pdata->smps3,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6032_REG_SMPS4, pdata->smps4,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - child = add_regulator(TWL6032_REG_VIO, pdata->vio6025,
> - features);
> - if (IS_ERR(child))
> - return PTR_ERR(child);
> -
> - }
> -
> if (IS_ENABLED(CONFIG_CHARGER_TWL4030) && pdata->bci &&
> !(features & (TPS_SUBSET | TWL5031))) {
> child = add_child(TWL_MODULE_MAIN_CHARGE, "twl4030_bci",
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mfd: twl-core: Clean up module by removing twl603x pdata handling
2013-11-27 12:19 ` Lee Jones
@ 2013-11-28 11:48 ` Ruslan Ruslichenko
[not found] ` <CAK9oHmyq3wOwgzxPYOLjoHuHahPFJE=vEN+GZCzfu-ZFhk9_Hw@mail.gmail.com>
1 sibling, 0 replies; 8+ messages in thread
From: Ruslan Ruslichenko @ 2013-11-28 11:48 UTC (permalink / raw)
To: Lee Jones
Cc: Samuel Ortiz, linux-kernel, Tony Lindgren, linux-omap,
Graeme Gregory
Hello Lee,
On Wed, Nov 27, 2013 at 2:19 PM, Lee Jones <lee.jones@linaro.org> wrote:
> On Thu, 21 Nov 2013, Ruslan Ruslichenko wrote:
>
>> Since currently nobody uses TWL603x platform data and all new
>
> Hmm... when you say nobody, how did you come to this conclusion?
>
> Without digging into it and probably not that relevant, it
> appears there is some references to it in platform data still:
>
> $ git grep twl603 -- arch/ | grep -v dts
> arch/arm/mach-omap2/common.h:extern int omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers);
> arch/arm/mach-omap2/omap4-common.c:static int omap4_twl6030_hsmmc_late_init(struct device *dev)
> arch/arm/mach-omap2/omap4-common.c: irq = twl6030_mmc_card_detect_config();
> arch/arm/mach-omap2/omap4-common.c: pdata->slots[0].card_detect = twl6030_mmc_card_detect;
> arch/arm/mach-omap2/omap4-common.c:static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
> arch/arm/mach-omap2/omap4-common.c: pdata->init = omap4_twl6030_hsmmc_late_init;
> arch/arm/mach-omap2/omap4-common.c:int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
> arch/arm/mach-omap2/omap4-common.c: omap4_twl6030_hsmmc_set_late_init(&c->pdev->dev);
> arch/arm/mach-omap2/omap4-common.c:int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
> arch/arm/mach-omap2/omap_twl.c:static unsigned long twl6030_vsel_to_uv(const u8 vsel)
> arch/arm/mach-omap2/omap_twl.c:static u8 twl6030_uv_to_vsel(unsigned long uv)
> arch/arm/mach-omap2/omap_twl.c: if (uv > twl6030_vsel_to_uv(0x39)) {
> arch/arm/mach-omap2/omap_twl.c: __func__, uv, twl6030_vsel_to_uv(0x39));
> arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv = twl6030_vsel_to_uv,
> arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel = twl6030_uv_to_vsel,
> arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv = twl6030_vsel_to_uv,
> arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel = twl6030_uv_to_vsel,
> arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv = twl6030_vsel_to_uv,
> arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel = twl6030_uv_to_vsel,
>
Looks like some misunderstanding is here. This patch *only* removes
platform data for TWL603x
which were used to create TWL sub-devices like regulators, adc's,
watchdogs, etc.
Previously it was set up in twl_common.c by omap4_pmic_init(), which
was called from board files
with specific pmic config.
Since now in Linux kernel 3.13 OMAP4 non-DT boot is not supported and
all OMAP4 board files
have been removed omap4_pmic_init() is never called and all TWL603x
sub-devices are created
from device tree data.
>> users will supply it through device tree, handling of these
>> data within twl-core will never be used, so remove it.
>>
>> Signed-off-by: Ruslan Ruslichenko <ruslan.ruslichenko@globallogic.com>
>> ---
>>
>> [...]
--
Regards,
Ruslan Ruslichenko | Software Engineer
GlobalLogic
www.globallogic.com
http://www.globallogic.com/email_disclaimer.txt
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mfd: twl-core: Clean up module by removing twl603x pdata handling
[not found] ` <CAK9oHmyq3wOwgzxPYOLjoHuHahPFJE=vEN+GZCzfu-ZFhk9_Hw@mail.gmail.com>
@ 2013-11-29 9:16 ` Lee Jones
2013-11-29 17:10 ` Tony Lindgren
0 siblings, 1 reply; 8+ messages in thread
From: Lee Jones @ 2013-11-29 9:16 UTC (permalink / raw)
To: Ruslan Ruslichenko, Tony Lindgren
Cc: Samuel Ortiz, linux-kernel, linux-omap, Graeme Gregory
Attn: Tony
> > > Since currently nobody uses TWL603x platform data and all new
> >
> > Hmm... when you say nobody, how did you come to this conclusion?
> >
> > Without digging into it and probably not that relevant, it
> > appears there is some references to it in platform data still:
> >
> > $ git grep twl603 -- arch/ | grep -v dts
> > arch/arm/mach-omap2/common.h:extern int omap4_twl6030_hsmmc_init(struct
> > omap2_hsmmc_info *controllers);
> > arch/arm/mach-omap2/omap4-common.c:static int
> > omap4_twl6030_hsmmc_late_init(struct device *dev)
> > arch/arm/mach-omap2/omap4-common.c: irq =
> > twl6030_mmc_card_detect_config();
> > arch/arm/mach-omap2/omap4-common.c:
> > pdata->slots[0].card_detect = twl6030_mmc_card_detect;
> > arch/arm/mach-omap2/omap4-common.c:static __init void
> > omap4_twl6030_hsmmc_set_late_init(struct device *dev)
> > arch/arm/mach-omap2/omap4-common.c: pdata->init =
> > omap4_twl6030_hsmmc_late_init;
> > arch/arm/mach-omap2/omap4-common.c:int __init
> > omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
> > arch/arm/mach-omap2/omap4-common.c:
> > omap4_twl6030_hsmmc_set_late_init(&c->pdev->dev);
> > arch/arm/mach-omap2/omap4-common.c:int __init
> > omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
> > arch/arm/mach-omap2/omap_twl.c:static unsigned long
> > twl6030_vsel_to_uv(const u8 vsel)
> > arch/arm/mach-omap2/omap_twl.c:static u8 twl6030_uv_to_vsel(unsigned long
> > uv)
> > arch/arm/mach-omap2/omap_twl.c: if (uv > twl6030_vsel_to_uv(0x39)) {
> > arch/arm/mach-omap2/omap_twl.c: __func__, uv,
> > twl6030_vsel_to_uv(0x39));
> > arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv =
> > twl6030_vsel_to_uv,
> > arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel =
> > twl6030_uv_to_vsel,
> > arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv =
> > twl6030_vsel_to_uv,
> > arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel =
> > twl6030_uv_to_vsel,
> > arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv =
> > twl6030_vsel_to_uv,
> > arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel =
> > twl6030_uv_to_vsel,
> >
> Looks like some misunderstanding is here. This patch *only* removes
> platform data for TWL603x
> which were used to create TWL sub-devices like regulators, adc's,
> watchdogs, etc.
> Previously it was set up in twl_common.c by omap4_pmic_init(), which was
> called from board files
> with specific pmic config.
> Since now in Linux kernel 3.13 OMAP4 non-DT boot is not supported and all
> OMAP4 board files
> have been removed omap4_pmic_init() is never called and all TWL603x
> sub-devices are created
> from device tree data.
I'm not overly familiar with this driver (it looks like a big
historical mess to me), or the current state of the OMAP4 platform, so
I would like a second opinion on this.
Tony would you be kind enough to oblige?
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mfd: twl-core: Clean up module by removing twl603x pdata handling
2013-11-29 9:16 ` Lee Jones
@ 2013-11-29 17:10 ` Tony Lindgren
2013-12-02 11:08 ` Lee Jones
0 siblings, 1 reply; 8+ messages in thread
From: Tony Lindgren @ 2013-11-29 17:10 UTC (permalink / raw)
To: Lee Jones
Cc: Ruslan Ruslichenko, Samuel Ortiz, linux-kernel, linux-omap,
Graeme Gregory
* Lee Jones <lee.jones@linaro.org> [131129 01:17]:
> Attn: Tony
>
> > > > Since currently nobody uses TWL603x platform data and all new
> > >
> > > Hmm... when you say nobody, how did you come to this conclusion?
> > >
> > > Without digging into it and probably not that relevant, it
> > > appears there is some references to it in platform data still:
> > >
> > > $ git grep twl603 -- arch/ | grep -v dts
> > > arch/arm/mach-omap2/common.h:extern int omap4_twl6030_hsmmc_init(struct
> > > omap2_hsmmc_info *controllers);
> > > arch/arm/mach-omap2/omap4-common.c:static int
> > > omap4_twl6030_hsmmc_late_init(struct device *dev)
> > > arch/arm/mach-omap2/omap4-common.c: irq =
> > > twl6030_mmc_card_detect_config();
> > > arch/arm/mach-omap2/omap4-common.c:
> > > pdata->slots[0].card_detect = twl6030_mmc_card_detect;
> > > arch/arm/mach-omap2/omap4-common.c:static __init void
> > > omap4_twl6030_hsmmc_set_late_init(struct device *dev)
> > > arch/arm/mach-omap2/omap4-common.c: pdata->init =
> > > omap4_twl6030_hsmmc_late_init;
> > > arch/arm/mach-omap2/omap4-common.c:int __init
> > > omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
> > > arch/arm/mach-omap2/omap4-common.c:
> > > omap4_twl6030_hsmmc_set_late_init(&c->pdev->dev);
> > > arch/arm/mach-omap2/omap4-common.c:int __init
> > > omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
> > > arch/arm/mach-omap2/omap_twl.c:static unsigned long
> > > twl6030_vsel_to_uv(const u8 vsel)
> > > arch/arm/mach-omap2/omap_twl.c:static u8 twl6030_uv_to_vsel(unsigned long
> > > uv)
> > > arch/arm/mach-omap2/omap_twl.c: if (uv > twl6030_vsel_to_uv(0x39)) {
> > > arch/arm/mach-omap2/omap_twl.c: __func__, uv,
> > > twl6030_vsel_to_uv(0x39));
> > > arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv =
> > > twl6030_vsel_to_uv,
> > > arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel =
> > > twl6030_uv_to_vsel,
> > > arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv =
> > > twl6030_vsel_to_uv,
> > > arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel =
> > > twl6030_uv_to_vsel,
> > > arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv =
> > > twl6030_vsel_to_uv,
> > > arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel =
> > > twl6030_uv_to_vsel,
> > >
> > Looks like some misunderstanding is here. This patch *only* removes
> > platform data for TWL603x
> > which were used to create TWL sub-devices like regulators, adc's,
> > watchdogs, etc.
> > Previously it was set up in twl_common.c by omap4_pmic_init(), which was
> > called from board files
> > with specific pmic config.
> > Since now in Linux kernel 3.13 OMAP4 non-DT boot is not supported and all
> > OMAP4 board files
> > have been removed omap4_pmic_init() is never called and all TWL603x
> > sub-devices are created
> > from device tree data.
>
> I'm not overly familiar with this driver (it looks like a big
> historical mess to me), or the current state of the OMAP4 platform, so
> I would like a second opinion on this.
>
> Tony would you be kind enough to oblige?
We've moved omap4 to boot based on device tree only, so that legacy
platform data is no longer being used. It might be worth checking if
we do have bindings in place for all of that, or if some of it may
still be needed to be passed as auxdata while we wait for the bindings.
Regards,
Tony
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mfd: twl-core: Clean up module by removing twl603x pdata handling
2013-11-29 17:10 ` Tony Lindgren
@ 2013-12-02 11:08 ` Lee Jones
2013-12-02 13:07 ` Ruslan Ruslichenko
0 siblings, 1 reply; 8+ messages in thread
From: Lee Jones @ 2013-12-02 11:08 UTC (permalink / raw)
To: Tony Lindgren
Cc: Ruslan Ruslichenko, Samuel Ortiz, linux-kernel, linux-omap,
Graeme Gregory
> > > > > Since currently nobody uses TWL603x platform data and all new
> > > >
> > > > Hmm... when you say nobody, how did you come to this conclusion?
> > > >
> > > > Without digging into it and probably not that relevant, it
> > > > appears there is some references to it in platform data still:
> > > >
> > > > $ git grep twl603 -- arch/ | grep -v dts
> > > > arch/arm/mach-omap2/common.h:extern int omap4_twl6030_hsmmc_init(struct
> > > > omap2_hsmmc_info *controllers);
> > > > arch/arm/mach-omap2/omap4-common.c:static int
> > > > omap4_twl6030_hsmmc_late_init(struct device *dev)
> > > > arch/arm/mach-omap2/omap4-common.c: irq =
> > > > twl6030_mmc_card_detect_config();
> > > > arch/arm/mach-omap2/omap4-common.c:
> > > > pdata->slots[0].card_detect = twl6030_mmc_card_detect;
> > > > arch/arm/mach-omap2/omap4-common.c:static __init void
> > > > omap4_twl6030_hsmmc_set_late_init(struct device *dev)
> > > > arch/arm/mach-omap2/omap4-common.c: pdata->init =
> > > > omap4_twl6030_hsmmc_late_init;
> > > > arch/arm/mach-omap2/omap4-common.c:int __init
> > > > omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
> > > > arch/arm/mach-omap2/omap4-common.c:
> > > > omap4_twl6030_hsmmc_set_late_init(&c->pdev->dev);
> > > > arch/arm/mach-omap2/omap4-common.c:int __init
> > > > omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
> > > > arch/arm/mach-omap2/omap_twl.c:static unsigned long
> > > > twl6030_vsel_to_uv(const u8 vsel)
> > > > arch/arm/mach-omap2/omap_twl.c:static u8 twl6030_uv_to_vsel(unsigned long
> > > > uv)
> > > > arch/arm/mach-omap2/omap_twl.c: if (uv > twl6030_vsel_to_uv(0x39)) {
> > > > arch/arm/mach-omap2/omap_twl.c: __func__, uv,
> > > > twl6030_vsel_to_uv(0x39));
> > > > arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv =
> > > > twl6030_vsel_to_uv,
> > > > arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel =
> > > > twl6030_uv_to_vsel,
> > > > arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv =
> > > > twl6030_vsel_to_uv,
> > > > arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel =
> > > > twl6030_uv_to_vsel,
> > > > arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv =
> > > > twl6030_vsel_to_uv,
> > > > arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel =
> > > > twl6030_uv_to_vsel,
> > > >
> > > Looks like some misunderstanding is here. This patch *only* removes
> > > platform data for TWL603x
> > > which were used to create TWL sub-devices like regulators, adc's,
> > > watchdogs, etc.
> > > Previously it was set up in twl_common.c by omap4_pmic_init(), which was
> > > called from board files
> > > with specific pmic config.
> > > Since now in Linux kernel 3.13 OMAP4 non-DT boot is not supported and all
> > > OMAP4 board files
> > > have been removed omap4_pmic_init() is never called and all TWL603x
> > > sub-devices are created
> > > from device tree data.
> >
> > I'm not overly familiar with this driver (it looks like a big
> > historical mess to me), or the current state of the OMAP4 platform, so
> > I would like a second opinion on this.
> >
> > Tony would you be kind enough to oblige?
>
> We've moved omap4 to boot based on device tree only, so that legacy
> platform data is no longer being used. It might be worth checking if
> we do have bindings in place for all of that, or if some of it may
> still be needed to be passed as auxdata while we wait for the bindings.
Ruslan, do you know the answer to these concerns?
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mfd: twl-core: Clean up module by removing twl603x pdata handling
2013-12-02 11:08 ` Lee Jones
@ 2013-12-02 13:07 ` Ruslan Ruslichenko
0 siblings, 0 replies; 8+ messages in thread
From: Ruslan Ruslichenko @ 2013-12-02 13:07 UTC (permalink / raw)
To: Lee Jones
Cc: Tony Lindgren, Samuel Ortiz, linux-kernel, linux-omap,
Graeme Gregory
Since add_children() never called in not-dt boot, this patch does not
change current
OMAP4 boot behavior and devices initialization.
Also as far as I see all these twl603x regulators (apart from CLK32KG)
and TWL usb
module now have dt-bindings support. Device tree support for CLK32KG
have been removed
since it should not be registered as regulator at all.
So this patch can merged safely.
On Mon, Dec 2, 2013 at 1:08 PM, Lee Jones <lee.jones@linaro.org> wrote:
>> > > > > Since currently nobody uses TWL603x platform data and all new
>> > > >
>> > > > Hmm... when you say nobody, how did you come to this conclusion?
>> > > >
>> > > > Without digging into it and probably not that relevant, it
>> > > > appears there is some references to it in platform data still:
>> > > >
>> > > > $ git grep twl603 -- arch/ | grep -v dts
>> > > > arch/arm/mach-omap2/common.h:extern int omap4_twl6030_hsmmc_init(struct
>> > > > omap2_hsmmc_info *controllers);
>> > > > arch/arm/mach-omap2/omap4-common.c:static int
>> > > > omap4_twl6030_hsmmc_late_init(struct device *dev)
>> > > > arch/arm/mach-omap2/omap4-common.c: irq =
>> > > > twl6030_mmc_card_detect_config();
>> > > > arch/arm/mach-omap2/omap4-common.c:
>> > > > pdata->slots[0].card_detect = twl6030_mmc_card_detect;
>> > > > arch/arm/mach-omap2/omap4-common.c:static __init void
>> > > > omap4_twl6030_hsmmc_set_late_init(struct device *dev)
>> > > > arch/arm/mach-omap2/omap4-common.c: pdata->init =
>> > > > omap4_twl6030_hsmmc_late_init;
>> > > > arch/arm/mach-omap2/omap4-common.c:int __init
>> > > > omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
>> > > > arch/arm/mach-omap2/omap4-common.c:
>> > > > omap4_twl6030_hsmmc_set_late_init(&c->pdev->dev);
>> > > > arch/arm/mach-omap2/omap4-common.c:int __init
>> > > > omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
>> > > > arch/arm/mach-omap2/omap_twl.c:static unsigned long
>> > > > twl6030_vsel_to_uv(const u8 vsel)
>> > > > arch/arm/mach-omap2/omap_twl.c:static u8 twl6030_uv_to_vsel(unsigned long
>> > > > uv)
>> > > > arch/arm/mach-omap2/omap_twl.c: if (uv > twl6030_vsel_to_uv(0x39)) {
>> > > > arch/arm/mach-omap2/omap_twl.c: __func__, uv,
>> > > > twl6030_vsel_to_uv(0x39));
>> > > > arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv =
>> > > > twl6030_vsel_to_uv,
>> > > > arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel =
>> > > > twl6030_uv_to_vsel,
>> > > > arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv =
>> > > > twl6030_vsel_to_uv,
>> > > > arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel =
>> > > > twl6030_uv_to_vsel,
>> > > > arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv =
>> > > > twl6030_vsel_to_uv,
>> > > > arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel =
>> > > > twl6030_uv_to_vsel,
>> > > >
>> > > Looks like some misunderstanding is here. This patch *only* removes
>> > > platform data for TWL603x
>> > > which were used to create TWL sub-devices like regulators, adc's,
>> > > watchdogs, etc.
>> > > Previously it was set up in twl_common.c by omap4_pmic_init(), which was
>> > > called from board files
>> > > with specific pmic config.
>> > > Since now in Linux kernel 3.13 OMAP4 non-DT boot is not supported and all
>> > > OMAP4 board files
>> > > have been removed omap4_pmic_init() is never called and all TWL603x
>> > > sub-devices are created
>> > > from device tree data.
>> >
>> > I'm not overly familiar with this driver (it looks like a big
>> > historical mess to me), or the current state of the OMAP4 platform, so
>> > I would like a second opinion on this.
>> >
>> > Tony would you be kind enough to oblige?
>>
>> We've moved omap4 to boot based on device tree only, so that legacy
>> platform data is no longer being used. It might be worth checking if
>> we do have bindings in place for all of that, or if some of it may
>> still be needed to be passed as auxdata while we wait for the bindings.
>
> Ruslan, do you know the answer to these concerns?
>
> --
> Lee Jones
> Linaro STMicroelectronics Landing Team Lead
> Linaro.org │ Open source software for ARM SoCs
> Follow Linaro: Facebook | Twitter | Blog
--
Ruslan Ruslichenko | Software Engineer
GlobalLogic
www.globallogic.com
http://www.globallogic.com/email_disclaimer.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mfd: twl-core: Clean up module by removing twl603x pdata handling
2013-11-21 12:13 [PATCH] mfd: twl-core: Clean up module by removing twl603x pdata handling Ruslan Ruslichenko
2013-11-27 12:19 ` Lee Jones
@ 2013-12-02 13:13 ` Lee Jones
1 sibling, 0 replies; 8+ messages in thread
From: Lee Jones @ 2013-12-02 13:13 UTC (permalink / raw)
To: Ruslan Ruslichenko; +Cc: Samuel Ortiz, linux-kernel, Tony Lindgren, linux-omap
On Thu, 21 Nov 2013, Ruslan Ruslichenko wrote:
> Since currently nobody uses TWL603x platform data and all new
> users will supply it through device tree, handling of these
> data within twl-core will never be used, so remove it.
>
> Signed-off-by: Ruslan Ruslichenko <ruslan.ruslichenko@globallogic.com>
> ---
>
> Tested on TI SDP/Tablet OMAP4460 board
> Based on:
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> commit 5e01dc7 Linux 3.12
>
> drivers/mfd/twl-core.c | 198 -------------------------------------------------
> 1 file changed, 198 deletions(-)
Okay, I'm suitably happy with yours and Tony's responses.
Patch applied, thanks.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-12-02 13:13 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-21 12:13 [PATCH] mfd: twl-core: Clean up module by removing twl603x pdata handling Ruslan Ruslichenko
2013-11-27 12:19 ` Lee Jones
2013-11-28 11:48 ` Ruslan Ruslichenko
[not found] ` <CAK9oHmyq3wOwgzxPYOLjoHuHahPFJE=vEN+GZCzfu-ZFhk9_Hw@mail.gmail.com>
2013-11-29 9:16 ` Lee Jones
2013-11-29 17:10 ` Tony Lindgren
2013-12-02 11:08 ` Lee Jones
2013-12-02 13:07 ` Ruslan Ruslichenko
2013-12-02 13:13 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).