diff mbox

[2/2] Input: adxl34x - add device tree documentation

Message ID 1420599537-28740-2-git-send-email-walter@vanguardiasur.com.ar
State Needs Review / ACK, archived
Headers show

Checks

Context Check Description
robh/checkpatch warning total: 1 errors, 0 warnings, 0 lines checked
robh/patch-applied success

Commit Message

Walter Lozano Jan. 7, 2015, 2:58 a.m. UTC
This patch adds a basic documentation regarding the device tree
bindings of adxl34x digital accelerometer.

Signed-off-by: Walter Lozano <walter@vanguardiasur.com.ar>
---
 .../devicetree/bindings/input/adxl34x.txt          |   53 ++++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/adxl34x.txt

Comments

Geert Uytterhoeven Jan. 7, 2015, 9:42 a.m. UTC | #1
On Wed, Jan 7, 2015 at 3:58 AM, Walter Lozano
<walter@vanguardiasur.com.ar> wrote:
> diff --git a/Documentation/devicetree/bindings/input/adxl34x.txt b/Documentation/devicetree/bindings/input/adxl34x.txt
> new file mode 100644
> index 0000000..0774f7e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/adxl34x.txt
> @@ -0,0 +1,53 @@
> +Device Tree bindings for adxl34x digital accelerometer, both spi and i2c.
> +
> +Depending on the interface this node should be a child of a spi or i2c bus.
> +
> +Required properties:
> +- compatible: "adxl34x"

"adi,adxl34x"?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
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
Walter Lozano Jan. 8, 2015, 5:40 p.m. UTC | #2
On Wed, Jan 7, 2015 at 6:42 AM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Wed, Jan 7, 2015 at 3:58 AM, Walter Lozano
> <walter@vanguardiasur.com.ar> wrote:
>> diff --git a/Documentation/devicetree/bindings/input/adxl34x.txt b/Documentation/devicetree/bindings/input/adxl34x.txt
>> new file mode 100644
>> index 0000000..0774f7e
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/input/adxl34x.txt
>> @@ -0,0 +1,53 @@
>> +Device Tree bindings for adxl34x digital accelerometer, both spi and i2c.
>> +
>> +Depending on the interface this node should be a child of a spi or i2c bus.
>> +
>> +Required properties:
>> +- compatible: "adxl34x"
>
> "adi,adxl34x"?

Great, thanks for your feedback.

Regards,

Walter
--
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
Geert Uytterhoeven Jan. 8, 2015, 6:51 p.m. UTC | #3
On Thu, Jan 8, 2015 at 6:40 PM, Walter Lozano
<walter@vanguardiasur.com.ar> wrote:
> On Wed, Jan 7, 2015 at 6:42 AM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>> On Wed, Jan 7, 2015 at 3:58 AM, Walter Lozano
>> <walter@vanguardiasur.com.ar> wrote:
>>> diff --git a/Documentation/devicetree/bindings/input/adxl34x.txt b/Documentation/devicetree/bindings/input/adxl34x.txt
>>> new file mode 100644
>>> index 0000000..0774f7e
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/input/adxl34x.txt
>>> @@ -0,0 +1,53 @@
>>> +Device Tree bindings for adxl34x digital accelerometer, both spi and i2c.
>>> +
>>> +Depending on the interface this node should be a child of a spi or i2c bus.
>>> +
>>> +Required properties:
>>> +- compatible: "adxl34x"
>>
>> "adi,adxl34x"?
>
> Great, thanks for your feedback.

BTW, did you see "[PATCH] input: adxl34x: Add OF match support"
(http://www.spinics.net/lists/linux-i2c/msg18107.html)?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
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
Walter Lozano Jan. 8, 2015, 8:15 p.m. UTC | #4
On Thu, Jan 8, 2015 at 3:51 PM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Thu, Jan 8, 2015 at 6:40 PM, Walter Lozano
> <walter@vanguardiasur.com.ar> wrote:
>> On Wed, Jan 7, 2015 at 6:42 AM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>>> On Wed, Jan 7, 2015 at 3:58 AM, Walter Lozano
>>> <walter@vanguardiasur.com.ar> wrote:
>>>> diff --git a/Documentation/devicetree/bindings/input/adxl34x.txt b/Documentation/devicetree/bindings/input/adxl34x.txt
>>>> new file mode 100644
>>>> index 0000000..0774f7e
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/input/adxl34x.txt
>>>> @@ -0,0 +1,53 @@
>>>> +Device Tree bindings for adxl34x digital accelerometer, both spi and i2c.
>>>> +
>>>> +Depending on the interface this node should be a child of a spi or i2c bus.
>>>> +
>>>> +Required properties:
>>>> +- compatible: "adxl34x"
>>>
>>> "adi,adxl34x"?
>>
>> Great, thanks for your feedback.
>
> BTW, did you see "[PATCH] input: adxl34x: Add OF match support"
> (http://www.spinics.net/lists/linux-i2c/msg18107.html)?

Yes, I have already seen it. Thanks for you time.

Regards,

Walter
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/input/adxl34x.txt b/Documentation/devicetree/bindings/input/adxl34x.txt
new file mode 100644
index 0000000..0774f7e
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/adxl34x.txt
@@ -0,0 +1,53 @@ 
+Device Tree bindings for adxl34x digital accelerometer, both spi and i2c.
+
+Depending on the interface this node should be a child of a spi or i2c bus.
+
+Required properties:
+- compatible: "adxl34x"
+- reg: SPI/I2C device address
+- interrupt-parent: a phandle for the interrupt controller
+- interrupts: interrupt to which the chip is connected
+
+Optional parameters:
+Please refer to include/linux/input/adxl34x.h for specific info. If the value
+is not specified the driver will use its default.
+
+- adi,tap-axis-control: u8 default 0
+- adi,tap-threshold: u8 default 35
+- adi,tap-duration: u8 default 3
+- adi,tap-latency: u8 default 20
+- adi,tap-window: u8 default 20
+- adi,act-axis-control: u8 default 0xFF
+- adi,activity-threshold: u8 default 6
+- adi,inactivity-threshold: u8 default 4
+- adi,inactivity-time: u8 default 3
+- adi,free-fall-threshold: u8 default 8
+- adi,free-fall-time: u8 default 20
+- adi,data-rate: u8 default 8
+- adi,data-range: u8 default 4
+- adi,low-power-mode: u8 defaut 0
+- adi,power-mode: u8 default 0x30
+- adi,fifo-mode: u8 default 2
+- adi,watermark: u8 default 0
+- adi,use-int2: u8
+- adi,orientation-enable: u8 default 0
+- adi,deadzone-angle: u8 default 0
+- divisor-length: u8 default 0
+
+Example
+
+&i2c1 {
+	status = "okay";
+
+	accel1: accelerometer@53 {
+		compatible = "adxl34x";
+		reg = <0x53>;
+
+		interrupt-parent = <&portc>;
+		interrupts = <3 2>;
+
+		adi,inactivity-time = /bits/ 8 <6>;
+		adi,data-range = /bits/ 8 <1>;
+	};
+};
+