lkml.org 
[lkml]   [2021]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v1 4/7] iio: st_sensors: Call st_sensors_power_enable() from bus drivers
On Sun, Apr 18, 2021 at 1:54 PM Jonathan Cameron <jic23@kernel.org> wrote:
> On Wed, 14 Apr 2021 22:54:51 +0300
> Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
>
> > In case we would initialize two IIO devices from one physical device,
> > we shouldn't have a clash on regulators. That's why move
> > st_sensors_power_enable() call from core to bus drivers.
>
> Why is this a problem?

You can't have two regulators of the same name on the same device.
IIRC the regulator framework produces a good splat for this.

> The two instances would double up and both get +
> enable + disable the regulators. However, that shouldn't matter as
> they are reference counted anyway.
>
> Perhaps an example? Even in patch 6 I can only see that it is wasteful
> to do it twice, rather than wrong as such.

Believe me, I would like to avoid that, but it seems a limitation of
the regulator framework. It simply produces a splat. I'll try to
reproduce it again (because this series started like a couple of years
ago, just eventually I found a time to clean up and submit) and will
tell you how it is going.


--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2021-04-18 15:37    [W:0.093 / U:3.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site