diff options
| author | Bingzhe Cai <bingzhec@codeaurora.org> | 2014-04-17 18:06:32 +0800 |
|---|---|---|
| committer | Bingzhe Cai <bingzhec@codeaurora.org> | 2014-04-27 00:36:18 +0800 |
| commit | 42f417200929b363766ca8de55857c3ea97a01a2 (patch) | |
| tree | c31c00474d8e0115ddccdd77d654ceada4f7659d | |
| parent | b2016f863ea1a4caa889ac5d423fd0cc9b49b214 (diff) | |
input: sensors: interrupt and power enabling pins are optional
The interrupt and power enabling pin configurations are not
required properties since some design doesn't have gpio for
interrupt and power enabling.
CRs-fixed: 655796
Change-Id: If66bd0cd1a75dea3ef8c65439218cf8e096b7d5d
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
| -rw-r--r-- | Documentation/devicetree/bindings/input/misc/mpu6050.txt | 17 | ||||
| -rw-r--r-- | drivers/input/misc/mpu6050.c | 2 |
2 files changed, 6 insertions, 13 deletions
diff --git a/Documentation/devicetree/bindings/input/misc/mpu6050.txt b/Documentation/devicetree/bindings/input/misc/mpu6050.txt index 9a2d5435756..6a4ea9adb15 100644 --- a/Documentation/devicetree/bindings/input/misc/mpu6050.txt +++ b/Documentation/devicetree/bindings/input/misc/mpu6050.txt @@ -8,27 +8,22 @@ Required properties: - interrupts : Gyrometer sample interrupt to indicate new data ready. - vdd-supply : Analog power supply needed to power device. - vlogic-supply : Digital IO power supply needed for IO and I2C. - - invn,gpio-int : GPIO used for interrupt. - - invn,gpio-en : GPIO used for power enabling. Optional properties: - invn,use-interrupt : use device interrupt to trigger data acquisition instead of polling data. + - invn,gpio-int : GPIO used for interrupt. + - invn,gpio-en : GPIO used for power enabling. Example: i2c@f9925000 { mpu6050@68 { - #address-cells = <1>; - #size-cells = <0>; - status = "okay"; reg = <0x68>; - compatible = "invn,mpu3050"; - interrupt-parent = <&msmgpio>; + compatible = "invn,mpu6050"; + interrupt-parent = <&msm_gpio>; interrupts = <84 0x2>; - vlogic-supply = <&pm8110_l14>; - vdd-supply = <&pm8110_l19>; - invn,gpio-int = <&msmgpio 84 0x2>; - invn,gpio-en = <&pm8110_gpios 2 0x2>; + vlogic-supply = <&pm8916_l17>; + vdd-supply = <&pm8916_l6>; }; }; diff --git a/drivers/input/misc/mpu6050.c b/drivers/input/misc/mpu6050.c index 8bdb3dad5c3..5007bcf5d78 100644 --- a/drivers/input/misc/mpu6050.c +++ b/drivers/input/misc/mpu6050.c @@ -1093,8 +1093,6 @@ static int mpu6050_parse_dt(struct device *dev, pdata->gpio_en = of_get_named_gpio_flags(dev->of_node, "invn,gpio-en", 0, NULL); - if (!gpio_is_valid(pdata->gpio_en)) - return -EINVAL; pdata->use_int = of_property_read_bool(dev->of_node, "invn,use-interrupt"); |
