1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00
freebsd/sys/dev/extres
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
..
clk clk: clk_set_assigned: Skip frequency of value 0 2018-05-07 09:42:35 +00:00
hwreset Remove redundant declarations. Newer gcc has a warning for these so will 2017-08-19 17:18:27 +00:00
phy Align OF_getencprop_alloc API with OF_getencprop and OF_getprop_alloc 2018-04-09 22:06:16 +00:00
regulator Fix handling of enable counter for shared GPIO line in fixed regulator. 2018-06-16 08:25:38 +00:00
syscon Remove "All Rights Reserved" on files that I hold sole copyright on 2018-05-09 16:44:19 +00:00