[PATCH v2 0/2] Add support for Analog Devices MAX30210

John Erasmus Mari Geronimo posted 2 patches 1 month, 1 week ago
.../iio/temperature/adi,max30210.yaml         |  62 ++
MAINTAINERS                                   |   8 +
drivers/iio/temperature/Kconfig               |  10 +
drivers/iio/temperature/Makefile              |   1 +
drivers/iio/temperature/max30210.c            | 664 ++++++++++++++++++
5 files changed, 745 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/temperature/adi,max30210.yaml
create mode 100644 drivers/iio/temperature/max30210.c
[PATCH v2 0/2] Add support for Analog Devices MAX30210
Posted by John Erasmus Mari Geronimo 1 month, 1 week ago
This series adds support for the Analog Devices MAX30210 I2C
temperature sensor.

The device provides a 16-bit temperature output and includes
features such as a hardware FIFO, programmable sampling rate,
threshold alarms, and interrupt support. These capabilities map
naturally to the IIO subsystem, particularly the buffered interface
and event framework.

Patch 1 adds the devicetree binding.
Patch 2 adds the IIO driver implementation.

Changes in v2:
- Improve commit message to better describe device features and driver
  support.
- Simplify devicetree binding description and clean up property
  descriptions.
- Add MAINTAINERS entry for MAX30210 driver.
- Rename register field macros to include register prefix for clarity.
- Remove incorrect IIO_DMA_MINALIGN usage and switch to proper __be16
  handling.
- Replace manual FIFO byte assembly with get_unaligned_be24().
- Use dev_err_ratelimited() for invalid FIFO data messages.
- Simplify event read/write handlers by reducing nested conditionals.
- Fix write_event_config prototype to use bool state.
- Replace MAX30210_INT_EN macro with regmap_assign_bits().
- Replace deprecated iio_device_claim_direct_mode() usage with
  IIO_DEV_ACQUIRE_DIRECT_MODE().
- Implement conversion completion polling using regmap_read_poll_timeout()
  instead of fixed delay.
- Rework sampling frequency handling using lookup table instead of
  bit math.
- Remove trigger infrastructure and switch to IRQ-driven FIFO handling.
- Replace triggered buffer with kfifo buffer implementation.
- Use regmap_set_bits() and regmap_clear_bits() helpers where appropriate.
- Improve FIFO buffer handling and push 16-bit temperature samples.
- Simplify buffer enable/disable paths.
- Remove unnecessary fields and clean up state structure.
- Add optional hardware reset via powerdown GPIO with software reset
  fallback.
- Adjust scan type to match 16-bit temperature samples.
- Miscellaneous code cleanups and style fixes.

John Erasmus Mari Geronimo (2):
  dt-bindings: iio: temperature: add ADI MAX30210
  iio: temperature: add support for Analog Devices MAX30210

 .../iio/temperature/adi,max30210.yaml         |  62 ++
 MAINTAINERS                                   |   8 +
 drivers/iio/temperature/Kconfig               |  10 +
 drivers/iio/temperature/Makefile              |   1 +
 drivers/iio/temperature/max30210.c            | 664 ++++++++++++++++++
 5 files changed, 745 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/temperature/adi,max30210.yaml
 create mode 100644 drivers/iio/temperature/max30210.c


base-commit: 70a9ae59c5b1f2f5501e78e2d85bfeefd153f854
-- 
2.34.1
Re: [PATCH v2 0/2] Add support for Analog Devices MAX30210
Posted by Andy Shevchenko 1 month, 1 week ago
On Wed, Mar 04, 2026 at 08:25:07PM +0800, John Erasmus Mari Geronimo wrote:
> This series adds support for the Analog Devices MAX30210 I2C
> temperature sensor.
> 
> The device provides a 16-bit temperature output and includes
> features such as a hardware FIFO, programmable sampling rate,
> threshold alarms, and interrupt support. These capabilities map
> naturally to the IIO subsystem, particularly the buffered interface
> and event framework.

Neither cover letter, nor the code patch describes why we need a brand new
driver. The folder has, for example, max30208.c which might be considered
(no, I haven't checked myself).

-- 
With Best Regards,
Andy Shevchenko