Messages in this thread | | | From | Andy Shevchenko <> | Date | Sun, 18 Apr 2021 22:09:18 +0300 | Subject | Re: [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? 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.
Yep, now I also understand that I do it twice after this patch. But lemme check next week this all
P.S. I have real hardware to test on. But my tests I guess are limited to iio_info or so.
-- With Best Regards, Andy Shevchenko
| |