Re: [RFC PATCH 2/3] regulator: max77686: Add support for various operating modes
On Tue, Dec 11, 2012 at 6:27 PM, Mark Brown wrote: > On Mon, Dec 10, 2012 at 02:06:49PM +0530, Abhilash Kesavan wrote: >> On Mon, Dec 10, 2012 at 1:49 PM, Abhilash Kesavan >> wrote: > >> > Mark Brown opensource.wolfsonmicro.com> writes: > >> >> Binding documenation is mandatory for any new OF properties, please add >> >> this. > >> > Patch 3/3 of this series adds documentation for the max77686-opmode >> > property. > > There is no point in splitting changes like this up, it just makes > review harder - in this case it caused me to not read your patch due > to the missing documentation. Put the whole change together unless > things are getting too big to review. OK. Can you please have a look at Doug's proposal for handling the operating mode generically in patch 3/3 of this series. If you are OK with it then I'll start work on implementing it. Thanks, Abhilash -- 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/
Re: [RFC PATCH 2/3] regulator: max77686: Add support for various operating modes
On Mon, Dec 10, 2012 at 02:06:49PM +0530, Abhilash Kesavan wrote: > On Mon, Dec 10, 2012 at 1:49 PM, Abhilash Kesavan > wrote: > > Mark Brown opensource.wolfsonmicro.com> writes: > >> Binding documenation is mandatory for any new OF properties, please add > >> this. > > Patch 3/3 of this series adds documentation for the max77686-opmode > > property. There is no point in splitting changes like this up, it just makes review harder - in this case it caused me to not read your patch due to the missing documentation. Put the whole change together unless things are getting too big to review. signature.asc Description: Digital signature
Re: [RFC PATCH 2/3] regulator: max77686: Add support for various operating modes
On Mon, Dec 10, 2012 at 02:06:49PM +0530, Abhilash Kesavan wrote: On Mon, Dec 10, 2012 at 1:49 PM, Abhilash Kesavan kesavan.abhil...@gmail.com wrote: Mark Brown broonie at opensource.wolfsonmicro.com writes: Binding documenation is mandatory for any new OF properties, please add this. Patch 3/3 of this series adds documentation for the max77686-opmode property. There is no point in splitting changes like this up, it just makes review harder - in this case it caused me to not read your patch due to the missing documentation. Put the whole change together unless things are getting too big to review. signature.asc Description: Digital signature
Re: [RFC PATCH 2/3] regulator: max77686: Add support for various operating modes
On Tue, Dec 11, 2012 at 6:27 PM, Mark Brown broo...@opensource.wolfsonmicro.com wrote: On Mon, Dec 10, 2012 at 02:06:49PM +0530, Abhilash Kesavan wrote: On Mon, Dec 10, 2012 at 1:49 PM, Abhilash Kesavan kesavan.abhil...@gmail.com wrote: Mark Brown broonie at opensource.wolfsonmicro.com writes: Binding documenation is mandatory for any new OF properties, please add this. Patch 3/3 of this series adds documentation for the max77686-opmode property. There is no point in splitting changes like this up, it just makes review harder - in this case it caused me to not read your patch due to the missing documentation. Put the whole change together unless things are getting too big to review. OK. Can you please have a look at Doug's proposal for handling the operating mode generically in patch 3/3 of this series. If you are OK with it then I'll start work on implementing it. Thanks, Abhilash -- 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/
Re: [RFC PATCH 2/3] regulator: max77686: Add support for various operating modes
Adding missed Cc's On Mon, Dec 10, 2012 at 1:49 PM, Abhilash Kesavan wrote: > Mark Brown opensource.wolfsonmicro.com> writes: > > [...] >> Binding documenation is mandatory for any new OF properties, please add >> this. > Patch 3/3 of this series adds documentation for the max77686-opmode property. >> > > > > -- > 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/ -- 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/
Re: [RFC PATCH 2/3] regulator: max77686: Add support for various operating modes
Mark Brown opensource.wolfsonmicro.com> writes: [...] > Binding documenation is mandatory for any new OF properties, please add > this. Patch 3/3 of this series adds documentation for the max77686-opmode property. > -- 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/
Re: [RFC PATCH 2/3] regulator: max77686: Add support for various operating modes
Mark Brown broonie at opensource.wolfsonmicro.com writes: [...] Binding documenation is mandatory for any new OF properties, please add this. Patch 3/3 of this series adds documentation for the max77686-opmode property. -- 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/
Re: [RFC PATCH 2/3] regulator: max77686: Add support for various operating modes
Adding missed Cc's On Mon, Dec 10, 2012 at 1:49 PM, Abhilash Kesavan kesavan.abhil...@gmail.com wrote: Mark Brown broonie at opensource.wolfsonmicro.com writes: [...] Binding documenation is mandatory for any new OF properties, please add this. Patch 3/3 of this series adds documentation for the max77686-opmode property. -- 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/ -- 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/
Re: [RFC PATCH 2/3] regulator: max77686: Add support for various operating modes
On Mon, Dec 10, 2012 at 11:56:23AM +0530, Abhilash Kesavan wrote: > + if (of_property_read_u32(rdata[i].of_node, "max77686-opmode", > + [i].opmode)) { > + dev_warn(iodev->dev, "no op_mode property property at > %s\n", > + rmatch.name); > + rdata[i].opmode = regulators[i].enable_mask; > + } Binding documenation is mandatory for any new OF properties, please add this. -- 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/
[RFC PATCH 2/3] regulator: max77686: Add support for various operating modes
Currently, we cannot specify the regulator suspend state via device tree. Add an optional operating mode property which can be used to set initially the regulator mode. We are currently bypassing the set_suspend_disable and set_suspend_mode call-backs. Signed-off-by: Abhilash Kesavan --- drivers/regulator/max77686.c | 11 ++- include/linux/mfd/max77686.h |1 + 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c index b85040c..7f16bc7 100644 --- a/drivers/regulator/max77686.c +++ b/drivers/regulator/max77686.c @@ -410,6 +410,12 @@ static int max77686_pmic_dt_parse_pdata(struct max77686_dev *iodev, of_regulator_match(iodev->dev, regulators_np, , 1); rdata[i].initdata = rmatch.init_data; rdata[i].of_node = rmatch.of_node; + if (of_property_read_u32(rdata[i].of_node, "max77686-opmode", + [i].opmode)) { + dev_warn(iodev->dev, "no op_mode property property at %s\n", + rmatch.name); + rdata[i].opmode = regulators[i].enable_mask; + } } pdata->regulators = rdata; @@ -465,7 +471,10 @@ static int max77686_pmic_probe(struct platform_device *pdev) config.init_data = pdata->regulators[i].initdata; config.of_node = pdata->regulators[i].of_node; - max77686->opmode[i] = regulators[i].enable_mask; + if (config.of_node) + max77686->opmode[i] = pdata->regulators[i].opmode; + else + max77686->opmode[i] = regulators[i].enable_mask; max77686->rdev[i] = regulator_register([i], ); if (IS_ERR(max77686->rdev[i])) { ret = PTR_ERR(max77686->rdev[i]); diff --git a/include/linux/mfd/max77686.h b/include/linux/mfd/max77686.h index 46c0f32..e8bd83b 100644 --- a/include/linux/mfd/max77686.h +++ b/include/linux/mfd/max77686.h @@ -73,6 +73,7 @@ enum max77686_regulators { struct max77686_regulator_data { int id; + int opmode; struct regulator_init_data *initdata; struct device_node *of_node; }; -- 1.7.8.6 -- 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/
[RFC PATCH 2/3] regulator: max77686: Add support for various operating modes
Currently, we cannot specify the regulator suspend state via device tree. Add an optional operating mode property which can be used to set initially the regulator mode. We are currently bypassing the set_suspend_disable and set_suspend_mode call-backs. Signed-off-by: Abhilash Kesavan a.kesa...@samsung.com --- drivers/regulator/max77686.c | 11 ++- include/linux/mfd/max77686.h |1 + 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c index b85040c..7f16bc7 100644 --- a/drivers/regulator/max77686.c +++ b/drivers/regulator/max77686.c @@ -410,6 +410,12 @@ static int max77686_pmic_dt_parse_pdata(struct max77686_dev *iodev, of_regulator_match(iodev-dev, regulators_np, rmatch, 1); rdata[i].initdata = rmatch.init_data; rdata[i].of_node = rmatch.of_node; + if (of_property_read_u32(rdata[i].of_node, max77686-opmode, + rdata[i].opmode)) { + dev_warn(iodev-dev, no op_mode property property at %s\n, + rmatch.name); + rdata[i].opmode = regulators[i].enable_mask; + } } pdata-regulators = rdata; @@ -465,7 +471,10 @@ static int max77686_pmic_probe(struct platform_device *pdev) config.init_data = pdata-regulators[i].initdata; config.of_node = pdata-regulators[i].of_node; - max77686-opmode[i] = regulators[i].enable_mask; + if (config.of_node) + max77686-opmode[i] = pdata-regulators[i].opmode; + else + max77686-opmode[i] = regulators[i].enable_mask; max77686-rdev[i] = regulator_register(regulators[i], config); if (IS_ERR(max77686-rdev[i])) { ret = PTR_ERR(max77686-rdev[i]); diff --git a/include/linux/mfd/max77686.h b/include/linux/mfd/max77686.h index 46c0f32..e8bd83b 100644 --- a/include/linux/mfd/max77686.h +++ b/include/linux/mfd/max77686.h @@ -73,6 +73,7 @@ enum max77686_regulators { struct max77686_regulator_data { int id; + int opmode; struct regulator_init_data *initdata; struct device_node *of_node; }; -- 1.7.8.6 -- 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/
Re: [RFC PATCH 2/3] regulator: max77686: Add support for various operating modes
On Mon, Dec 10, 2012 at 11:56:23AM +0530, Abhilash Kesavan wrote: + if (of_property_read_u32(rdata[i].of_node, max77686-opmode, + rdata[i].opmode)) { + dev_warn(iodev-dev, no op_mode property property at %s\n, + rmatch.name); + rdata[i].opmode = regulators[i].enable_mask; + } Binding documenation is mandatory for any new OF properties, please add this. -- 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/