The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/3] iio: magnetometer: add MEMSIC MMC5983MA driver
@ 2026-05-07 12:47 Vladislav Kulikov
  2026-05-07 12:47 ` [PATCH 1/3] dt-bindings: iio: magnetometer: add MEMSIC MMC5983MA Vladislav Kulikov
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Vladislav Kulikov @ 2026-05-07 12:47 UTC (permalink / raw)
  To: jic23, dlechner, nuno.sa, andy, robh, krzk+dt, conor+dt
  Cc: linux-iio, devicetree, linux-kernel, Vladislav Kulikov

Add an IIO driver for the MEMSIC MMC5983MA 3-axis magnetometer over
I2C. The driver provides raw magnetic field readings with per-measurement
SET/RESET offset cancellation, giving 18-bit output with a full-scale
range of +/-8 Gauss.

Tested on a Raspberry Pi 2B with the sensor on I2C-1 at 0x30.

The following chip features are intentionally left out of the initial
driver because the public datasheet does not provide enough detail to
expose them confidently through stable IIO ABI, or because they still
need more validation:

- SPI transport: deferred because SET/RESET polarity behavior has been
  reported to differ between I2C and SPI, especially around SET/RESET
  timing and/or SPI mode.
- Temperature channel: deferred until the temperature output behavior is
  better validated.
- Continuous measurement mode and Auto SET/RESET: deferred because the
  datasheet does not clearly define the interaction between CMM, TM_M,
  Meas_M_Done, and SET/RESET sequencing.
- Saturation/self-test bits: deferred because the applied test field
  strength and bit lifetime are not specified.
- BW/decimation filter tuning: only the documented measurement timing is
  used; no filter response is exposed because the filter topology and
  coefficients are not documented.

The driver uses a conservative 500 us post-SET/RESET delay before
starting the following measurement. The datasheet describes a 500 ns
SET/RESET coil pulse, but existing sample code and practical testing
indicate that a longer software delay is needed before taking the next
measurement.

Vladislav Kulikov (3):
  dt-bindings: iio: magnetometer: add MEMSIC MMC5983MA
  iio: magnetometer: add driver for MEMSIC MMC5983MA
  MAINTAINERS: add entry for MEMSIC MMC5983MA magnetometer driver

 .../iio/magnetometer/memsic,mmc5983.yaml      |  38 ++
 MAINTAINERS                                   |   7 +
 drivers/iio/magnetometer/Kconfig              |  11 +
 drivers/iio/magnetometer/Makefile             |   1 +
 drivers/iio/magnetometer/mmc5983.c            | 330 ++++++++++++++++++
 5 files changed, 387 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/memsic,mmc5983.yaml
 create mode 100644 drivers/iio/magnetometer/mmc5983.c


base-commit: 7fd2df204f342fc17d1a0bfcd474b24232fb0f32
-- 
2.43.0


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

end of thread, other threads:[~2026-05-08  9:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-07 12:47 [PATCH 0/3] iio: magnetometer: add MEMSIC MMC5983MA driver Vladislav Kulikov
2026-05-07 12:47 ` [PATCH 1/3] dt-bindings: iio: magnetometer: add MEMSIC MMC5983MA Vladislav Kulikov
2026-05-07 16:46   ` Jonathan Cameron
2026-05-07 12:47 ` [PATCH 2/3] iio: magnetometer: add driver for " Vladislav Kulikov
2026-05-07 17:00   ` Jonathan Cameron
2026-05-07 12:47 ` [PATCH 3/3] MAINTAINERS: add entry for MEMSIC MMC5983MA magnetometer driver Vladislav Kulikov
2026-05-07 16:47   ` Jonathan Cameron
2026-05-08  9:19 ` [PATCH 0/3] iio: magnetometer: add MEMSIC MMC5983MA driver Andy Shevchenko

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