mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kanak Shilledar <Kanak.Shilledar@axis.com>
To: "jic23@kernel.org" <jic23@kernel.org>
Cc: "robh@kernel.org" <robh@kernel.org>,
	"andy@kernel.org" <andy@kernel.org>,
	"krzysztof.kozlowski@oss.qualcomm.com"
	<krzysztof.kozlowski@oss.qualcomm.com>, Kernel <Kernel@axis.com>,
	"macromorgan@hotmail.com" <macromorgan@hotmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"jean-baptiste.maneyrol@tdk.com" <jean-baptiste.maneyrol@tdk.com>,
	"crofts@kernel.org" <crofts@kernel.org>,
	"dlechner@baylibre.com" <dlechner@baylibre.com>,
	"nuno.sa@analog.com" <nuno.sa@analog.com>,
	"marcelo.schmitt1@gmail.com" <marcelo.schmitt1@gmail.com>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"jonathan.cameron@oss.qualcomm.com"
	<jonathan.cameron@oss.qualcomm.com>,
	Henrik Grimler <Henrik.Grimler@axis.com>
Subject: Re: [PATCH v8 6/7] iio: imu: inv_icm42607: Implement MREGx register access
Date: Mon, 9 Nov 2026 11:07:09 +0000	[thread overview]
Message-ID: <d5c6a85f8978eefd0b8f609107e0d2e4622c8ab4.camel@axis.com> (raw)
In-Reply-To: <20261107034846.429482a2@jic23-hlaptop>

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

Hi Jonathan,
On Sat, 2026-11-07 at 03:48 +0000, Jonathan Cameron wrote:
> On Thu, 5 Nov 2026 16:48:54 +0100
> Kanak Shilledar <kanak.shilledar@axis.com> wrote:
> 
> > 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. The implementation is inspired from
> > the
> > icm45600 driver.
> > 
> > The banks are defined based on their initial bank access code which
> > are
> > written to the BLK_SEL_* regs. However, there is a variation for
> > MREG1
> > as User Bank 0 and MREG1 both share the same 0x00, so User Bank 1
> > has
> > 0x00 and MREG1 has 0x01. When MREG1 register is accessed, then
> > BLK_SEL_*
> > is written with 0x00 instead of 0x01. All the register access goes
> > through the 16 bit virtual regmap layered on top of the 8bit bus
> > regmap.
> > Bank id in the upper byte and the register address in the lower
> > byte.
> > Bank 0 accesses are forwarded to the bus regmap with the bank field
> > stripped, while MREG accesses are forwarded to bank switching
> > sequence.
> > 
> > Due to the specific bank switching routine, it is not possible to
> > use
> > regmap-ranges. Only User Bank 0 supports bulk read/writes whereas
> > other
> > banks can only be accessed serially. Each time some data in the
> > other
> > bank needs to be accessed, it should go through the complete bank
> > switching sequence.
> Does turning off bulk accesses for user bank 0 have much impact on
> performance
> of existing features? 

No, after setting use_single_write to true, doesn't have much
performance impact as the driver doesn't issue any bulk_writes in the
current implementation. But there are some bulk_reads for reading the
raw sensor data and those are not affected due to this.

> 
> Otherwise looks fine to me,

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-11-09 11:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05 15:48 [PATCH v8 0/7] Add support for InvenSense ICM-42370-P accelerometer Kanak Shilledar
2026-11-05 15:48 ` [PATCH v8 1/7] dt-bindings: iio: imu: icm42600: Drop interrupt requirement Kanak Shilledar
2026-11-06  8:20   ` Krzysztof Kozlowski
2026-11-05 15:48 ` [PATCH v8 2/7] dt-bindings: iio: imu: icm42600: Add ICM-42670-P Kanak Shilledar
2026-11-06  8:21   ` Krzysztof Kozlowski
2026-11-05 15:48 ` [PATCH v8 3/7] iio: imu: inv_icm42607: Simplify IIO channel macros Kanak Shilledar
2026-11-05 15:48 ` [PATCH v8 4/7] iio: imu: inv_icm42607: Initialize gyro based on chip_info Kanak Shilledar
2026-11-05 15:48 ` [PATCH v8 5/7] iio: imu: inv_icm42607: Add support for ICM-42370-P Kanak Shilledar
2026-11-05 15:48 ` [PATCH v8 6/7] iio: imu: inv_icm42607: Implement MREGx register access Kanak Shilledar
2026-11-07  3:48   ` Jonathan Cameron
2026-11-09 11:07     ` Kanak Shilledar [this message]
2026-11-05 15:48 ` [PATCH v8 7/7] iio: imu: inv_icm42607: Add accelerometer calibbias support Kanak Shilledar
2026-11-07  3:51   ` 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=d5c6a85f8978eefd0b8f609107e0d2e4622c8ab4.camel@axis.com \
    --to=kanak.shilledar@axis.com \
    --cc=Henrik.Grimler@axis.com \
    --cc=Kernel@axis.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=crofts@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jean-baptiste.maneyrol@tdk.com \
    --cc=jic23@kernel.org \
    --cc=jonathan.cameron@oss.qualcomm.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzysztof.kozlowski@oss.qualcomm.com \
    --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®