From patchwork Tue Mar 27 12:32:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 10309873 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 2C9F760212 for ; Tue, 27 Mar 2018 12:37:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A3EA299F5 for ; Tue, 27 Mar 2018 12:37:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E7FF299F7; Tue, 27 Mar 2018 12:37:33 +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 65F9F29A05 for ; Tue, 27 Mar 2018 12:37:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752147AbeC0Mex (ORCPT ); Tue, 27 Mar 2018 08:34:53 -0400 Received: from esa1.microchip.iphmx.com ([68.232.147.91]:53948 "EHLO esa1.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751349AbeC0Mev (ORCPT ); Tue, 27 Mar 2018 08:34:51 -0400 X-IronPort-AV: E=Sophos;i="5.48,367,1517900400"; d="scan'208";a="13309089" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Mar 2018 05:34:50 -0700 Received: from eh-station.microchip.com (10.10.76.4) by chn-sv-exch02.mchp-main.com (10.10.76.38) with Microsoft SMTP Server id 14.3.352.0; Tue, 27 Mar 2018 05:34:48 -0700 From: Eugen Hristev To: , , , , , , , , , CC: Eugen Hristev Subject: [PATCH v2 03/10] dt-bindings: input: touchscreen: touch_adc: create bindings Date: Tue, 27 Mar 2018 15:32:36 +0300 Message-ID: <1522153963-1121-4-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522153963-1121-1-git-send-email-eugen.hristev@microchip.com> References: <1522153963-1121-1-git-send-email-eugen.hristev@microchip.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 Added bindings for generic resistive touchscreen ADC. Signed-off-by: Eugen Hristev --- Changes in v2: - modified bindings to have a generic resistive touchscreen adc driver instead of specific architecture one. .../bindings/input/touchscreen/touch_adc.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/touch_adc.txt diff --git a/Documentation/devicetree/bindings/input/touchscreen/touch_adc.txt b/Documentation/devicetree/bindings/input/touchscreen/touch_adc.txt new file mode 100644 index 0000000..27abcdc --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/touch_adc.txt @@ -0,0 +1,33 @@ +Generic resistive touchscreen ADC + +Required properties: + + - compatible: must be "generic-resistive-adc-touch" +The device must be connected to an IIO device that provides channels for +position measurement and optional pressure. +Refer to ../iio/iio-bindings.txt for details + - iio-channels: must have at least two channels connected to an IIO device. +These should correspond to the channels exposed by the IIO device and should +have the right index as the IIO device registers them. These channels +represent the relative position on the "x" and "y" axes. + - iio-channel-names: must have all the channels' names. Mandatory channels +are "x" and "y". + +Optional properties: + - iio-channels: The third channel named "pressure" is optional and can be +used if the IIO device also measures pressure besides position. +If this channel is missing, pressure will be ignored and the touchscreen +will only report position. + - iio-channel-names: optional channel named "pressure". + - generic-resistive-adc-touch,pressure-threshold: a pressure threshold for +the touchscreen, if we are using the "pressure" channel as well. +Represented by an integer value. + +Example: + + resistive_touch: resistive_touch { + compatible = "generic-resistive-adc-touch"; + generic-resistive-adc-touch,pressure-threshold = <10000>; + io-channels = <&adc 24>, <&adc 25>, <&adc 26>; + io-channel-names = "x", "y", "pressure"; + };