freebsd-dev/sys/dev/extres/regulator
Michal Meloun bcc0decdc9 Fix handling of enable counter for shared GPIO line in fixed regulator.
For most regulators, the regulator_stop() method can be transformed to
regulator disable. But, in some cases, we needs to maintain shared data
across multiple regulators (e.g. single GPIO pin which works as enable
for multiple regulates). In this case, the implementation of regulator
should perform his own enable counting therefore it is necessary to
distinguish between the regulator enable/disable method (which
increments/decrements enable counter for shared resource) and regulator
stop method (which don't affect it).

So:
- add regnode_stop() method to regulator framework and default it to
  regnode_enable(..., false, ...)
- implement it in regulator_fixed with proper enable counting.

While I'm in, also fix handling of always_on property. If any of regulators
sharing same GPIO pin have it enabled, then none of them can disable regulator.

Tested by: kevans
MFC after: 3 weeks
2018-06-16 08:25:38 +00:00
..
regdev_if.m
regnode_if.m Fix handling of enable counter for shared GPIO line in fixed regulator. 2018-06-16 08:25:38 +00:00
regulator_bus.c Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
regulator_fixed.c Fix handling of enable counter for shared GPIO line in fixed regulator. 2018-06-16 08:25:38 +00:00
regulator_fixed.h
regulator.c Fix handling of enable counter for shared GPIO line in fixed regulator. 2018-06-16 08:25:38 +00:00
regulator.h Revert r335173 at request of mmel@ 2018-06-15 13:14:45 +00:00