lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Ve+_XurtoyOKizocyO0RkFaLvhR3mKp_pSvznmmGrQEXA@mail.gmail.com>
Date:   Sun, 18 Apr 2021 22:09:18 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Jonathan Cameron <jic23@...nel.org>
Cc:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        Gaëtan André <rvlander@...tanandre.eu>,
        Nuno Sá <nuno.sa@...log.com>,
        Denis Ciocca <denis.ciocca@...com>,
        linux-iio <linux-iio@...r.kernel.org>,
        devicetree <devicetree@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        Rob Herring <robh+dt@...nel.org>
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@...nel.org> wrote:
>
> On Wed, 14 Apr 2021 22:54:51 +0300
> Andy Shevchenko <andriy.shevchenko@...ux.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ