From patchwork Mon May 29 14:45:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mylene JOSSERAND X-Patchwork-Id: 9753309 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2448A602B1 for ; Mon, 29 May 2017 14:46:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1305624B5B for ; Mon, 29 May 2017 14:46:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07DB427E71; Mon, 29 May 2017 14:46:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F112F2818A for ; Mon, 29 May 2017 14:46:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751263AbdE2OqT (ORCPT ); Mon, 29 May 2017 10:46:19 -0400 Received: from mail.free-electrons.com ([62.4.15.54]:59460 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751159AbdE2OqQ (ORCPT ); Mon, 29 May 2017 10:46:16 -0400 Received: by mail.free-electrons.com (Postfix, from userid 110) id 7BA8F20EC3; Mon, 29 May 2017 16:46:04 +0200 (CEST) Received: from dell-desktop.lan (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 3903F2081C; Mon, 29 May 2017 16:45:54 +0200 (CEST) From: =?UTF-8?q?Myl=C3=A8ne=20Josserand?= To: dmitry.torokhov@gmail.com, fery@cypress.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org, mylene.josserand@free-electrons.com, thomas.petazzoni@free-electrons.com, maxime.ripard@free-electrons.com Subject: [PATCH 2/2] Documentation: DT: bindings: input: Add documentation for cyttsp5 Date: Mon, 29 May 2017 16:45:38 +0200 Message-Id: <20170529144538.29187-3-mylene.josserand@free-electrons.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170529144538.29187-1-mylene.josserand@free-electrons.com> References: <20170529144538.29187-1-mylene.josserand@free-electrons.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the Cypress TrueTouch Generation 5 touchscreen device tree bindings documentation. It can use I2C or SPI bus. This touchscreen can handle some defined zone that are designed and sent as button. To be able to customize the keycode sent, the "linux,code" property in a "button" sub-node can be used. Signed-off-by: Mylène Josserand --- .../bindings/input/touchscreen/cyttsp5.txt | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/cyttsp5.txt diff --git a/Documentation/devicetree/bindings/input/touchscreen/cyttsp5.txt b/Documentation/devicetree/bindings/input/touchscreen/cyttsp5.txt new file mode 100644 index 000000000000..713a377b5039 --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/cyttsp5.txt @@ -0,0 +1,55 @@ +* Cypress cyttsp touchscreen controller, generation 5 + +Required properties: + - compatible : must be "cypress,cyttsp5" + - reg : Device I2C address or SPI chip select number + - interrupt-parent : the phandle for the gpio controller + (see interrupt binding[0]). + - interrupts : (gpio) interrupt to which the chip is connected + (see interrupt binding[0]). + +Optional properties (many of them coming from touchscreen binding[1]): + - reset-gpios : the reset gpio the chip is connected to + (see GPIO binding[2] for more details). + - touchscreen-size-x : horizontal resolution of touchscreen (in pixels) + - touchscreen-size-y : vertical resolution of touchscreen (in pixels) + - touchscreen-fuzz-x : horizontal noise value of the absolute input device + (in pixels) + - touchscreen-fuzz-y : vertical noise value of the absolute input device + (in pixels) + +This touchscreen can handle some buttons that are touchscreen's defined zones. +Each button's event can be customized using a sub-node properties: + - linux,code: Keycode to emit. + +[0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt +[1]: Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt +[2]: Documentation/devicetree/bindings/gpio/gpio.txt + +Example: +&i2c0 { + [...] + + tsc@24 { + compatible = "cypress,cyttsp5"; + reg = <0x24>; + + pinctrl-names = "default"; + pinctrl-0 = <&tp_reset_ds203>; + interrupt-parent = <&pio>; + interrupts = <1 5 IRQ_TYPE_LEVEL_LOW>; + reset-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; + + button@0 { + linux,code = ; + }; + + button@1 { + linux,code = ; + }; + + button@2 { + linux,code = ; + }; + }; +};