Message ID | 20240408-mpu6050-i2c-gate-v1-1-621f051ce7de@z3ntu.xyz (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | dt-bindings: iio: imu: mpu6050: Improve i2c-gate disallow list | expand |
Hello Luca, good catch, thanks for the patch! Acked-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com> From: Luca Weiss <luca@z3ntu.xyz> Sent: Monday, April 8, 2024 18:34 To: ~postmarketos/upstreaming@lists.sr.ht <~postmarketos/upstreaming@lists.sr.ht>; phone-devel@vger.kernel.org <phone-devel@vger.kernel.org>; Jonathan Cameron <jic23@kernel.org>; Lars-Peter Clausen <lars@metafoo.de>; Rob Herring <robh@kernel.org>; Krzysztof Kozlowski <krzk+dt@kernel.org>; Conor Dooley <conor+dt@kernel.org>; Jean-Baptiste Maneyrol <Jean-Baptiste.Maneyrol@tdk.com> Cc: linux-iio@vger.kernel.org <linux-iio@vger.kernel.org>; devicetree@vger.kernel.org <devicetree@vger.kernel.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; Luca Weiss <luca@z3ntu.xyz> Subject: [PATCH] dt-bindings: iio: imu: mpu6050: Improve i2c-gate disallow list This Message Is From an Untrusted Sender You have not previously corresponded with this sender. Before all supported sensors except for MPU{9150,9250,9255} were not allowed to use i2c-gate in the bindings which excluded quite a few supported sensors where this functionality is supported. Switch the list of sensors to ones where the Linux driver explicitly disallows support for the auxiliary bus ("inv_mpu_i2c_aux_bus"). Since the driver is also based on "default: return true" this should scale better into the future. Signed-off-by: Luca Weiss <luca@z3ntu.xyz> --- This fixes dt validation error on qcom-msm8974-lge-nexus5-hammerhead which uses mpu6515 arch/arm/boot/dts/qcom/qcom-msm8974-lge-nexus5-hammerhead.dtb: mpu6515@68: i2c-gate: False schema does not allow {'#address-cells': [[1]], '#size-cells': [[0]], 'ak8963@f': {'compatible': ['asahi-kasei,ak8963'], 'reg': [[15]], 'gpios': [[40, 67, 0]], 'vid-supply': [[50]], 'vdd-supply': [[49]]}, 'bmp280@76': {'compatible': ['bosch,bmp280'], 'reg': [[118]], 'vdda-supply': [[50]], 'vddd-supply': [[49]]}} from schema $id: https://urldefense.com/v3/__http://devicetree.org/schemas/iio/imu/invensense,mpu6050.yaml*__;Iw!!FtrhtPsWDhZ6tw!Athn1pwCL_LPpZ97exHEFSkirApIqFF2ISY01IuyHtFBxpbPkcPWh_FmzB_TiCzb8uv1HO0AHY4IeIlv1-o$[devicetree[.]org] --- .../devicetree/bindings/iio/imu/invensense,mpu6050.yaml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml b/Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml index 297b8a1a7ffb..587ff2bced2d 100644 --- a/Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml +++ b/Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml @@ -62,14 +62,15 @@ properties: allOf: - $ref: /schemas/spi/spi-peripheral-props.yaml# - if: - not: - properties: - compatible: - contains: - enum: - - invensense,mpu9150 - - invensense,mpu9250 - - invensense,mpu9255 + properties: + compatible: + contains: + enum: + - invensense,iam20680 + - invensense,icm20602 + - invensense,icm20608 + - invensense,icm20609 + - invensense,icm20689 then: properties: i2c-gate: false --- base-commit: 8568bb2ccc278f344e6ac44af6ed010a90aa88dc change-id: 20240408-mpu6050-i2c-gate-4ea473e492f4 Best regards,
On 08/04/2024 18:34, Luca Weiss wrote: > Before all supported sensors except for MPU{9150,9250,9255} were not > allowed to use i2c-gate in the bindings which excluded quite a few > supported sensors where this functionality is supported. > > Switch the list of sensors to ones where the Linux driver explicitly > disallows support for the auxiliary bus ("inv_mpu_i2c_aux_bus"). Since > the driver is also based on "default: return true" this should scale > better into the future. > > Signed-off-by: Luca Weiss <luca@z3ntu.xyz> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Best regards, Krzysztof
On Tue, 9 Apr 2024 08:36:08 +0200 Krzysztof Kozlowski <krzk@kernel.org> wrote: > On 08/04/2024 18:34, Luca Weiss wrote: > > Before all supported sensors except for MPU{9150,9250,9255} were not > > allowed to use i2c-gate in the bindings which excluded quite a few > > supported sensors where this functionality is supported. > > > > Switch the list of sensors to ones where the Linux driver explicitly > > disallows support for the auxiliary bus ("inv_mpu_i2c_aux_bus"). Since > > the driver is also based on "default: return true" this should scale > > better into the future. > > > > Signed-off-by: Luca Weiss <luca@z3ntu.xyz> > > Acked-by: Krzysztof Kozlowski <krzk@kernel.org> > > Best regards, > Krzysztof > Applied, thanks
diff --git a/Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml b/Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml index 297b8a1a7ffb..587ff2bced2d 100644 --- a/Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml +++ b/Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml @@ -62,14 +62,15 @@ properties: allOf: - $ref: /schemas/spi/spi-peripheral-props.yaml# - if: - not: - properties: - compatible: - contains: - enum: - - invensense,mpu9150 - - invensense,mpu9250 - - invensense,mpu9255 + properties: + compatible: + contains: + enum: + - invensense,iam20680 + - invensense,icm20602 + - invensense,icm20608 + - invensense,icm20609 + - invensense,icm20689 then: properties: i2c-gate: false
Before all supported sensors except for MPU{9150,9250,9255} were not allowed to use i2c-gate in the bindings which excluded quite a few supported sensors where this functionality is supported. Switch the list of sensors to ones where the Linux driver explicitly disallows support for the auxiliary bus ("inv_mpu_i2c_aux_bus"). Since the driver is also based on "default: return true" this should scale better into the future. Signed-off-by: Luca Weiss <luca@z3ntu.xyz> --- This fixes dt validation error on qcom-msm8974-lge-nexus5-hammerhead which uses mpu6515 arch/arm/boot/dts/qcom/qcom-msm8974-lge-nexus5-hammerhead.dtb: mpu6515@68: i2c-gate: False schema does not allow {'#address-cells': [[1]], '#size-cells': [[0]], 'ak8963@f': {'compatible': ['asahi-kasei,ak8963'], 'reg': [[15]], 'gpios': [[40, 67, 0]], 'vid-supply': [[50]], 'vdd-supply': [[49]]}, 'bmp280@76': {'compatible': ['bosch,bmp280'], 'reg': [[118]], 'vdda-supply': [[50]], 'vddd-supply': [[49]]}} from schema $id: http://devicetree.org/schemas/iio/imu/invensense,mpu6050.yaml# --- .../devicetree/bindings/iio/imu/invensense,mpu6050.yaml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) --- base-commit: 8568bb2ccc278f344e6ac44af6ed010a90aa88dc change-id: 20240408-mpu6050-i2c-gate-4ea473e492f4 Best regards,