mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>, nuno.sa@analog.com
Cc: Gerard Marull-Paretas <gerard@teslabs.com>,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	dlechner@baylibre.com, andy@kernel.org, Frank.li@nxp.com,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 4/4] iio: magnetometer: mmc5633: Add mount matrix support
Date: Fri, 4 Dec 2026 23:02:12 +0000	[thread overview]
Message-ID: <20261204230212.1bce17ab@jic23-hlaptop> (raw)
In-Reply-To: <axGmKgB6YhkKJGG5@ashevche-desk.local>

On Thu, 3 Dec 2026 19:26:02 +0200
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> On Thu, Dec 03, 2026 at 05:56:54PM +0100, Gerard Marull-Paretas wrote:
> > Read the mount matrix from the firmware and expose it, so that user
> > space can account for how the sensor is oriented on the board.  
> 
> > Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>  
> 
> While I reviewed that, the more generic Q still stands. Can we rather use IIO
> opaque structure and move majority of this code to the IIO core as a helper for
> drivers that want it? Jonathan, what do you think?

I wasn't keen on doing this in the past because it was relatively rare
for firmware to actually provide this info so we only supported it in a
few drivers.  It still only applies to a subset of IIO devices and
the ACPI side of things isn't standard, so those are a bit trickier to deal
with.  So I think there is a limit to what can be in the core.

I'd be interested to see a proposal though and see what it ends up
looking like.  I guess it would be put the pointer in the iio_opaque
structure and then fill it if a driver requests it. So the bit we save
on is the pointer in the iio_priv() and the helper function used
to find that.  Might be worth doing.

We aren't very consistent in how we handle the scope of it either.
Mix of shared_by_all, by_type, by_dir so generating the attribute from
the core is going to be tricky.  There are good reasons for some of
those variants, but with hindsight this hasn't been as controlled as
it should have been.

So, maybe?  

Jonathan

> 
> (It definitely does not affect this series, which is good as it go.)
> 


  reply	other threads:[~2026-12-04 23:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 16:56 [PATCH v6 0/4] iio: magnetometer: mmc5633: Binding, supply and mount matrix Gerard Marull-Paretas
2026-12-03 16:56 ` [PATCH v6 1/4] dt-bindings: iio: magnetometer: Add MEMSIC MMC5603 and MMC5633 Gerard Marull-Paretas
2026-12-03 16:56 ` [PATCH v6 2/4] iio: magnetometer: mmc5633: Reference the datasheet for the SET/RESET wait Gerard Marull-Paretas
2026-12-03 16:56 ` [PATCH v6 3/4] iio: magnetometer: mmc5633: Enable the VDD supply Gerard Marull-Paretas
2026-12-03 16:56 ` [PATCH v6 4/4] iio: magnetometer: mmc5633: Add mount matrix support Gerard Marull-Paretas
2026-12-03 17:26   ` Andy Shevchenko
2026-12-04 23:02     ` Jonathan Cameron [this message]
2026-12-04 23:02 ` [PATCH v6 0/4] iio: magnetometer: mmc5633: Binding, supply and mount matrix 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=20261204230212.1bce17ab@jic23-hlaptop \
    --to=jic23@kernel.org \
    --cc=Frank.li@nxp.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=gerard@teslabs.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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®