diff mbox series

[v4,2/2] dt-bindings: iio:imu:mpu6050: support more interrupt types

Message ID 20180406220048.29498-2-mkelly@xevo.com
State Not Applicable, archived
Headers show
Series None | expand

Commit Message

Martin Kelly April 6, 2018, 10 p.m. UTC
Document that the inv_mpu6050 driver now supports falling edge, rising
edge, level low, and level high interrupt types, rather than just rising
edge.

The language used is the same as that in st_lsm6dsx.txt.

Signed-off-by: Martin Kelly <mkelly@xevo.com>
---
 Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

Comments

Rob Herring (Arm) April 10, 2018, 2:12 p.m. UTC | #1
On Fri, Apr 06, 2018 at 03:00:48PM -0700, Martin Kelly wrote:
> Document that the inv_mpu6050 driver now supports falling edge, rising

It's really about what the h/w supports for bindings.

> edge, level low, and level high interrupt types, rather than just rising
> edge.
> 
> The language used is the same as that in st_lsm6dsx.txt.
> 
> Signed-off-by: Martin Kelly <mkelly@xevo.com>
> ---
>  Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)

Reviewed-by: Rob Herring <robh@kernel.org>

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Martin Kelly April 10, 2018, 6:11 p.m. UTC | #2
On 04/10/2018 07:12 AM, Rob Herring wrote:
> On Fri, Apr 06, 2018 at 03:00:48PM -0700, Martin Kelly wrote:
>> Document that the inv_mpu6050 driver now supports falling edge, rising
> 
> It's really about what the h/w supports for bindings.
> 

I understand that about devicetree in general, though in this case the 
device supports all these types but the driver did not and would 
silently fail if you gave the wrong type. I wanted to document that it's 
now safe to use the other interrupt types, while before the 
documentation told you (correctly) to use only rising edge.

If you think it's a good idea, I will change the description to 
"Document that the MPU9250 supports ..." to clarify.

>> edge, level low, and level high interrupt types, rather than just rising
>> edge.
>>
>> The language used is the same as that in st_lsm6dsx.txt.
>>
>> Signed-off-by: Martin Kelly <mkelly@xevo.com>
>> ---
>>   Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt | 11 ++++++++---
>>   1 file changed, 8 insertions(+), 3 deletions(-)
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
> 
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt b/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt
index 2b4514592f83..6b106d5ef298 100644
--- a/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt
+++ b/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt
@@ -11,7 +11,12 @@  Required properties:
 		"invensense,icm20608"
  - reg : the I2C address of the sensor
  - interrupt-parent : should be the phandle for the interrupt controller
- - interrupts : interrupt mapping for GPIO IRQ
+ - interrupts: interrupt mapping for IRQ. It should be configured with flags
+   IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_EDGE_RISING, IRQ_TYPE_LEVEL_LOW or
+   IRQ_TYPE_EDGE_FALLING.
+
+  Refer to interrupt-controller/interrupts.txt for generic interrupt client node
+  bindings.
 
 Optional properties:
  - mount-matrix: an optional 3x3 mounting rotation matrix
@@ -24,7 +29,7 @@  Example:
 		compatible = "invensense,mpu6050";
 		reg = <0x68>;
 		interrupt-parent = <&gpio1>;
-		interrupts = <18 1>;
+		interrupts = <18 IRQ_TYPE_EDGE_RISING>;
 		mount-matrix = "-0.984807753012208",  /* x0 */
 		               "0",                   /* y0 */
 		               "-0.173648177666930",  /* z0 */
@@ -41,7 +46,7 @@  Example:
 		compatible = "invensense,mpu9250";
 		reg = <0x68>;
 		interrupt-parent = <&gpio3>;
-		interrupts = <21 1>;
+		interrupts = <21 IRQ_TYPE_LEVEL_HIGH>;
 		i2c-gate {
 			#address-cells = <1>;
 			#size-cells = <0>;