Re: [PATCH 1/2] regulator: max1586 add device-tree support

2014-06-24 Thread Mark Brown
On Tue, Jun 24, 2014 at 08:05:30PM +0200, Robert Jarzmik wrote: > Mark Brown writes: > >> As for the "state report", this max1586 doesn't report anything, it cannot > >> even > >> be queried about the current voltage, sic ... > > It can't? That's unfortunate, though I was able to turn up a

Re: [PATCH 1/2] regulator: max1586 add device-tree support

2014-06-24 Thread Robert Jarzmik
Mark Brown writes: > On Tue, Jun 17, 2014 at 09:16:52PM +0200, Robert Jarzmik wrote: >> Mark Brown writes: >> > On Sat, Jun 14, 2014 at 04:54:24PM +0200, Robert Jarzmik wrote: > >> >> + matched = of_regulator_match(dev, np, rmatch, ARRAY_SIZE(rmatch)); >> >> + of_node_put(np); >> >> + if

Re: [PATCH 1/2] regulator: max1586 add device-tree support

2014-06-24 Thread Mark Brown
On Tue, Jun 17, 2014 at 09:16:52PM +0200, Robert Jarzmik wrote: > Mark Brown writes: > > On Sat, Jun 14, 2014 at 04:54:24PM +0200, Robert Jarzmik wrote: > >> + matched = of_regulator_match(dev, np, rmatch, ARRAY_SIZE(rmatch)); > >> + of_node_put(np); > >> + if (matched <= 0) > >> +

Re: [PATCH 1/2] regulator: max1586 add device-tree support

2014-06-24 Thread Mark Brown
On Tue, Jun 17, 2014 at 09:16:52PM +0200, Robert Jarzmik wrote: Mark Brown broo...@kernel.org writes: On Sat, Jun 14, 2014 at 04:54:24PM +0200, Robert Jarzmik wrote: + matched = of_regulator_match(dev, np, rmatch, ARRAY_SIZE(rmatch)); + of_node_put(np); + if (matched = 0) +

Re: [PATCH 1/2] regulator: max1586 add device-tree support

2014-06-24 Thread Robert Jarzmik
Mark Brown broo...@kernel.org writes: On Tue, Jun 17, 2014 at 09:16:52PM +0200, Robert Jarzmik wrote: Mark Brown broo...@kernel.org writes: On Sat, Jun 14, 2014 at 04:54:24PM +0200, Robert Jarzmik wrote: + matched = of_regulator_match(dev, np, rmatch, ARRAY_SIZE(rmatch)); +

Re: [PATCH 1/2] regulator: max1586 add device-tree support

2014-06-24 Thread Mark Brown
On Tue, Jun 24, 2014 at 08:05:30PM +0200, Robert Jarzmik wrote: Mark Brown broo...@kernel.org writes: As for the state report, this max1586 doesn't report anything, it cannot even be queried about the current voltage, sic ... It can't? That's unfortunate, though I was able to turn up

Re: [PATCH 1/2] regulator: max1586 add device-tree support

2014-06-17 Thread Robert Jarzmik
Mark Brown writes: > On Sat, Jun 14, 2014 at 04:54:24PM +0200, Robert Jarzmik wrote: > >> +matched = of_regulator_match(dev, np, rmatch, ARRAY_SIZE(rmatch)); >> +of_node_put(np); >> +if (matched <= 0) >> +return matched; > > Why is this treating zero as an error? We

Re: [PATCH 1/2] regulator: max1586 add device-tree support

2014-06-17 Thread Mark Brown
On Sat, Jun 14, 2014 at 04:54:24PM +0200, Robert Jarzmik wrote: > + matched = of_regulator_match(dev, np, rmatch, ARRAY_SIZE(rmatch)); > + of_node_put(np); > + if (matched <= 0) > + return matched; Why is this treating zero as an error? We should be able to at least

Re: [PATCH 1/2] regulator: max1586 add device-tree support

2014-06-17 Thread Mark Brown
On Sat, Jun 14, 2014 at 04:54:24PM +0200, Robert Jarzmik wrote: + matched = of_regulator_match(dev, np, rmatch, ARRAY_SIZE(rmatch)); + of_node_put(np); + if (matched = 0) + return matched; Why is this treating zero as an error? We should be able to at least report

Re: [PATCH 1/2] regulator: max1586 add device-tree support

2014-06-17 Thread Robert Jarzmik
Mark Brown broo...@kernel.org writes: On Sat, Jun 14, 2014 at 04:54:24PM +0200, Robert Jarzmik wrote: +matched = of_regulator_match(dev, np, rmatch, ARRAY_SIZE(rmatch)); +of_node_put(np); +if (matched = 0) +return matched; Why is this treating zero as an error? We

[PATCH 1/2] regulator: max1586 add device-tree support

2014-06-14 Thread Robert Jarzmik
Add device-tree support to max1586. The driver can still be used with the legacy platform data, or the new device-tree way. This work is heavily inspired by the device-tree support of its cousin max8660 driver. Signed-off-by: Robert Jarzmik --- drivers/regulator/max1586.c | 74

[PATCH 1/2] regulator: max1586 add device-tree support

2014-06-14 Thread Robert Jarzmik
Add device-tree support to max1586. The driver can still be used with the legacy platform data, or the new device-tree way. This work is heavily inspired by the device-tree support of its cousin max8660 driver. Signed-off-by: Robert Jarzmik robert.jarz...@free.fr --- drivers/regulator/max1586.c