Re: [PATCH v3] Add ltc3562 voltage regulator driver

2014-11-05 Thread Mark Brown
On Wed, Nov 05, 2014 at 12:41:34PM +0100, Mike Looijmans wrote: > On 11/04/2014 09:26 PM, Mark Brown wrote: > >So, I managed to find a datasheet[1] and this does actually seem to be a > >standard register map. It looks like this is a 4x12 register map with > >the program bytes being essentially

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 regulato

Re: [PATCH v3] Add ltc3562 voltage regulator driver

2014-11-05 Thread Mike Looijmans
On 11/04/2014 09:26 PM, Mark Brown wrote: On Tue, Nov 04, 2014 at 07:50:45AM +0100, Mike Looijmans wrote: v3: Add .of_match_table and prefix lltc Clarify why regmap cannot be used Add lltc,operating-mode (0..3) DT property regulator child nodes are optional Leave out the mode

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 th

Re: [PATCH v3] Add ltc3562 voltage regulator driver

2014-11-04 Thread Mark Brown
On Tue, Nov 04, 2014 at 07:50:45AM +0100, Mike Looijmans wrote: > v3: Add .of_match_table and prefix lltc > Clarify why regmap cannot be used > Add lltc,operating-mode (0..3) DT property > regulator child nodes are optional Leave out the mode setting in the DT for now please, Javier w

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 un

[PATCH v3] Add ltc3562 voltage regulator driver

2014-11-03 Thread Mike Looijmans
The ltc3562 is an I2C controlled regulator supporting 4 independent outputs. Signed-off-by: Mike Looijmans --- v3: Add .of_match_table and prefix lltc Clarify why regmap cannot be used Add lltc,operating-mode (0..3) DT property regulator child nodes are optional .../devicetree/bin

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 (np_chil

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 look

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-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 opera

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 default-

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 > devm_

Re: [PATCH] Add ltc3562 voltage regulator driver

2014-10-30 Thread Mark Brown
On Thu, Oct 30, 2014 at 12:31:42PM +0100, Mike Looijmans wrote: > On 10/30/2014 11:58 AM, Mark Brown wrote: > >>Hmm, I looked into doing that, but that isn't trivial, and too many devices > >>will suffer. > >Why would this have a negative effect on other devices? Unless somehow > >the other dev

Re: [PATCH] Add ltc3562 voltage regulator driver

2014-10-30 Thread Mike Looijmans
On 10/30/2014 11:58 AM, Mark Brown wrote: On Thu, Oct 30, 2014 at 11:53:37AM +0100, Mike Looijmans wrote: On 10/30/2014 11:29 AM, Mike Looijmans wrote: So I should add "regulator-default-voltage" to the generic code? That would indeed be better than trying to do it into this driver. But

[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 --- .../devicetree/bind

Re: [PATCH] Add ltc3562 voltage regulator driver

2014-10-30 Thread Mark Brown
On Thu, Oct 30, 2014 at 11:53:37AM +0100, Mike Looijmans wrote: > On 10/30/2014 11:29 AM, Mike Looijmans wrote: > >So I should add "regulator-default-voltage" to the generic code? That would > >indeed be better than trying to do it into this driver. > >But would that need a separate patch for re

Re: [PATCH] Add ltc3562 voltage regulator driver

2014-10-30 Thread Mike Looijmans
On 10/30/2014 11:29 AM, Mike Looijmans wrote: On 10/30/2014 11:15 AM, Mark Brown wrote: On Thu, Oct 30, 2014 at 07:47:44AM +0100, Mike Looijmans wrote: On 10/29/2014 01:30 PM, Mark Brown wrote: A couple of problems here: - This contains DT code but no DT bindings documentation; the bi

Re: [PATCH] Add ltc3562 voltage regulator driver

2014-10-30 Thread Mike Looijmans
On 10/30/2014 11:15 AM, Mark Brown wrote: On Thu, Oct 30, 2014 at 07:47:44AM +0100, Mike Looijmans wrote: On 10/29/2014 01:30 PM, Mark Brown wrote: A couple of problems here: - This contains DT code but no DT bindings documentation; the binding documentation is mandatory for any ne

Re: [PATCH] Add ltc3562 voltage regulator driver

2014-10-30 Thread Mark Brown
On Thu, Oct 30, 2014 at 07:47:44AM +0100, Mike Looijmans wrote: > On 10/29/2014 01:30 PM, Mark Brown wrote: > >A couple of problems here: > > - This contains DT code but no DT bindings documentation; the binding > >documentation is mandatory for any new bindings. > Should I submit a new pa

Re: [PATCH] Add ltc3562 voltage regulator driver

2014-10-29 Thread Mike Looijmans
On 10/29/2014 01:30 PM, Mark Brown wrote: On Wed, Oct 29, 2014 at 09:16:00AM +0100, Mike Looijmans wrote: + if (!status->voltage_set) { + if (of_property_read_u32(dev->dev.of_node, + "ltc3562-default-voltage", &v_default) == 0) { A couple of problems

Re: [PATCH] Add ltc3562 voltage regulator driver

2014-10-29 Thread Mark Brown
On Wed, Oct 29, 2014 at 09:16:00AM +0100, Mike Looijmans wrote: > + if (!status->voltage_set) { > + if (of_property_read_u32(dev->dev.of_node, > + "ltc3562-default-voltage", &v_default) == 0) { A couple of problems here: - This contains DT code but no DT bind

Re: Add ltc3562 voltage regulator driver

2014-10-29 Thread Mark Brown
On Wed, Oct 29, 2014 at 09:15:59AM +0100, Mike Looijmans wrote: > This patch adds the LTC3562 I2C controlled voltage regulator to > the kernel. The driver was tested and developed on a Topic Miami > board where this chip supplies the IO voltages for the FPGA pins. Please don't send cover letters f

[PATCH] Add ltc3562 voltage regulator driver

2014-10-29 Thread Mike Looijmans
The ltc3562 is an I2C controlled regulator supporting 4 independent outputs. Signed-off-by: Mike Looijmans --- drivers/regulator/Kconfig |7 + drivers/regulator/Makefile |1 + drivers/regulator/ltc3562.c | 387 +++ 3 files changed, 395 insertio

Add ltc3562 voltage regulator driver

2014-10-29 Thread Mike Looijmans
This patch adds the LTC3562 I2C controlled voltage regulator to the kernel. The driver was tested and developed on a Topic Miami board where this chip supplies the IO voltages for the FPGA pins. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to