Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-10-09 Thread Mark Brown
On Tue, Oct 08, 2019 at 10:16:22PM +0200, Marco Felsch wrote: > On 19-10-08 17:23, Mark Brown wrote: > > As you'll have seen from the discussion that's a bug, nothing should be > > taking a reference to the regulator outside of explicit enable calls. > Okay now we are on the right way :) Is the

Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-10-08 Thread Marco Felsch
On 19-10-08 17:23, Mark Brown wrote: > On Tue, Oct 08, 2019 at 06:16:40PM +0200, Marco Felsch wrote: > > On 19-10-08 16:42, Mark Brown wrote: > > > > If this is a GPIO regulator then the Linux APIs mean you can't read the > > > status back so it's one of the regulators for which this property was

Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-10-08 Thread Mark Brown
On Tue, Oct 08, 2019 at 06:16:40PM +0200, Marco Felsch wrote: > On 19-10-08 16:42, Mark Brown wrote: > > If this is a GPIO regulator then the Linux APIs mean you can't read the > > status back so it's one of the regulators for which this property was > > invented. This is a real limitation of

Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-10-08 Thread Marco Felsch
On 19-10-08 16:42, Mark Brown wrote: > On Tue, Oct 08, 2019 at 04:56:05PM +0200, Marco Felsch wrote: > > On 19-10-08 13:51, Mark Brown wrote: > > > > No, we shouldn't do anything when the regulator probes - we'll only > > > disable unused regulators when we get to the end of boot (currently we >

Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-10-08 Thread Mark Brown
On Tue, Oct 08, 2019 at 04:56:05PM +0200, Marco Felsch wrote: > On 19-10-08 13:51, Mark Brown wrote: > > No, we shouldn't do anything when the regulator probes - we'll only > > disable unused regulators when we get to the end of boot (currently we > > delay this by 30s to give userspace a chance

Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-10-08 Thread Marco Felsch
On 19-10-08 13:51, Mark Brown wrote: > On Tue, Oct 08, 2019 at 08:03:11AM +0200, Marco Felsch wrote: > > On 19-10-07 19:29, Mark Brown wrote: > > > On Mon, Oct 07, 2019 at 11:34:29AM +0200, Marco Felsch wrote: > > > > > Sorry that won't fix my problem. If I drop the regulator-boot-on state > > >

Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-10-08 Thread Mark Brown
On Tue, Oct 08, 2019 at 08:03:11AM +0200, Marco Felsch wrote: > On 19-10-07 19:29, Mark Brown wrote: > > On Mon, Oct 07, 2019 at 11:34:29AM +0200, Marco Felsch wrote: > > > Sorry that won't fix my problem. If I drop the regulator-boot-on state > > > the fixed-regulator will disable this regulator

Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-10-08 Thread Marco Felsch
On 19-10-07 19:29, Mark Brown wrote: > On Mon, Oct 07, 2019 at 11:34:29AM +0200, Marco Felsch wrote: > > > Sorry that won't fix my problem. If I drop the regulator-boot-on state > > the fixed-regulator will disable this regulator but disable/enable this > > regulator is only valid during

Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-10-07 Thread Mark Brown
On Mon, Oct 07, 2019 at 11:34:29AM +0200, Marco Felsch wrote: > Sorry that won't fix my problem. If I drop the regulator-boot-on state > the fixed-regulator will disable this regulator but disable/enable this > regulator is only valid during suspend/resume. I don't say that my fix > is correct

Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-10-07 Thread Marco Felsch
Hi Doug, Mark, On 19-10-01 12:57, Doug Anderson wrote: > Hi, > > On Fri, Sep 27, 2019 at 1:47 AM Marco Felsch wrote: > > > > > > It should be possible to do a regulator_disable() though I'm not > > > > > > sure anyone actually uses that. The pattern for a regular > > > > > > consumer should be

Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-10-04 Thread Mark Brown
On Fri, Oct 04, 2019 at 12:03:12PM +, Vaittinen, Matti wrote: > On Fri, 2019-10-04 at 12:32 +0100, Mark Brown wrote: > > If you want the regulator to be on without any driver present then > > mark > > it always-on. If you want the regulator to be enabled prior to the > > driver being loaded

Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-10-04 Thread Vaittinen, Matti
On Fri, 2019-10-04 at 12:32 +0100, Mark Brown wrote: > On Fri, Oct 04, 2019 at 09:34:43AM +0300, Matti Vaittinen wrote: > > On Tue, Oct 01, 2019 at 12:57:31PM -0700, Doug Anderson wrote: > > > I don't think your fix is correct. It sounds as if the intention > > > of > > > "regulator-boot-on" is

Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-10-04 Thread Mark Brown
On Fri, Oct 04, 2019 at 09:34:43AM +0300, Matti Vaittinen wrote: > On Tue, Oct 01, 2019 at 12:57:31PM -0700, Doug Anderson wrote: > > I don't think your fix is correct. It sounds as if the intention of > > "regulator-boot-on" is to have the OS turn the regulator on at bootup > > and it keep an

Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-10-04 Thread Matti Vaittinen
Hi dee Ho Peeps, Long time no hear =) On Tue, Oct 01, 2019 at 12:57:31PM -0700, Doug Anderson wrote: > Hi, > > On Fri, Sep 27, 2019 at 1:47 AM Marco Felsch wrote: > > > > > > It should be possible to do a regulator_disable() though I'm not > > > > > > sure anyone actually uses that. The

Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-10-01 Thread Doug Anderson
Hi, On Fri, Sep 27, 2019 at 1:47 AM Marco Felsch wrote: > > > > > It should be possible to do a regulator_disable() though I'm not > > > > > sure anyone actually uses that. The pattern for a regular > > > > > consumer should be the normal enable/disable pair to handle > > > > > shared usage,

Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-09-27 Thread Marco Felsch
Hi Doug, Mark, sorry for the delay.. On 19-09-26 12:44, Doug Anderson wrote: > Hi, > > On Tue, Sep 24, 2019 at 11:28 AM Mark Brown wrote: > > On Mon, Sep 23, 2019 at 03:40:09PM -0700, Doug Anderson wrote: > > > On Mon, Sep 23, 2019 at 11:49 AM Mark Brown wrote: > > > > On Mon, Sep 23, 2019 at

Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-09-26 Thread Doug Anderson
Hi, On Tue, Sep 24, 2019 at 11:28 AM Mark Brown wrote: > On Mon, Sep 23, 2019 at 03:40:09PM -0700, Doug Anderson wrote: > > On Mon, Sep 23, 2019 at 11:49 AM Mark Brown wrote: > > > On Mon, Sep 23, 2019 at 11:36:11AM -0700, Doug Anderson wrote: > > > > > 1. Would it be valid to say that it's

Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-09-24 Thread Mark Brown
On Mon, Sep 23, 2019 at 03:40:09PM -0700, Doug Anderson wrote: > On Mon, Sep 23, 2019 at 11:49 AM Mark Brown wrote: > > On Mon, Sep 23, 2019 at 11:36:11AM -0700, Doug Anderson wrote: > > > 1. Would it be valid to say that it's always incorrect to set this > > > property if there is a way to read

Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-09-23 Thread Doug Anderson
Hi, On Mon, Sep 23, 2019 at 11:49 AM Mark Brown wrote: > > On Mon, Sep 23, 2019 at 11:36:11AM -0700, Doug Anderson wrote: > > On Mon, Sep 23, 2019 at 11:14 AM Mark Brown wrote: > > > > Boot on means that it's powered on when the kernel starts, it's > > > for regulators that we can't read back

Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-09-23 Thread Mark Brown
On Mon, Sep 23, 2019 at 11:36:11AM -0700, Doug Anderson wrote: > On Mon, Sep 23, 2019 at 11:14 AM Mark Brown wrote: > > Boot on means that it's powered on when the kernel starts, it's > > for regulators that we can't read back the status of. > 1. Would it be valid to say that it's always

Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-09-23 Thread Doug Anderson
Hi, On Mon, Sep 23, 2019 at 11:14 AM Mark Brown wrote: > > On Mon, Sep 23, 2019 at 11:02:26AM -0700, Doug Anderson wrote: > > > I will freely admit my ignorance here, but I've always been slightly > > confused by the "always-on" vs. "boot-on" distinction... > > > The bindings say: > > >

Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-09-23 Thread Mark Brown
On Mon, Sep 23, 2019 at 11:02:26AM -0700, Doug Anderson wrote: > I will freely admit my ignorance here, but I've always been slightly > confused by the "always-on" vs. "boot-on" distinction... > The bindings say: > regulator-always-on: > description: boolean, regulator should never be

Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-09-23 Thread Doug Anderson
Hi, On Tue, Sep 17, 2019 at 8:40 AM Marco Felsch wrote: > > Since commit 1fc12b05895e ("regulator: core: Avoid propagating to > supplies when possible") regulators marked with boot-on can't be > disabled anymore because the commit handles always-on and boot-on > regulators the same way. > > Now

[PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

2019-09-17 Thread Marco Felsch
Since commit 1fc12b05895e ("regulator: core: Avoid propagating to supplies when possible") regulators marked with boot-on can't be disabled anymore because the commit handles always-on and boot-on regulators the same way. Now commit 05f224ca6693 ("regulator: core: Clean enabling always-on