Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-05 Thread Mike Looijmans
On 11/04/2014 08:47 PM, Mark Brown wrote: On Tue, Nov 04, 2014 at 02:35:50PM +0100, Mike Looijmans wrote: I still need help with one thing that isn't clear to me though. The DT is parsed when calling regulator_register. But then how do I fetch my "private" settings in there BEFORE the

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-05 Thread Krzysztof Kozlowski
On wto, 2014-11-04 at 19:47 +, Mark Brown wrote: > On Tue, Nov 04, 2014 at 02:35:50PM +0100, Mike Looijmans wrote: > > > I still need help with one thing that isn't clear to me though. The DT is > > parsed when calling regulator_register. But then how do I fetch my "private" > > settings in

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-05 Thread Krzysztof Kozlowski
On wto, 2014-11-04 at 19:47 +, Mark Brown wrote: On Tue, Nov 04, 2014 at 02:35:50PM +0100, Mike Looijmans wrote: I still need help with one thing that isn't clear to me though. The DT is parsed when calling regulator_register. But then how do I fetch my private settings in there

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-05 Thread Mike Looijmans
On 11/04/2014 08:47 PM, Mark Brown wrote: On Tue, Nov 04, 2014 at 02:35:50PM +0100, Mike Looijmans wrote: I still need help with one thing that isn't clear to me though. The DT is parsed when calling regulator_register. But then how do I fetch my private settings in there BEFORE the regulator

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-04 Thread Mark Brown
On Tue, Nov 04, 2014 at 02:35:50PM +0100, Mike Looijmans wrote: > I still need help with one thing that isn't clear to me though. The DT is > parsed when calling regulator_register. But then how do I fetch my "private" > settings in there BEFORE the regulator gets enabled? The feedback resistors

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-04 Thread Mike Looijmans
On 11/04/2014 12:34 PM, Mark Brown wrote: On Tue, Nov 04, 2014 at 09:55:14AM +0100, Mike Looijmans wrote: On 11/03/2014 06:38 PM, Mike Looijmans wrote: You need to develop against current versions of the kernel, this is something that was merged into Linus' tree during the merge window.

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-04 Thread Mike Looijmans
On 11/04/2014 12:34 PM, Mark Brown wrote: On Tue, Nov 04, 2014 at 09:55:14AM +0100, Mike Looijmans wrote: On 11/03/2014 06:38 PM, Mike Looijmans wrote: You need to develop against current versions of the kernel, this is something that was merged into Linus' tree during the merge window.

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-04 Thread Mark Brown
On Tue, Nov 04, 2014 at 09:55:14AM +0100, Mike Looijmans wrote: > On 11/03/2014 06:38 PM, Mike Looijmans wrote: > >>You need to develop against current versions of the kernel, this is > >>something that was merged into Linus' tree during the merge window. > >Is this an absolute show-stopper for

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-04 Thread Mike Looijmans
On 11/03/2014 06:38 PM, Mike Looijmans wrote: On 3-11-2014 16:10, Mark Brown wrote: On Mon, Nov 03, 2014 at 03:48:56PM +0100, Mike Looijmans wrote: On 11/03/2014 01:09 PM, Mark Brown wrote: No function calls, just use regulators_node. What is unclear about the functionality? I don't

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-04 Thread Mike Looijmans
On 11/03/2014 06:38 PM, Mike Looijmans wrote: On 3-11-2014 16:10, Mark Brown wrote: On Mon, Nov 03, 2014 at 03:48:56PM +0100, Mike Looijmans wrote: On 11/03/2014 01:09 PM, Mark Brown wrote: No function calls, just use regulators_node. What is unclear about the functionality? I don't

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-04 Thread Mark Brown
On Tue, Nov 04, 2014 at 09:55:14AM +0100, Mike Looijmans wrote: On 11/03/2014 06:38 PM, Mike Looijmans wrote: You need to develop against current versions of the kernel, this is something that was merged into Linus' tree during the merge window. Is this an absolute show-stopper for you?

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-04 Thread Mike Looijmans
On 11/04/2014 12:34 PM, Mark Brown wrote: On Tue, Nov 04, 2014 at 09:55:14AM +0100, Mike Looijmans wrote: On 11/03/2014 06:38 PM, Mike Looijmans wrote: You need to develop against current versions of the kernel, this is something that was merged into Linus' tree during the merge window.

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-04 Thread Mike Looijmans
On 11/04/2014 12:34 PM, Mark Brown wrote: On Tue, Nov 04, 2014 at 09:55:14AM +0100, Mike Looijmans wrote: On 11/03/2014 06:38 PM, Mike Looijmans wrote: You need to develop against current versions of the kernel, this is something that was merged into Linus' tree during the merge window.

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-04 Thread Mark Brown
On Tue, Nov 04, 2014 at 02:35:50PM +0100, Mike Looijmans wrote: I still need help with one thing that isn't clear to me though. The DT is parsed when calling regulator_register. But then how do I fetch my private settings in there BEFORE the regulator gets enabled? The feedback resistors and

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-03 Thread Mike Looijmans
On 3-11-2014 16:10, Mark Brown wrote: On Mon, Nov 03, 2014 at 03:48:56PM +0100, Mike Looijmans wrote: On 11/03/2014 01:09 PM, Mark Brown wrote: No function calls, just use regulators_node. What is unclear about the functionality? I don't understand what you mean by "regulators_node".

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-03 Thread Mark Brown
On Mon, Nov 03, 2014 at 03:48:56PM +0100, Mike Looijmans wrote: > On 11/03/2014 01:09 PM, Mark Brown wrote: > >No function calls, just use regulators_node. What is unclear about the > >functionality? > I don't understand what you mean by "regulators_node". > "grep -R regulators_node *" in the

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-03 Thread Mike Looijmans
On 11/03/2014 01:09 PM, Mark Brown wrote: On Mon, Nov 03, 2014 at 09:10:08AM +0100, Mike Looijmans wrote: On 10/30/2014 05:51 PM, Mark Brown wrote: + np_child = of_get_child_by_name(np_regulators, + ltc3562_regulators[i].name); + if

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-03 Thread Mark Brown
On Mon, Nov 03, 2014 at 09:10:08AM +0100, Mike Looijmans wrote: > On 10/30/2014 05:51 PM, Mark Brown wrote: > >>+ np_child = of_get_child_by_name(np_regulators, > >>+ ltc3562_regulators[i].name); > >>+ if (np_child == NULL) { > >Use the core support for

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-03 Thread Mike Looijmans
On 10/30/2014 05:51 PM, Mark Brown wrote: On Thu, Oct 30, 2014 at 12:26:55PM +0100, Mike Looijmans wrote: + np = of_node_get(i2c->dev.of_node); + np_regulators = of_get_child_by_name(np, "regulators"); + np_child = of_get_child_by_name(np_regulators, +

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-03 Thread Mike Looijmans
On 10/30/2014 05:51 PM, Mark Brown wrote: On Thu, Oct 30, 2014 at 12:26:55PM +0100, Mike Looijmans wrote: + np = of_node_get(i2c-dev.of_node); + np_regulators = of_get_child_by_name(np, regulators); + np_child = of_get_child_by_name(np_regulators, +

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-03 Thread Mark Brown
On Mon, Nov 03, 2014 at 09:10:08AM +0100, Mike Looijmans wrote: On 10/30/2014 05:51 PM, Mark Brown wrote: + np_child = of_get_child_by_name(np_regulators, + ltc3562_regulators[i].name); + if (np_child == NULL) { Use the core support for looking up

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-03 Thread Mike Looijmans
On 11/03/2014 01:09 PM, Mark Brown wrote: On Mon, Nov 03, 2014 at 09:10:08AM +0100, Mike Looijmans wrote: On 10/30/2014 05:51 PM, Mark Brown wrote: + np_child = of_get_child_by_name(np_regulators, + ltc3562_regulators[i].name); + if

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-03 Thread Mark Brown
On Mon, Nov 03, 2014 at 03:48:56PM +0100, Mike Looijmans wrote: On 11/03/2014 01:09 PM, Mark Brown wrote: No function calls, just use regulators_node. What is unclear about the functionality? I don't understand what you mean by regulators_node. grep -R regulators_node * in the kernel

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-11-03 Thread Mike Looijmans
On 3-11-2014 16:10, Mark Brown wrote: On Mon, Nov 03, 2014 at 03:48:56PM +0100, Mike Looijmans wrote: On 11/03/2014 01:09 PM, Mark Brown wrote: No function calls, just use regulators_node. What is unclear about the functionality? I don't understand what you mean by regulators_node.

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-10-31 Thread Mark Brown
On Fri, Oct 31, 2014 at 03:07:57PM +0100, Mike Looijmans wrote: > On 30-10-2014 17:51, Mark Brown wrote: > >This appears to be reimplementing regmap (including a cache). Please > >use that instead. Pretty much the entire driver could then be replaced > >with the regmap helpers, none of the

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-10-31 Thread Mike Looijmans
On 30-10-2014 17:51, Mark Brown wrote: On Thu, Oct 30, 2014 at 12:26:55PM +0100, Mike Looijmans wrote: The ltc3562 is an I2C controlled regulator supporting 4 independent outputs. v2: Prefix "lltc" to devicetree properties. Use the same property names as the ltc3589 driver. Remove

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-10-31 Thread Mike Looijmans
On 30-10-2014 17:51, Mark Brown wrote: On Thu, Oct 30, 2014 at 12:26:55PM +0100, Mike Looijmans wrote: The ltc3562 is an I2C controlled regulator supporting 4 independent outputs. v2: Prefix lltc to devicetree properties. Use the same property names as the ltc3589 driver. Remove

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-10-31 Thread Mark Brown
On Fri, Oct 31, 2014 at 03:07:57PM +0100, Mike Looijmans wrote: On 30-10-2014 17:51, Mark Brown wrote: This appears to be reimplementing regmap (including a cache). Please use that instead. Pretty much the entire driver could then be replaced with the regmap helpers, none of the operations

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-10-30 Thread Mark Brown
On Thu, Oct 30, 2014 at 12:26:55PM +0100, Mike Looijmans wrote: > The ltc3562 is an I2C controlled regulator supporting 4 independent > outputs. > > v2: Prefix "lltc" to devicetree properties. Use the same property names > as the ltc3589 driver. Remove default-voltage property. Use >

[PATCH v2] Add ltc3562 voltage regulator driver

2014-10-30 Thread Mike Looijmans
The ltc3562 is an I2C controlled regulator supporting 4 independent outputs. v2: Prefix "lltc" to devicetree properties. Use the same property names as the ltc3589 driver. Remove default-voltage property. Use devm_register_regulator. Signed-off-by: Mike Looijmans ---

[PATCH v2] Add ltc3562 voltage regulator driver

2014-10-30 Thread Mike Looijmans
The ltc3562 is an I2C controlled regulator supporting 4 independent outputs. v2: Prefix lltc to devicetree properties. Use the same property names as the ltc3589 driver. Remove default-voltage property. Use devm_register_regulator. Signed-off-by: Mike Looijmans mike.looijm...@topic.nl

Re: [PATCH v2] Add ltc3562 voltage regulator driver

2014-10-30 Thread Mark Brown
On Thu, Oct 30, 2014 at 12:26:55PM +0100, Mike Looijmans wrote: The ltc3562 is an I2C controlled regulator supporting 4 independent outputs. v2: Prefix lltc to devicetree properties. Use the same property names as the ltc3589 driver. Remove default-voltage property. Use