> It is more idiomatic to process things relating to the regulator in its > driver. This patch moves both processing of device tree relating to the > regulator and checking if the regulator is external from arizona-core > into the regulator driver. > > Signed-off-by: Charles Keepax <ckee...@opensource.wolfsonmicro.com> > --- > drivers/mfd/arizona-core.c | 12 +++--------- > drivers/regulator/arizona-ldo1.c | 30 ++++++++++++++++++++++++++++++ > 2 files changed, 33 insertions(+), 9 deletions(-) > > diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c > index 333621e..c5fe3bb 100644 > --- a/drivers/mfd/arizona-core.c > +++ b/drivers/mfd/arizona-core.c > @@ -539,7 +539,6 @@ static int arizona_of_get_core_pdata(struct arizona > *arizona) > int ret, i; > > arizona_of_get_named_gpio(arizona, "wlf,reset", true, &pdata->reset); > - arizona_of_get_named_gpio(arizona, "wlf,ldoena", true, &pdata->ldoena); > > ret = of_property_read_u32_array(arizona->dev->of_node, > "wlf,gpio-defaults", > @@ -671,6 +670,9 @@ int arizona_dev_init(struct arizona *arizona) > return -EINVAL; > } > > + /* Mark DCVDD as external, LDO1 driver will clear if internal */ > + arizona->external_dcvdd = true; > +
You don't need to do this, as it's already the default: include/linux/mfd/arizona/core.h: struct arizona { <snip> unsigned int external_dcvdd:1; <snip> }; Also you're adding a bool value to a unsigned int. Any reason for that? -- 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-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/