Re: [RFC v1] regulator: core: introduce regulator chain locking scheme

2013-04-18 Thread Grygorii Strashko
On 04/15/2013 07:40 PM, Mark Brown wrote: On Mon, Apr 15, 2013 at 07:21:25PM +0300, Andrii Tseglytskyi wrote: On 04/15/2013 06:50 PM, Mark Brown wrote: In addition, such locking scheme allows to have access to the supplier regulator API from inside child's (consumer) regulator API. I've still

[RFC v1] regulator: core: introduce regulator chain locking scheme

2013-04-15 Thread Grygorii Strashko
In some cases the regulators may be organized in a chain like: -regA-regB-regC where regA is supplier for regB and regB is supplier for regC. Currently it would be possible to reconfigure regA and regC at same time form different contexts, because each regulator has it own mutex. But in some

Re: [RFC v1] regulator: core: introduce regulator chain locking scheme

2013-04-15 Thread Mark Brown
On Mon, Apr 15, 2013 at 04:03:35PM +0300, Grygorii Strashko wrote: To achieve this goal: - abstract regulator locking out into helper functions; - use the root Regulator (which has no supply defined, like regA) in chain to protect the whole chain; - implement regulator chain locking scheme

Re: [RFC v1] regulator: core: introduce regulator chain locking scheme

2013-04-15 Thread Andrii Tseglytskyi
Hi Mark, On 04/15/2013 06:50 PM, Mark Brown wrote: In addition, such locking scheme allows to have access to the supplier regulator API from inside child's (consumer) regulator API. I've still not seen any use case articulated for doing this... Use case is introduced in ABB series:

Re: [RFC v1] regulator: core: introduce regulator chain locking scheme

2013-04-15 Thread Mark Brown
On Mon, Apr 15, 2013 at 07:21:25PM +0300, Andrii Tseglytskyi wrote: On 04/15/2013 06:50 PM, Mark Brown wrote: In addition, such locking scheme allows to have access to the supplier regulator API from inside child's (consumer) regulator API. I've still not seen any use case articulated for