Devicetree
 help / color / mirror / Atom feed
* [PATCH v2 0/2] iio: magnetometer: add support for QST QMC6308
@ 2026-07-21 13:48 Jorijn van der Graaf
  2026-07-21 13:48 ` [PATCH v2 1/2] dt-bindings: iio: magnetometer: add " Jorijn van der Graaf
  2026-07-21 13:48 ` [PATCH v2 2/2] iio: magnetometer: add support for " Jorijn van der Graaf
  0 siblings, 2 replies; 5+ messages in thread
From: Jorijn van der Graaf @ 2026-07-21 13:48 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Jorijn van der Graaf, Jonathan Cameron, David Lechner,
	Nuno Sá, Andy Shevchenko, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Siratul Islam, Uwe Kleine-König, Luca Weiss,
	linux-iio, devicetree, linux-kernel

This adds a driver and DT binding for the QST QMC6308, a 3-axis
anisotropic magnetoresistive (AMR) magnetometer found e.g. in the
Fairphone 6. The series is based on iio/togreg.

The chip is a sibling of the QMC5883L but is not register compatible
with it, so this is a separate driver; its structure intentionally
follows qmc5883l.c. Reads are polled from the chip's periodic
measurement mode, with runtime PM dropping the chip into its suspend
mode between uses.

The binding stays a separate file rather than being folded into
qstcorp,qmc5883l.yaml: as discussed with Siratul in the v1 thread, the
two schemas share only compatible/reg/vdd-supply, and Jonathan leaned
towards keeping the files separate given that small overlap. If the DT
maintainers prefer the combined shape I'm happy to rework it that way.
Adding mount-matrix to qstcorp,qmc5883l.yaml, also raised in that
discussion, is a natural follow-up patch either way.

Tested on a Fairphone 6 (bit-banged i2c-gpio bus) using a
byte-identical backport on that device's 7.1-based kernel; on this
base the driver is build-verified (arm64, W=1 clean). v2 testing
re-covered raw reads, every ODR/oversampling/scale setting (the same
ambient field reads consistently across all four ranges), the
stale-sample discard on range changes, and runtime PM, including that
the chip autosuspends after probe without the v1 usage-counter
dance and that configuration writes land while suspended. The FP6
board DTS will be submitted separately through the qcom tree once
this lands.

Per-patch changelogs are in the individual patches.

v1: https://lore.kernel.org/20260714202842.340293-1-jorijnvdgraaf@catcrafts.net

Jorijn van der Graaf (2):
  dt-bindings: iio: magnetometer: add QST QMC6308
  iio: magnetometer: add support for QST QMC6308

 .../iio/magnetometer/qstcorp,qmc6308.yaml     |  47 ++
 MAINTAINERS                                   |   7 +
 drivers/iio/magnetometer/Kconfig              |  11 +
 drivers/iio/magnetometer/Makefile             |   1 +
 drivers/iio/magnetometer/qmc6308.c            | 602 ++++++++++++++++++
 5 files changed, 668 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/qstcorp,qmc6308.yaml
 create mode 100644 drivers/iio/magnetometer/qmc6308.c


base-commit: 036d96ceec6d966339aea34d034420991e24cfac
-- 
2.55.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-07-21 20:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-21 13:48 [PATCH v2 0/2] iio: magnetometer: add support for QST QMC6308 Jorijn van der Graaf
2026-07-21 13:48 ` [PATCH v2 1/2] dt-bindings: iio: magnetometer: add " Jorijn van der Graaf
2026-07-21 13:48 ` [PATCH v2 2/2] iio: magnetometer: add support for " Jorijn van der Graaf
2026-07-21 14:04   ` sashiko-bot
2026-07-21 20:19   ` Siratul Islam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox