From: NanamiKite <nanami@yosoro.hk>
To: Jonathan Cameron <jic23@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: "David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, NanamiKite <nanami@yosoro.hk>
Subject: [RFC PATCH v1 0/2] iio: imu: Add support for QST QMI8658C
Date: Fri, 4 Dec 2026 16:55:02 +0800 [thread overview]
Message-ID: <tencent_B56B88B0062C57D844D703DB526F00460A09@qq.com> (raw)
This series adds a DT binding and an initial I2C driver for the QST
QMI8658C 6-axis IMU (3-axis accelerometer, 3-axis gyroscope, and
temperature sensor).
Right now it only covers direct sysfs reads, scale/ODR settings,
mount-matrix, and vdd/vddio supplies. Triggers, FIFO, interrupts, and
runtime PM can come later once the basic layout looks reasonable.
A few things I'd like feedback on:
- Keeping both accel and gyro enabled for now: the chip uses different
ODR tables for the same aODR register values depending on whether the
gyro is on or off. Leaving it in 6DOF mode keeps the ODR table simple
for an initial driver, or would you rather see separate modes from
the start?
- Regulator startup delay: the datasheet lists t0 = 150 ms from power
up. Should probe() sleep after enabling supplies before reading
WHO_AM_I, in case a board actually switches them off?
- Chip IDs: my QMI8658C module returns WHO_AM_I = 0x05 and
REVISION_ID = 0x7b (rev 0.9 datasheet says 0x79). The driver warns on
an unexpected WHO_AM_I rather than failing probe, and only logs
REVISION_ID at dbg level.
Compile-tested against linux-next (next-20261203) with W=1 C=1 and
dt_binding_check (dtschema 2026.9), and tested on a Raspberry Pi 4B
(i2c1, 0x6b) running 6.1.21-v8+ with a small local build shim for
cleanup.h/array_size.h/.probe_new (driver source itself is untouched).
Accel readings give ~9.64 m/s^2 at rest, switching +/-2g to +/-4g halves
the raw values as expected, temp reads ~19.2 C, and 3 unbind/bind cycles
come back clean (which caught that SensorDisable needs to be cleared
before writing RESET, otherwise the reset fires late and wipes CTRL1
back to 0x20).
NanamiKite (2):
dt-bindings: iio: imu: Add QST QMI8658C
iio: imu: Add driver for QST QMI8658C
.../bindings/iio/imu/qstcorp,qmi8658c.yaml | 71 ++
MAINTAINERS | 7 +
drivers/iio/imu/Kconfig | 12 +
drivers/iio/imu/Makefile | 2 +
drivers/iio/imu/qmi8658.c | 622 ++++++++++++++++++
5 files changed, 714 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/imu/qstcorp,qmi8658c.yaml
create mode 100644 drivers/iio/imu/qmi8658.c
--
2.56.1
next reply other threads:[~2026-12-04 8:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 8:55 NanamiKite [this message]
2026-12-04 9:47 ` Andy Shevchenko
2026-12-04 10:59 ` NanamiKite
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=tencent_B56B88B0062C57D844D703DB526F00460A09@qq.com \
--to=nanami@yosoro.hk \
--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 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®