From patchwork Tue Nov 6 16:41:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Schenker X-Patchwork-Id: 10670859 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 52D1D109C for ; Tue, 6 Nov 2018 17:06:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 400802A9CB for ; Tue, 6 Nov 2018 17:06:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 33A232A9D0; Tue, 6 Nov 2018 17:06:50 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham 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 652812A9CF for ; Tue, 6 Nov 2018 17:06:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389199AbeKGCc6 (ORCPT ); Tue, 6 Nov 2018 21:32:58 -0500 Received: from mxout017.mail.hostpoint.ch ([217.26.49.177]:36290 "EHLO mxout017.mail.hostpoint.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389406AbeKGCc5 (ORCPT ); Tue, 6 Nov 2018 21:32:57 -0500 Received: from [10.0.2.46] (helo=asmtp013.mail.hostpoint.ch) by mxout017.mail.hostpoint.ch with esmtp (Exim 4.91 (FreeBSD)) (envelope-from ) id 1gK4Q4-000AXR-Ny; Tue, 06 Nov 2018 17:41:36 +0100 Received: from [46.140.72.82] (helo=philippe-pc.toradex.int) by asmtp013.mail.hostpoint.ch with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91 (FreeBSD)) (envelope-from ) id 1gK4Q4-000HMO-Ja; Tue, 06 Nov 2018 17:41:36 +0100 X-Authenticated-Sender-Id: dev@pschenker.ch From: Philippe Schenker To: Jonathan Cameron , linux-iio@vger.kernel.org Cc: Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Marcel Ziswiler , Stefan Agner , Max Krummenacher , Philippe Schenker Subject: [PATCH 2/3] iio: adc: add STMPE ADC devicetree bindings Date: Tue, 6 Nov 2018 17:41:15 +0100 Message-Id: <20181106164116.6299-2-dev@pschenker.ch> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181106164116.6299-1-dev@pschenker.ch> References: <20181106164116.6299-1-dev@pschenker.ch> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Stefan Agner This adds the devicetree bindings for the STMPE ADC. Signed-off-by: Stefan Agner Signed-off-by: Max Krummenacher Signed-off-by: Philippe Schenker --- .../devicetree/bindings/iio/adc/stmpe-adc.txt | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/stmpe-adc.txt diff --git a/Documentation/devicetree/bindings/iio/adc/stmpe-adc.txt b/Documentation/devicetree/bindings/iio/adc/stmpe-adc.txt new file mode 100644 index 000000000000..752ef35a794d --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/stmpe-adc.txt @@ -0,0 +1,34 @@ +STMPE ADC driver +---------------- + +Required properties: + - compatible: "st,stmpe-adc" + +Optional properties: +Note that the ADC is shared with the STMPE touchscreen, so if using both the +settings should be the same. +If the settings are not the same, the settings of the driver initialized last +will be active. +- st,sample-time: ADC conversion time in number of clock. (0 -> 36 clocks, + 1 -> 44 clocks, 2 -> 56 clocks, 3 -> 64 clocks, 4 -> 80 clocks, + 5 -> 96 clocks, 6 -> 144 clocks), recommended is 4. +- st,mod-12b: ADC Bit mode (0 -> 10bit ADC, 1 -> 12bit ADC) +- st,ref-sel: ADC reference source (0 -> internal reference, 1 -> external + reference) +- st,adc-freq: ADC Clock speed (0 -> 1.625 MHz, 1 -> 3.25 MHz, 2 || 3 -> 6.5 MHz) +- st,norequest-mask: bitmask specifying which ADC channels should _not_ be + requestable due to different usage (e.g. touch) + +Node name must be stmpe_adc and should be child node of stmpe node to +which it belongs. + +Example: + + stmpe_adc { + compatible = "st,stmpe-adc"; + st,sample-time = <4>; + st,mod-12b = <1>; + st,ref-sel = <0>; + st,adc-freq = <1>; + st,norequest-mask = <0x0F>; /* dont use ADC CH3-0 */ + };