Messages in this thread | | | Subject | Re: [PATCH 1/2] regulator: core: Allow use of "status = disabled" in regulator dts nodes | From | Hans de Goede <> | Date | Wed, 27 Apr 2016 16:31:02 +0200 |
| |
Hi,
On 27-04-16 16:24, Mark Brown wrote: > On Wed, Apr 27, 2016 at 04:03:44PM +0200, Hans de Goede wrote: > >> So if we want to use these pins as gpio pins we must not register >> a regulator for these pins at all, otherwise any gpio use (switching >> to input, or writing a value) gets undone when the regulator subsys >> disables unused regulators at the end of kernel-init. > > The regulator API should not touch any regulators that it doesn't have > permission to change the state for. All other regulators are strictly > read only.
How do we give permission to change state ? Is omitting the dts node, and thus not returning a node / constrains from regulator_of_get_init_data enough for the regulator API to not have permission ?
Is there any way to see this in sysfs ?
>> This commits allows the use of "status = disabled" in regulator dts >> nodes and makes regulator_register return ENODEV when this is set. > > If the regulator can't be changed why is it in the DT in the first > place?
The regulator is part of the pmic and the axp20x regulator driver registers all regulators on the pmic when the pmic-s mfd instantiated regulators-platform-device gets probed.
We do use a whole bunch of the other regulators. This patch-set is an attempt to make the control more fine-grained then register all / no regulators by support status=disabled in the regulator nodes. But maybe I'm missing something and this is not necessary, see the earlier part of this reply.
Regards,
Hans
| |