From: Vladislav Kulikov <vlad.kulikov.c@gmail.com>
To: jic23@kernel.org, dlechner@baylibre.com, nuno.sa@analog.com,
andy@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org
Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Vladislav Kulikov <vlad.kulikov.c@gmail.com>
Subject: [PATCH v2 0/2] iio: magnetometer: add MEMSIC MMC5983MA driver
Date: Thu, 7 May 2026 20:50:30 +0000 [thread overview]
Message-ID: <20260507205033.951990-1-vlad.kulikov.c@gmail.com> (raw)
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 initial driver implements the validated I2C single-measurement path.
Other chip features are left for future work:
- SPI transport: the binding describes SPI wiring, but driver support is
left for follow-up validation of the SPI command and SET/RESET
sequencing.
- Temperature channel: left until the temperature output behavior is
better validated.
- Continuous measurement mode and Auto SET/RESET: left until the
interaction between CMM, TM_M, Meas_M_Done, and SET/RESET sequencing
is better understood.
- Saturation/self-test bits and BW/decimation tuning: not exposed until
their behavior can be described reliably through stable IIO ABI.
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 testing showed that a longer software delay is
needed before taking the next measurement.
Changes since v1:
- DT binding:
- added SPI bus support, interrupts, and vddio-supply
- made vdd-supply required
- switched to unevaluatedProperties with spi-peripheral-props ref
- Driver:
- replaced scoped_guard() with guard(mutex) in a case block
- added datasheet page references for timing values
- changed product ID mismatch from probe failure to dev_info()
- hardcoded the IIO device name
- added trailing commas
- added local struct device and regmap pointers in mmc5983_init()
- MAINTAINERS:
- split binding and driver F: entries across the relevant patches
Thank you Jonathan for the review and quick response.
Vladislav Kulikov (2):
dt-bindings: iio: magnetometer: add MEMSIC MMC5983MA
iio: magnetometer: add driver for MEMSIC MMC5983MA
.../iio/magnetometer/memsic,mmc5983.yaml | 65 ++++
MAINTAINERS | 7 +
drivers/iio/magnetometer/Kconfig | 11 +
drivers/iio/magnetometer/Makefile | 1 +
drivers/iio/magnetometer/mmc5983.c | 351 ++++++++++++++++++
5 files changed, 435 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
next reply other threads:[~2026-05-07 20:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 20:50 Vladislav Kulikov [this message]
2026-05-07 20:50 ` [PATCH v2 1/2] dt-bindings: iio: magnetometer: add MEMSIC MMC5983MA Vladislav Kulikov
2026-05-08 15:06 ` Conor Dooley
2026-05-09 21:51 ` David Lechner
2026-05-07 20:50 ` [PATCH v2 2/2] iio: magnetometer: add driver for " Vladislav Kulikov
2026-05-09 22:09 ` David Lechner
2026-05-10 7:02 ` Andy Shevchenko
2026-05-11 17:14 ` Jonathan Cameron
2026-05-08 10:03 ` [PATCH v2 0/2] iio: magnetometer: add MEMSIC MMC5983MA driver Andy Shevchenko
2026-05-08 10:40 ` Vlad
2026-05-09 7:58 ` Andy Shevchenko
2026-05-09 22:06 ` David Lechner
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=20260507205033.951990-1-vlad.kulikov.c@gmail.com \
--to=vlad.kulikov.c@gmail.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.