devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
	"Gaëtan André" <rvlander@gaetanandre.eu>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Denis Ciocca" <denis.ciocca@st.com>,
	linux-iio <linux-iio@vger.kernel.org>,
	devicetree <devicetree@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Peter Meerwald-Stadler" <pmeerw@pmeerw.net>,
	"Rob Herring" <robh+dt@kernel.org>
Subject: Re: [PATCH v1 4/7] iio: st_sensors: Call st_sensors_power_enable() from bus drivers
Date: Sun, 18 Apr 2021 16:36:17 +0300	[thread overview]
Message-ID: <CAHp75Vf=r-rhuzx-DXHcY1xB=t4HP3wNdYAWH1buvqBvTteJ0Q@mail.gmail.com> (raw)
In-Reply-To: <20210418115403.059f94cd@jic23-huawei>

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

  reply	other threads:[~2021-04-18 13:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-14 19:54 [PATCH v1 1/7] iio: accel: st_accel: Move platform data from header to C file Andy Shevchenko
2021-04-14 19:54 ` [PATCH v1 2/7] iio: gyro: st_gyro: " Andy Shevchenko
2021-04-14 19:54 ` [PATCH v1 3/7] iio: magnetometer: st_magn: Provide default platform data Andy Shevchenko
2021-04-14 19:54 ` [PATCH v1 4/7] iio: st_sensors: Call st_sensors_power_enable() from bus drivers Andy Shevchenko
2021-04-18 10:54   ` Jonathan Cameron
2021-04-18 13:36     ` Andy Shevchenko [this message]
2021-04-18 19:09     ` Andy Shevchenko
2021-04-14 19:54 ` [PATCH v1 5/7] iio: st_sensors: Make accel, gyro, magn and pressure probe shared Andy Shevchenko
2021-04-14 19:54 ` [PATCH v1 6/7] iio: st_sensors: Add lsm9ds0 IMU support Andy Shevchenko
2021-04-18 11:06   ` Jonathan Cameron
2021-04-18 13:49     ` Andy Shevchenko
2021-04-18 13:59       ` Andy Shevchenko
2021-04-18 16:45         ` Jonathan Cameron
2021-04-14 19:54 ` [PATCH v1 7/7] dt-bindings: iio: st,st-sensors: Add LSM9DS0 compatible string Andy Shevchenko
2021-04-20 19:55   ` Rob Herring
2021-05-03 12:09   ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHp75Vf=r-rhuzx-DXHcY1xB=t4HP3wNdYAWH1buvqBvTteJ0Q@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=denis.ciocca@st.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=pmeerw@pmeerw.net \
    --cc=robh+dt@kernel.org \
    --cc=rvlander@gaetanandre.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).