mbox series

[v3,0/2] Add ADXL367 driver

Message ID 20211217114548.1659721-1-cosmin.tanislav@analog.com (mailing list archive)
Headers show
Series Add ADXL367 driver | expand

Message

Cosmin Tanislav Dec. 17, 2021, 11:45 a.m. UTC
The ADXL367 is an ultralow power, 3-axis MEMS accelerometer.

The ADXL367 does not alias input signals to achieve ultralow power
consumption, it samples the full bandwidth of the sensor at all
data rates. Measurement ranges of +-2g, +-4g, and +-8g are available,
with a resolution of 0.25mg/LSB on the +-2 g range.

In addition to its ultralow power consumption, the ADXL367
has many features to enable true system level power reduction.
It includes a deep multimode output FIFO, a built-in micropower
temperature sensor, and an internal ADC for synchronous conversion
of an additional analog input.

V1 -> V2
 * add support for vdd and vddio supplies
 * lock fifo_watermark retrieval
 * fix indentation of sysfs_emit for fifo_mode
 * dt-bindings: add spi-max-frequency: true
 * dt-bindings: remove cs-gpios property
 * dt-bindings: remove status property
 * dt-bindings: add support for vdd

V2 -> V3
 * MAINTAINERS: use wildcard for adxl367
 * dt-bindings: adxl367@addr -> accelerometer@addr
 * put asm include after linux includes
 * drop registers accessed implicitly
 * fifo_full -> fifo_watermark
 * print expected device id
 * remove INDIO_BUFFER_HARDWARE
 * inline ADXL367_EVENT macro
 * inline ADXL367_14BIT_SCAN_INFO
 * inline regulator enum
 * remove of.h in spi driver
 * cast const void * to const u8 * in spi read
 * switch to trigger-less buffer
 * increase reset time as advised by hardware team
 * let iio framework validate available channel masks
 * enable adc or temp channel automatically on single read
 * wait for 100ms after enabling adc or temp for output
   to settle on single read (waiting on hardware team input)
 * enable adc or temp channel automatically on buffered read
 * claim direct mode when setting range
 * claim direct mode when setting odr
 * claim direct mode when setting event config
 * sort status masks in descending bit order
 * hardcode indio_dev name
 * add some comments regarding spi message layout
 * use bulk_write for activity and inactivity threshold
 * use bulk_write for inactivity time
 * use bool as return type of fifo format finding function
 * remove shift from channels scan type

Cosmin Tanislav (2):
  dt-bindings: iio: accel: add ADXL367
  iio: accel: add ADXL367 driver

 .../bindings/iio/accel/adi,adxl367.yaml       |   79 +
 MAINTAINERS                                   |    8 +
 drivers/iio/accel/Kconfig                     |   27 +
 drivers/iio/accel/Makefile                    |    3 +
 drivers/iio/accel/adxl367.c                   | 1617 +++++++++++++++++
 drivers/iio/accel/adxl367.h                   |   23 +
 drivers/iio/accel/adxl367_i2c.c               |   89 +
 drivers/iio/accel/adxl367_spi.c               |  163 ++
 8 files changed, 2009 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/accel/adi,adxl367.yaml
 create mode 100644 drivers/iio/accel/adxl367.c
 create mode 100644 drivers/iio/accel/adxl367.h
 create mode 100644 drivers/iio/accel/adxl367_i2c.c
 create mode 100644 drivers/iio/accel/adxl367_spi.c

Comments

Cosmin Tanislav Dec. 17, 2021, 1:48 p.m. UTC | #1
V2 -> V3
  * limit number of fifo entries read to multiple of set size to avoid
    data unalignment

On 12/17/21 13:45, Cosmin Tanislav wrote:
> The ADXL367 is an ultralow power, 3-axis MEMS accelerometer.
> 
> The ADXL367 does not alias input signals to achieve ultralow power
> consumption, it samples the full bandwidth of the sensor at all
> data rates. Measurement ranges of +-2g, +-4g, and +-8g are available,
> with a resolution of 0.25mg/LSB on the +-2 g range.
> 
> In addition to its ultralow power consumption, the ADXL367
> has many features to enable true system level power reduction.
> It includes a deep multimode output FIFO, a built-in micropower
> temperature sensor, and an internal ADC for synchronous conversion
> of an additional analog input.
> 
> V1 -> V2
>   * add support for vdd and vddio supplies
>   * lock fifo_watermark retrieval
>   * fix indentation of sysfs_emit for fifo_mode
>   * dt-bindings: add spi-max-frequency: true
>   * dt-bindings: remove cs-gpios property
>   * dt-bindings: remove status property
>   * dt-bindings: add support for vdd
> 
> V2 -> V3
>   * MAINTAINERS: use wildcard for adxl367
>   * dt-bindings: adxl367@addr -> accelerometer@addr
>   * put asm include after linux includes
>   * drop registers accessed implicitly
>   * fifo_full -> fifo_watermark
>   * print expected device id
>   * remove INDIO_BUFFER_HARDWARE
>   * inline ADXL367_EVENT macro
>   * inline ADXL367_14BIT_SCAN_INFO
>   * inline regulator enum
>   * remove of.h in spi driver
>   * cast const void * to const u8 * in spi read
>   * switch to trigger-less buffer
>   * increase reset time as advised by hardware team
>   * let iio framework validate available channel masks
>   * enable adc or temp channel automatically on single read
>   * wait for 100ms after enabling adc or temp for output
>     to settle on single read (waiting on hardware team input)
>   * enable adc or temp channel automatically on buffered read
>   * claim direct mode when setting range
>   * claim direct mode when setting odr
>   * claim direct mode when setting event config
>   * sort status masks in descending bit order
>   * hardcode indio_dev name
>   * add some comments regarding spi message layout
>   * use bulk_write for activity and inactivity threshold
>   * use bulk_write for inactivity time
>   * use bool as return type of fifo format finding function
>   * remove shift from channels scan type
> 
> Cosmin Tanislav (2):
>    dt-bindings: iio: accel: add ADXL367
>    iio: accel: add ADXL367 driver
> 
>   .../bindings/iio/accel/adi,adxl367.yaml       |   79 +
>   MAINTAINERS                                   |    8 +
>   drivers/iio/accel/Kconfig                     |   27 +
>   drivers/iio/accel/Makefile                    |    3 +
>   drivers/iio/accel/adxl367.c                   | 1617 +++++++++++++++++
>   drivers/iio/accel/adxl367.h                   |   23 +
>   drivers/iio/accel/adxl367_i2c.c               |   89 +
>   drivers/iio/accel/adxl367_spi.c               |  163 ++
>   8 files changed, 2009 insertions(+)
>   create mode 100644 Documentation/devicetree/bindings/iio/accel/adi,adxl367.yaml
>   create mode 100644 drivers/iio/accel/adxl367.c
>   create mode 100644 drivers/iio/accel/adxl367.h
>   create mode 100644 drivers/iio/accel/adxl367_i2c.c
>   create mode 100644 drivers/iio/accel/adxl367_spi.c
>