Re: [PATCH v2 2/2] iio: imu: Add driver for BMI323 IMU
From: Jonathan Cameron
Date: Sat Oct 14 2023 - 12:46:17 EST
On Fri, 13 Oct 2023 09:18:08 +0530
Jagath Jog J <jagathjog1996@xxxxxxxxx> wrote:
> The Bosch BMI323 is a 6-axis low-power IMU that provide measurements for
> acceleration, angular rate, and temperature. This sensor includes
> motion-triggered interrupt features, such as a step counter, tap detection,
> and activity/inactivity interrupt capabilities.
>
> The driver supports various functionalities, including data ready, FIFO
> data handling, and events such as tap detection, step counting, and
> activity interrupts.
>
> Signed-off-by: Jagath Jog J <jagathjog1996@xxxxxxxxx>
Hi Jagath,
Nice driver.
We are rapidly approaching the end of this cycle and as this is a
large driver, I think it could do to remain on list at least a week
before I apply it or until it picks up some tags from others if that
happens sooner. Hence I'm afraid it might well sneak into next cycle.
A couple of really small things in the docs and build files from me.
Jonathan
> ---
> Documentation/ABI/testing/sysfs-bus-iio | 18 +
> MAINTAINERS | 7 +
> drivers/iio/imu/Kconfig | 1 +
> drivers/iio/imu/Makefile | 1 +
> drivers/iio/imu/bmi323/Kconfig | 33 +
> drivers/iio/imu/bmi323/Makefile | 7 +
> drivers/iio/imu/bmi323/bmi323.h | 209 +++
> drivers/iio/imu/bmi323/bmi323_core.c | 2139 +++++++++++++++++++++++
> drivers/iio/imu/bmi323/bmi323_i2c.c | 121 ++
> drivers/iio/imu/bmi323/bmi323_spi.c | 92 +
> 10 files changed, 2628 insertions(+)
> create mode 100644 drivers/iio/imu/bmi323/Kconfig
> create mode 100644 drivers/iio/imu/bmi323/Makefile
> create mode 100644 drivers/iio/imu/bmi323/bmi323.h
> create mode 100644 drivers/iio/imu/bmi323/bmi323_core.c
> create mode 100644 drivers/iio/imu/bmi323/bmi323_i2c.c
> create mode 100644 drivers/iio/imu/bmi323/bmi323_spi.c
>
> diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
> index 19cde14f3869..c66fc560ee4b 100644
> --- a/Documentation/ABI/testing/sysfs-bus-iio
> +++ b/Documentation/ABI/testing/sysfs-bus-iio
> @@ -2254,3 +2254,21 @@ Description:
> If a label is defined for this event add that to the event
> specific attributes. This is useful for userspace to be able to
> better identify an individual event.
> +
> +What: /sys/.../events/in_accel_gesture_tap_wait_timeout
> +KernelVersion: 6.7
> +Contact: linux-iio@xxxxxxxxxxxxxxx
> +Description:
> + Enable tap gesture confirmation with timeout.
> +
> +What: /sys/.../events/in_accel_gesture_tap_wait_dur
> +KernelVersion: 6.7
> +Contact: linux-iio@xxxxxxxxxxxxxxx
> +Description:
> + Timeout value for tap gesture confirmation.
Units need to be specified. Seconds?
> +
> +What: /sys/.../events/in_accel_gesture_tap_wait_dur_available
> +KernelVersion: 6.7
> +Contact: linux-iio@xxxxxxxxxxxxxxx
> +Description:
> + List of available timeout value for tap gesture confirmation.
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 4e07c032d06a..47ca415212a7 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -3595,6 +3595,13 @@ S: Maintained
> F: Documentation/devicetree/bindings/iio/accel/bosch,bma400.yaml
> F: drivers/iio/accel/bma400*
>
> +BOSCH SENSORTEC BMI323 IMU IIO DRIVER
> +M: Jagath Jog J <jagathjog1996@xxxxxxxxx>
> +L: linux-iio@xxxxxxxxxxxxxxx
> +S: Maintained
> +F: Documentation/devicetree/bindings/iio/imu/bosch,bma400.yaml
> +F: drivers/iio/imu/bmi323/
> +
> BPF JIT for ARM
> M: Shubham Bansal <illusionist.neo@xxxxxxxxx>
> L: bpf@xxxxxxxxxxxxxxx
> diff --git a/drivers/iio/imu/Kconfig b/drivers/iio/imu/Kconfig
> index c2f97629e9cd..6c9a85294bc1 100644
> --- a/drivers/iio/imu/Kconfig
> +++ b/drivers/iio/imu/Kconfig
> @@ -54,6 +54,7 @@ config ADIS16480
>
> source "drivers/iio/imu/bmi160/Kconfig"
> source "drivers/iio/imu/bno055/Kconfig"
> +source "drivers/iio/imu/bmi323/Kconfig"
Same on ordering.
>
> config FXOS8700
> tristate
> diff --git a/drivers/iio/imu/Makefile b/drivers/iio/imu/Makefile
> index 6eb612034722..627406476357 100644
> --- a/drivers/iio/imu/Makefile
> +++ b/drivers/iio/imu/Makefile
> @@ -16,6 +16,7 @@ obj-$(CONFIG_IIO_ADIS_LIB) += adis_lib.o
>
> obj-y += bmi160/
> obj-y += bno055/
> +obj-y += bmi323/
Alphabetical order.
> diff --git a/drivers/iio/imu/bmi323/bmi323_core.c b/drivers/iio/imu/bmi323/bmi323_core.c
> new file mode 100644
> index 000000000000..0bd5dedd9a63
> --- /dev/null
> +++ b/drivers/iio/imu/bmi323/bmi323_core.c
> @@ -0,0 +1,2139 @@