Messages in this thread | | | Subject | Re: [PATCH v2] Add ltc3562 voltage regulator driver | From | Krzysztof Kozlowski <> | Date | Wed, 05 Nov 2014 10:06:43 +0100 |
| |
On wto, 2014-11-04 at 19:47 +0000, 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 gets enabled? The feedback resistors > > and regulator mode must be set to the correct board before the output is > > enabled, otherwise it may damage the chip and its periferals. > > Add a callback for this. Javier and/or Krzysztof were looking at this > for some other stuff, though I think they were intending to add core > functionality for their specific feature.
I needed a callback and added such. The callback was called on each DT node parsed. However I dropped that idea because it turned our to be unsuitable to my case.
I needed to feed regulator_config.ena_gpio with data parsed from such callback. But the callback called from inside the regulator_register() has the regulator_config const.
Best regards, Krzysztof
| |