Re: [PATCH v2] Add ltc3562 voltage regulator driver

From: Krzysztof Kozlowski
Date: Wed Nov 05 2014 - 04:07:22 EST


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/