mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kanak Shilledar <Kanak.Shilledar@axis.com>
To: "dlechner@baylibre.com" <dlechner@baylibre.com>,
	"joshua.crofts1@gmail.com" <joshua.crofts1@gmail.com>,
	Henrik Grimler <Henrik.Grimler@axis.com>,
	"nuno.sa@analog.com" <nuno.sa@analog.com>,
	"Jean-Baptiste.Maneyrol@tdk.com" <Jean-Baptiste.Maneyrol@tdk.com>,
	"robh@kernel.org" <robh@kernel.org>,
	"jic23@kernel.org" <jic23@kernel.org>,
	"andy@kernel.org" <andy@kernel.org>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	"macromorgan@hotmail.com" <macromorgan@hotmail.com>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"marcelo.schmitt1@gmail.com" <marcelo.schmitt1@gmail.com>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Kernel <Kernel@axis.com>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH v3 6/8] iio: imu: inv_icm42607: Implement MREGx register access
Date: Wed, 16 Sep 2026 09:30:17 +0000	[thread overview]
Message-ID: <2537d21c50da4e74107244010f1ce193b3fdee26.camel@axis.com> (raw)
In-Reply-To: <BE1P281MB1426CC3CADAD2D34138C5886CEB22@BE1P281MB1426.DEUP281.PROD.OUTLOOK.COM>

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

Hi, Jonathan and Jean-Baptiste,

On Mon, 2026-09-07 at 11:52 +0000, Jean-Baptiste Maneyrol wrote:
> [Some people who received this message don't often get email from
> jean-baptiste.maneyrol@tdk.com. Learn why this is important at
> https://aka.ms/LearnAboutSenderIdentification ]
> 
> > The device supports indirect register access to different banks. A
> > specific routine needs to be followed when accessing the registers
> > in
> > another bank as documented in the datasheet (section 13). This is
> > required for accessing registers configured via the user and
> > implementing buffer support.
> > 
> > Datasheet:
> > https://www.invensense.tdk.com/en-us/products/3-axis/icm-42370-p
> > Datasheet:
> > https://urldefense.com/v3/__https://www.lcsc.com/product-detail/C5129967.html__;!!FtrhtPsWDhZ6tw!CMTPpmwpQnn9q5feyPtbKfDlZZxlAh6FLT3KngBIAt4pGu5iF9cjUawWbxpNVF6__BzwZo0XM8x2ABrLJ4I1epLGPQXws4rTlA$[lcsc[.]com]
> > Assisted-by: LLM
> > Signed-off-by: Kanak Shilledar <kanak.shilledar@axis.com>
> > ---
> > LLM was used to improve the mreg_check function to include the case
> > where the sensor is in a POWER OFF or LOW POWER mode to utilize the
> > RC
> > oscillator for initiating the bank access.
> > ---
> > drivers/iio/imu/inv_icm42607/inv_icm42607.h      |  29 ++++++
> > drivers/iio/imu/inv_icm42607/inv_icm42607_core.c | 108
> > ++++++++++++++++++++++-
> > 2 files changed, 135 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/iio/imu/inv_icm42607/inv_icm42607.h
> > b/drivers/iio/imu/inv_icm42607/inv_icm42607.h
> > index a183a8566617..a522850e0268 100644
> > --- a/drivers/iio/imu/inv_icm42607/inv_icm42607.h
> > 
[...]
> 
> Hello Kanak,
> 
> for accessing MREG registers I strongly recommend to create a new
> regmap
> structure for handling this access. This way, you can use the created
> regmap
> to handle all registers access without having to check each time you
> access
> a register if it is a normal or an MREG register. Having dedicated
> function
> is very error prone.
> 
> You can have a look inside inv_icm45600 driver that have the same
> kind of MREG
> registers and is using a regmap for abstracting the access.
> 
> Thanks,
> JB

I will rewrite this bank access patch to match it similar to how it is
done in the inv_icm45600 driver.

Thanks and Regards,
Kanak Shilledar

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

  reply	other threads:[~2026-09-16  9:30 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01 14:35 [PATCH v3 0/8] Add support for InvenSense ICM-42370-P accelerometer Kanak Shilledar
2026-09-01 14:35 ` [PATCH v3 1/8] dt-bindings: Add InvenSense ICM-42370-p accelerometer Kanak Shilledar
2026-09-07  1:54   ` Jonathan Cameron
2026-09-16  9:25     ` Kanak Shilledar
2026-09-01 14:35 ` [PATCH v3 2/8] iio: imu: inv_icm42607: Update IIO channel macros Kanak Shilledar
2026-09-01 14:35 ` [PATCH v3 3/8] iio: imu: inv_icm42607: Update _odr_to_period_us formatting Kanak Shilledar
2026-09-07  1:54   ` Jonathan Cameron
2026-09-15 17:20     ` Chris Morgan
2026-09-16  9:23       ` Kanak Shilledar
2026-09-01 14:35 ` [PATCH v3 4/8] iio: imu: inv_icm42607: Switch to little endian Kanak Shilledar
2026-09-07  1:54   ` Jonathan Cameron
2026-09-16  9:26     ` Kanak Shilledar
2026-09-01 14:35 ` [PATCH v3 5/8] iio: imu: inv_icm42607: Add support for ICM-42370-P Kanak Shilledar
2026-09-07  1:54   ` Jonathan Cameron
2026-09-16  9:28     ` Kanak Shilledar
2026-09-01 14:35 ` [PATCH v3 6/8] iio: imu: inv_icm42607: Implement MREGx register access Kanak Shilledar
2026-09-07  1:54   ` Jonathan Cameron
2026-09-07 11:52   ` Jean-Baptiste Maneyrol
2026-09-16  9:30     ` Kanak Shilledar [this message]
2026-09-01 14:36 ` [PATCH v3 7/8] iio: imu: inv_icm42607: Add accelerometer calibbias support Kanak Shilledar
2026-09-07  1:54   ` Jonathan Cameron
2026-09-16  9:37     ` Kanak Shilledar
2026-09-16  9:44       ` Joshua Crofts
2026-09-15 17:27   ` Chris Morgan
2026-09-16  9:42     ` Kanak Shilledar
2026-09-01 14:36 ` [PATCH v3 8/8] iio: imu: inv_icm42607: Add gyroscope " Kanak Shilledar
2026-09-07  1:54   ` Jonathan Cameron
2026-09-02  5:30 ` [PATCH v3 0/8] Add support for InvenSense ICM-42370-P accelerometer Andy Shevchenko
2026-09-07  1:54   ` 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=2537d21c50da4e74107244010f1ce193b3fdee26.camel@axis.com \
    --to=kanak.shilledar@axis.com \
    --cc=Henrik.Grimler@axis.com \
    --cc=Jean-Baptiste.Maneyrol@tdk.com \
    --cc=Kernel@axis.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=joshua.crofts1@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=macromorgan@hotmail.com \
    --cc=marcelo.schmitt1@gmail.com \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    /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®