Re: [PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable()

2018-11-20 Thread Doug Anderson
Hi, On Mon, Nov 19, 2018 at 4:27 PM Douglas Anderson wrote: > > In regulator_force_disable() there was a strange loop that looked like: > > while (rdev->open_count--) > regulator_disable(rdev->supply); > > I'm not totally sure what the goal was for this loop, but it seems > wrong to me.

Re: [PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable()

2018-11-20 Thread Doug Anderson
Hi, On Mon, Nov 19, 2018 at 4:27 PM Douglas Anderson wrote: > > In regulator_force_disable() there was a strange loop that looked like: > > while (rdev->open_count--) > regulator_disable(rdev->supply); > > I'm not totally sure what the goal was for this loop, but it seems > wrong to me.

Re: [PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable()

2018-11-20 Thread Mark Brown
On Tue, Nov 20, 2018 at 08:57:32AM -0800, Doug Anderson wrote: > OK. I guess for now I'll just change this to disable the parent > supply as many times as this individual consumer enabled it and call > it good enough? It can be for someone else to figure out how to make > it really usable for

Re: [PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable()

2018-11-20 Thread Mark Brown
On Tue, Nov 20, 2018 at 08:57:32AM -0800, Doug Anderson wrote: > OK. I guess for now I'll just change this to disable the parent > supply as many times as this individual consumer enabled it and call > it good enough? It can be for someone else to figure out how to make > it really usable for

Re: [PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable()

2018-11-20 Thread Mark Brown
On Tue, Nov 20, 2018 at 08:57:32AM -0800, Doug Anderson wrote: > On Tue, Nov 20, 2018 at 8:25 AM Mark Brown wrote: > > I do wish there > > were a way to flag API calls as needing review :( > Would it be worth adding a WARN_ON(1) splat here or at least a > "dev_warn" so people knew it wasn't

Re: [PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable()

2018-11-20 Thread Mark Brown
On Tue, Nov 20, 2018 at 08:57:32AM -0800, Doug Anderson wrote: > On Tue, Nov 20, 2018 at 8:25 AM Mark Brown wrote: > > I do wish there > > were a way to flag API calls as needing review :( > Would it be worth adding a WARN_ON(1) splat here or at least a > "dev_warn" so people knew it wasn't

Re: [PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable()

2018-11-20 Thread Doug Anderson
Hi, On Tue, Nov 20, 2018 at 8:25 AM Mark Brown wrote: > > If something has been forced off the system is in very serious trouble > and had a cricial safety problem, though the fact that there's error > handling code that did the force disable might mean that there's some > ability to recover the

Re: [PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable()

2018-11-20 Thread Doug Anderson
Hi, On Tue, Nov 20, 2018 at 8:25 AM Mark Brown wrote: > > If something has been forced off the system is in very serious trouble > and had a cricial safety problem, though the fact that there's error > handling code that did the force disable might mean that there's some > ability to recover the

Re: [PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable()

2018-11-20 Thread Mark Brown
On Tue, Nov 20, 2018 at 08:04:57AM -0800, Doug Anderson wrote: > In general it's hard for me to reason about how the system in general > should behave after regulator_force_disable() is called. Is it > basically expected that the system will panic soon after? > Specifically other consumers of

Re: [PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable()

2018-11-20 Thread Mark Brown
On Tue, Nov 20, 2018 at 08:04:57AM -0800, Doug Anderson wrote: > In general it's hard for me to reason about how the system in general > should behave after regulator_force_disable() is called. Is it > basically expected that the system will panic soon after? > Specifically other consumers of

Re: [PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable()

2018-11-20 Thread Doug Anderson
Hi, On Tue, Nov 20, 2018 at 7:55 AM Mark Brown wrote: > > On Mon, Nov 19, 2018 at 04:26:54PM -0800, Douglas Anderson wrote: > > In regulator_force_disable() there was a strange loop that looked like: > > > > while (rdev->open_count--) > > regulator_disable(rdev->supply); > > > > I'm not

Re: [PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable()

2018-11-20 Thread Doug Anderson
Hi, On Tue, Nov 20, 2018 at 7:55 AM Mark Brown wrote: > > On Mon, Nov 19, 2018 at 04:26:54PM -0800, Douglas Anderson wrote: > > In regulator_force_disable() there was a strange loop that looked like: > > > > while (rdev->open_count--) > > regulator_disable(rdev->supply); > > > > I'm not

Re: [PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable()

2018-11-20 Thread Mark Brown
On Mon, Nov 19, 2018 at 04:26:54PM -0800, Douglas Anderson wrote: > In regulator_force_disable() there was a strange loop that looked like: > > while (rdev->open_count--) > regulator_disable(rdev->supply); > > I'm not totally sure what the goal was for this loop, but it seems > wrong to

Re: [PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable()

2018-11-20 Thread Mark Brown
On Mon, Nov 19, 2018 at 04:26:54PM -0800, Douglas Anderson wrote: > In regulator_force_disable() there was a strange loop that looked like: > > while (rdev->open_count--) > regulator_disable(rdev->supply); > > I'm not totally sure what the goal was for this loop, but it seems > wrong to

Re: [PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable()

2018-11-19 Thread Doug Anderson
Hi, On Mon, Nov 19, 2018 at 4:58 PM Dmitry Osipenko wrote: > > On 20.11.2018 3:26, Douglas Anderson wrote: > > In regulator_force_disable() there was a strange loop that looked like: > > > > while (rdev->open_count--) > > regulator_disable(rdev->supply); > > > > I'm not totally sure what

Re: [PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable()

2018-11-19 Thread Doug Anderson
Hi, On Mon, Nov 19, 2018 at 4:58 PM Dmitry Osipenko wrote: > > On 20.11.2018 3:26, Douglas Anderson wrote: > > In regulator_force_disable() there was a strange loop that looked like: > > > > while (rdev->open_count--) > > regulator_disable(rdev->supply); > > > > I'm not totally sure what

Re: [PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable()

2018-11-19 Thread Dmitry Osipenko
On 20.11.2018 3:26, Douglas Anderson wrote: > In regulator_force_disable() there was a strange loop that looked like: > > while (rdev->open_count--) > regulator_disable(rdev->supply); > > I'm not totally sure what the goal was for this loop, but it seems > wrong to me. If anything I think

Re: [PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable()

2018-11-19 Thread Dmitry Osipenko
On 20.11.2018 3:26, Douglas Anderson wrote: > In regulator_force_disable() there was a strange loop that looked like: > > while (rdev->open_count--) > regulator_disable(rdev->supply); > > I'm not totally sure what the goal was for this loop, but it seems > wrong to me. If anything I think

[PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable()

2018-11-19 Thread Douglas Anderson
In regulator_force_disable() there was a strange loop that looked like: while (rdev->open_count--) regulator_disable(rdev->supply); I'm not totally sure what the goal was for this loop, but it seems wrong to me. If anything I think maybe we should have been looping over our use_count, but

[PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable()

2018-11-19 Thread Douglas Anderson
In regulator_force_disable() there was a strange loop that looked like: while (rdev->open_count--) regulator_disable(rdev->supply); I'm not totally sure what the goal was for this loop, but it seems wrong to me. If anything I think maybe we should have been looping over our use_count, but