mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Francesco Lavra <flavra@baylibre.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "Lorenzo Bianconi" <lorenzo@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] iio: imu: st_lsm6dsx: add support for rotation sensor
Date: Fri, 16 Jan 2026 20:26:56 +0100	[thread overview]
Message-ID: <43a8feadc9326c35bde8da12d4045ba61be97051.camel@baylibre.com> (raw)
In-Reply-To: <20260116182716.2ff8925f@jic23-huawei>

[-- Attachment #1: Type: text/plain, Size: 1504 bytes --]

On Fri, 2026-01-16 at 18:27 +0000, Jonathan Cameron wrote:
> 
> > 
> > > > +       const struct st_lsm6dsx_reg *mux;
> > > > +       int err;
> > > > +
> > > > +       mux = &hw->settings->sf_settings.page_mux;  
> > > 
> > > Just to check, can you use regmaps support for paging instead of
> > > doing
> > > this by hand?
> > > That would avoid future problems with enabling caching or similar  
> > 
> > No, the chip has multiple register sets with overlapping addresses, and
> > struct regmap_range_cfg is not usable here.
> 
> Paged addressing always has overlapping addresses, so I'm not following.
> The trick this does is to map those higher pages to a fake set of
> addresses.

I thought having a fake set of addresses in the driver would be frowned
upon since it would create a mismatch between the code and the device
datasheet. But I guess it wouldn't be so bad if appropriate offsets between
register pages are chosen.
Anyway, as you noted in this case the different pages cannot be selected
via a simple bank selector register.

> An example is the ICM42600:
> https://invensense.tdk.com/wp-content/uploads/2020/04/ds-000347_icm-42688-p-datasheet.pdf
> for a suitable datasheet (some of the newer parts have a much more
> complex scheme)
> 
> I took a look at the datasheet and seems there are multiple types of
> paging
> going on and effectively ends up with two nested paging controls. So fair
> enough it
> doesn't fit here.


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

      reply	other threads:[~2026-01-16 19:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-09 18:15 [PATCH 0/3] imu: st_lsm6dsx: Add " Francesco Lavra
2026-01-09 18:15 ` [PATCH 1/3] iio: imu: st_lsm6dsx: set buffer sampling frequency for accelerometer only Francesco Lavra
2026-01-11 16:18   ` Jonathan Cameron
2026-01-12 17:10     ` Francesco Lavra
2026-01-16 18:03       ` Jonathan Cameron
2026-01-16 19:06         ` Francesco Lavra
2026-01-16 20:35           ` Jonathan Cameron
2026-01-09 18:15 ` [PATCH 2/3] iio: imu: st_lsm6dsx: set FIFO ODR for accelerometer and magnetometer only Francesco Lavra
2026-01-09 19:09   ` Andy Shevchenko
2026-01-11 16:23   ` Jonathan Cameron
2026-01-11 16:26     ` Jonathan Cameron
2026-01-12 17:37       ` Francesco Lavra
2026-01-09 18:15 ` [PATCH 3/3] iio: imu: st_lsm6dsx: add support for rotation sensor Francesco Lavra
2026-01-09 19:22   ` Andy Shevchenko
2026-01-11 19:39     ` Jonathan Cameron
2026-01-11 16:46   ` Jonathan Cameron
2026-01-13  9:48     ` Francesco Lavra
2026-01-16 18:27       ` Jonathan Cameron
2026-01-16 19:26         ` Francesco Lavra [this message]

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=43a8feadc9326c35bde8da12d4045ba61be97051.camel@baylibre.com \
    --to=flavra@baylibre.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=nuno.sa@analog.com \
    /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

all inboxes | Powered by JetHome®