Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 967cfb18 authored by Kim, Milo's avatar Kim, Milo Committed by Mark Brown
Browse files

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: default avatarMilo(Woogyom) Kim <milo.kim@ti.com>
Reviewed-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent f19b00da
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment