Re: [PATCH 2/2] dt-bindings: iio: imu: bmi160: add bmi120

Jonathan Cameron
2024-05-04T11:52:52Z

On Sat, 04 May 2024 01:45:25 +0200
Barnabás Czémán <trabarni@gmail.com> wrote:

> From: Danila Tikhonov <danila@jiaxyga.com>
>
> Document bosch,bmi120 compatible.
>
> Signed-off-by: Danila Tikhonov <danila@jiaxyga.com>
> Signed-off-by: Barnbás Czémán <trabarni@gmail.com>
> ---
> Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml b/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml
> index 47cfba939ca6..9ca874aea837 100644
> --- a/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml
> +++ b/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml
> @@ -16,7 +16,9 @@ description: |
>
> properties:
> compatible:
> - const: bosch,bmi160
> + enum:
> + - bosch,bmi120
> + - bosch,bmi160

Please use a fallback compatible for the bmi120 similar to handling
done for st,asm330lhhx in st,lsm6dsx.yaml

Whilst the driver would currently reject the chip ID, the binding should
assume the driver does fallback handling correctly.

Jonathan

>
> reg:
> maxItems: 1
>