diff options
author | Kim, Milo <[email protected]> | 2013-02-18 06:50:48 +0000 |
---|---|---|
committer | Mark Brown <[email protected]> | 2013-03-04 10:37:57 +0800 |
commit | 967cfb18c0e331b43a29ae7f60ec1ef0dcb02f6b (patch) | |
tree | 46784bf101f2a189637bc50a2e17363efd63a6be /lib/mpi/mpi-bit.c | |
parent | f19b00da8ed37db4e3891fe534fcf3a605a0e562 (diff) |
regulator: core: manage enable GPIO list
To support shared enable GPIO pin, replace GPIO code with new static functions
Reference count: 'enable_count'
Balance the reference count of each GPIO and actual pin control.
The count is incremented with enabling GPIO.
On the other hand, it is decremented on disabling GPIO.
Actual GPIO pin is enabled at the initial use.(enable_count = 0)
The pin is disabled if it is not used(shared) any more. (enable_count <=1)
Regardless of the enable count, update GPIO state of the regulator.
Signed-off-by: Milo(Woogyom) Kim <[email protected]>
Reviewed-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions