devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/6] Add i2c driver for Bosch BMI260 IMU
@ 2024-10-20 22:00 Justin Weiss
  2024-10-20 22:00 ` [PATCH v3 1/6] iio: imu: bmi270: Remove unused FREQUENCY / SCALE attributes Justin Weiss
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Justin Weiss @ 2024-10-20 22:00 UTC (permalink / raw)
  To: Alex Lanzano, Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Justin Weiss, linux-iio, devicetree, linux-kernel,
	Derek J . Clark, Philip Müller

Add support for the Bosch BMI260 IMU to the BMI270 device driver.

The BMI270 and BMI260 have nearly identical register maps, but have
different chip IDs and firmware.

The BMI260 is the IMU on a number of handheld PCs. Unfortunately,
these devices often misidentify it in ACPI as a BMI160 ("BMI0160," for
example), and it can only be correctly identified using the chip
ID. To avoid conflicts with the bmi160 driver, this driver will not
probe if it detects a BMI160 chip ID.

Also add triggered buffer and scale / sampling frequency attributes,
which the input tools commonly used on handheld PCs require to support
IMUs.

Like the BMI270, the BMI260 requires firmware to be provided.
Signed-off-by: Justin Weiss <justin@justinweiss.com>
---

Changelog:

V3
- Fix: Remove SCALE and FREQUENCY attributes
- Use separate configuration structures instead of an array
- Add bmi260 as compatible ID in bmi270 dt binding doc
- Check chip ID against value in configuration instead of constant
- Update comment for DMA alignment
- Remove unreachable return statement

V2
https://lore.kernel.org/all/20241018233723.28757-1-justin@justinweiss.com/
- Fix commit titles
- Fix: Change FREQUENCY to SAMP_FREQ
- Split chip_info refactor into a separate commit from adding bmi260
- Only fail probe when BMI160 is detected
- Update chip_info based on detected chip ID
- Add BMI260 to DT documentation
- Add BMI260 to of_device_id
- Add expected BMI260 ACPI ID to the SPI driver
- Remove unused/unexpected BMI260 ACPI IDs
- Remove trailing comma for null terminators
- Use DMA_MINALIGN for channel buffer
- Read channels in bulk
- Improve for loops for detecting scale / odr attrs
- Add missing masks
- Use FIELD_GET
- Use read_avail instead of custom attrs
- Misc. formatting and line wrapping improvements

V1
https://lore.kernel.org/all/20241011153751.65152-1-justin@justinweiss.com/

Justin Weiss (6):
  iio: imu: bmi270: Remove unused FREQUENCY / SCALE attributes
  iio: imu: bmi270: Provide chip info as configuration structure
  dt-bindings: iio: imu: bmi270: Add Bosch BMI260
  iio: imu: bmi270: Add support for BMI260
  iio: imu: bmi270: Add triggered buffer for Bosch BMI270 IMU
  iio: imu: bmi270: Add scale and sampling frequency to BMI270 IMU

 .../bindings/iio/imu/bosch,bmi270.yaml        |   4 +-
 drivers/iio/imu/bmi270/Kconfig                |   1 +
 drivers/iio/imu/bmi270/bmi270.h               |  21 +-
 drivers/iio/imu/bmi270/bmi270_core.c          | 442 +++++++++++++++++-
 drivers/iio/imu/bmi270/bmi270_i2c.c           |  24 +-
 drivers/iio/imu/bmi270/bmi270_spi.c           |  19 +-
 6 files changed, 496 insertions(+), 15 deletions(-)


base-commit: 1a8b58362f6a6fef975032f7fceb7c4b80d20d60
-- 
2.47.0


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

end of thread, other threads:[~2024-10-25 16:34 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-20 22:00 [PATCH v3 0/6] Add i2c driver for Bosch BMI260 IMU Justin Weiss
2024-10-20 22:00 ` [PATCH v3 1/6] iio: imu: bmi270: Remove unused FREQUENCY / SCALE attributes Justin Weiss
2024-10-22 18:41   ` Jonathan Cameron
2024-10-20 22:00 ` [PATCH v3 2/6] iio: imu: bmi270: Provide chip info as configuration structure Justin Weiss
2024-10-22 18:43   ` Jonathan Cameron
2024-10-20 22:00 ` [PATCH v3 3/6] dt-bindings: iio: imu: bmi270: Add Bosch BMI260 Justin Weiss
2024-10-21  7:38   ` Krzysztof Kozlowski
2024-10-22 15:51     ` Justin Weiss
2024-10-20 22:00 ` [PATCH v3 4/6] iio: imu: bmi270: Add support for BMI260 Justin Weiss
2024-10-22 15:50   ` Justin Weiss
2024-10-22 16:54     ` Andy Shevchenko
2024-10-22 19:34       ` Jonathan Cameron
2024-10-25 15:42         ` Justin Weiss
2024-10-25 16:34           ` Andy Shevchenko
2024-10-24  6:40     ` Philip Müller
2024-10-24  7:01       ` Andy Shevchenko
2024-10-20 22:00 ` [PATCH v3 5/6] iio: imu: bmi270: Add triggered buffer for Bosch BMI270 IMU Justin Weiss
2024-10-20 22:00 ` [PATCH v3 6/6] iio: imu: bmi270: Add scale and sampling frequency to " Justin Weiss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).