Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-30 Thread Stephen Boyd
Quoting Mark Brown (2022-08-15 15:07:35) > On Mon, Aug 15, 2022 at 01:58:55PM -0700, Stephen Boyd wrote: > > > I think the main issue is that platform drivers are being asked to do > > too much. We've put the burden on platform driver authors to intimately > > understand how their devices are inte

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-24 Thread Mark Brown
On Fri, 12 Aug 2022 13:08:17 +0300, Matti Vaittinen wrote: > Devm helpers for regulator get and enable > > First patch in the series is actually just a simple documentation fix > which could be taken in as it is now. > > A few* drivers seem to use pattern demonstrated by pseudocode: > > [...] A

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-24 Thread Mark Brown
On Mon, Aug 15, 2022 at 06:54:45PM +0300, Laurent Pinchart wrote: > - With devres, you don't have full control over the order in which > resources will be released, which means that you can't control the > power off sequence, in particular if it needs to be sequenced with > GPIOs and clocks.

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-18 Thread Vaittinen, Matti
On 8/18/22 14:54, Mark Brown wrote: > On Thu, Aug 18, 2022 at 02:33:53PM +0300, Matti Vaittinen wrote: >> On 8/15/22 18:44, Mark Brown wrote: > >>> [2/7] regulator: Add devm helpers for get and enable >>> (no commit info) > >> I was planning to send out the v3 (where IIO patches are no lo

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-18 Thread Mark Brown
On Thu, Aug 18, 2022 at 02:33:53PM +0300, Matti Vaittinen wrote: > On 8/15/22 18:44, Mark Brown wrote: > > [2/7] regulator: Add devm helpers for get and enable > >(no commit info) > I was planning to send out the v3 (where IIO patches are no longer squashed > into one). I didn't spot the

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-18 Thread Matti Vaittinen
Hi Mark, On 8/15/22 18:44, Mark Brown wrote: On Fri, 12 Aug 2022 13:08:17 +0300, Matti Vaittinen wrote: Devm helpers for regulator get and enable First patch in the series is actually just a simple documentation fix which could be taken in as it is now. A few* drivers seem to use pattern demo

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-17 Thread Vaittinen, Matti
On 8/16/22 13:36, Mark Brown wrote: > On Tue, Aug 16, 2022 at 07:56:06AM +0300, Matti Vaittinen wrote: >> On 8/16/22 01:55, Mark Brown wrote: >>> On Tue, Aug 16, 2022 at 12:17:17AM +0300, Laurent Pinchart wrote: > These devres helpers give a false sense of security to driver authors and

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-16 Thread Mark Brown
On Tue, Aug 16, 2022 at 11:06:21AM +, Vaittinen, Matti wrote: > I wonder if writing such 'release callbacks' is compulsory? I mean, if I > was writing a driver to some new (to me) subsystem and was required to > write an explicit release-callback for a resource - then it'd surely > rang a b

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-16 Thread Mark Brown
On Tue, Aug 16, 2022 at 07:56:06AM +0300, Matti Vaittinen wrote: > On 8/16/22 01:55, Mark Brown wrote: > > On Tue, Aug 16, 2022 at 12:17:17AM +0300, Laurent Pinchart wrote: > > > These devres helpers give > > > a false sense of security to driver authors and they will end up > > > introducing prob

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-16 Thread Andy Shevchenko
On Tue, Aug 16, 2022 at 8:37 AM Laurent Pinchart wrote: > On Mon, Aug 15, 2022 at 01:58:55PM -0700, Stephen Boyd wrote: > > Quoting Laurent Pinchart (2022-08-15 11:52:36) > > > On Mon, Aug 15, 2022 at 05:33:06PM +0100, Mark Brown wrote: ... > > > we'll run into trouble. Supplying active high inp

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-16 Thread Andy Shevchenko
On Mon, Aug 15, 2022 at 11:20 PM Laurent Pinchart wrote: > On Mon, Aug 15, 2022 at 05:33:06PM +0100, Mark Brown wrote: ... > However, should a devm_clk_get_enable() or similar function be > implemented, we'll run into trouble. And in 5.19 we have devm_clk_get_enable(), are we already in trouble

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-15 Thread Matti Vaittinen
Hi dee Ho Mark, Laurent, Stephen, all On 8/16/22 01:55, Mark Brown wrote: On Tue, Aug 16, 2022 at 12:17:17AM +0300, Laurent Pinchart wrote: On Mon, Aug 15, 2022 at 01:58:55PM -0700, Stephen Boyd wrote: You will very quickly see drivers doing this (either directly or indirectly): probe() {

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-15 Thread Mark Brown
On Tue, Aug 16, 2022 at 12:17:17AM +0300, Laurent Pinchart wrote: > On Mon, Aug 15, 2022 at 01:58:55PM -0700, Stephen Boyd wrote: > > The basic idea is that drivers should be focused on what they're > > driving, not navigating the (sometimes) complex integration that's > > taking place around them

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-15 Thread Mark Brown
On Mon, Aug 15, 2022 at 01:58:55PM -0700, Stephen Boyd wrote: > Quoting Laurent Pinchart (2022-08-15 11:52:36) > > On Mon, Aug 15, 2022 at 05:33:06PM +0100, Mark Brown wrote: > > > On Mon, Aug 15, 2022 at 06:54:45PM +0300, Laurent Pinchart wrote: > > > > - With devres, you don't have full control

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-15 Thread Laurent Pinchart
Hi Stephan, On Mon, Aug 15, 2022 at 01:58:55PM -0700, Stephen Boyd wrote: > Quoting Laurent Pinchart (2022-08-15 11:52:36) > > On Mon, Aug 15, 2022 at 05:33:06PM +0100, Mark Brown wrote: > > > On Mon, Aug 15, 2022 at 06:54:45PM +0300, Laurent Pinchart wrote: > > > > > > > - With devres, you don't

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-15 Thread Stephen Boyd
Quoting Laurent Pinchart (2022-08-15 11:52:36) > Hi Mark, > > On Mon, Aug 15, 2022 at 05:33:06PM +0100, Mark Brown wrote: > > On Mon, Aug 15, 2022 at 06:54:45PM +0300, Laurent Pinchart wrote: > > > > > - With devres, you don't have full control over the order in which > > > resources will be re

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-15 Thread Laurent Pinchart
Hi Mark, On Mon, Aug 15, 2022 at 05:33:06PM +0100, Mark Brown wrote: > On Mon, Aug 15, 2022 at 06:54:45PM +0300, Laurent Pinchart wrote: > > > - With devres, you don't have full control over the order in which > > resources will be released, which means that you can't control the > > power of

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-15 Thread Laurent Pinchart
On Mon, Aug 15, 2022 at 04:44:44PM +0100, Mark Brown wrote: > On Fri, 12 Aug 2022 13:08:17 +0300, Matti Vaittinen wrote: > > Devm helpers for regulator get and enable > > > > First patch in the series is actually just a simple documentation fix > > which could be taken in as it is now. > > > > A

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-15 Thread Mark Brown
On Fri, 12 Aug 2022 13:08:17 +0300, Matti Vaittinen wrote: > Devm helpers for regulator get and enable > > First patch in the series is actually just a simple documentation fix > which could be taken in as it is now. > > A few* drivers seem to use pattern demonstrated by pseudocode: > > [...] A