From patchwork Sat Mar 28 00:43:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Bresticker X-Patchwork-Id: 455606 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 7457814012C for ; Sat, 28 Mar 2015 11:43:24 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752684AbbC1AnX (ORCPT ); Fri, 27 Mar 2015 20:43:23 -0400 Received: from mail-oi0-f74.google.com ([209.85.218.74]:33057 "EHLO mail-oi0-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752509AbbC1AnW (ORCPT ); Fri, 27 Mar 2015 20:43:22 -0400 Received: by oiax69 with SMTP id x69so285075oia.0 for ; Fri, 27 Mar 2015 17:43:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=LYoVn3CoMjro7Zq4PoF2kqDhaNdmATt2C1L4lEHIMv0=; b=HF5rVPWVNTYnvPxlUDzutKt1cV9KXPbD42vsdxWAJlX9dewN2ZK1YSJHVFXKlLG6ef ufPEqz69JX2J4NpQRhm3wsjqIyu6DzqUTk73gX4w8pQTwVeNS3GuYlp7cogZQwXY9ISn 49k84ijJlpVl9bpX0K1LQOGMb+kB8eZw2+Rn2BQ7CjMQUlBDIPnfzdhdNmJzcKMv+k+t W1t/puIFmLThi1GjNtQIJixkToDXGxS4mLBC415jftuuboglSriAo0WZdfAnqPIlzVRz iJzuePDexTaDrO2uVxZ9oJHgL/Mhuw9BYGucB3+7oREpFGCBCri9Z33EvKX7UEx7m6aE f5RA== X-Gm-Message-State: ALoCoQnZ2F42SQnvFdfw1s8/AmKe/U194bErlyKuvDXRUnBjLandUJ/tQPL9+ZLQe+gUd6D4DmCu X-Received: by 10.182.246.67 with SMTP id xu3mr25988001obc.18.1427503401403; Fri, 27 Mar 2015 17:43:21 -0700 (PDT) Received: from corpmail-nozzle1-1.hot.corp.google.com ([100.108.1.104]) by gmr-mx.google.com with ESMTPS id e5si632012qcg.1.2015.03.27.17.43.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Mar 2015 17:43:21 -0700 (PDT) Received: from abrestic.mtv.corp.google.com ([172.22.65.70]) by corpmail-nozzle1-1.hot.corp.google.com with ESMTP id sCOWvpiX.1; Fri, 27 Mar 2015 17:43:21 -0700 Received: by abrestic.mtv.corp.google.com (Postfix, from userid 137652) id E3560221135; Fri, 27 Mar 2015 17:43:19 -0700 (PDT) From: Andrew Bresticker To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Bresticker , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala Subject: [PATCH 1/2] Input: Add binding document for a generic ADC keypad Date: Fri, 27 Mar 2015 17:43:17 -0700 Message-Id: <1427503398-19682-1-git-send-email-abrestic@chromium.org> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add a binding document for a generic ADC keypad. Buttons on an ADC keypad are connected in a resistor ladder to an ADC. The binding describes the mapping of ADC channel and voltage ranges to buttons. Signed-off-by: Andrew Bresticker Cc: Rob Herring Cc: Pawel Moll Cc: Mark Rutland Cc: Ian Campbell Cc: Kumar Gala --- .../devicetree/bindings/input/adc-keys.txt | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/adc-keys.txt diff --git a/Documentation/devicetree/bindings/input/adc-keys.txt b/Documentation/devicetree/bindings/input/adc-keys.txt new file mode 100644 index 0000000..c9a57de --- /dev/null +++ b/Documentation/devicetree/bindings/input/adc-keys.txt @@ -0,0 +1,43 @@ +Generic ADC keypad +================== + +Required properties: + - compatible: "adc-keys" + - poll-interval: Polling interval time in ms. + - io-channels: List of IIO channels used by the keypad. + See ../iio/iio-bindings.txt for details. + +Optional properties: + - autorepeat: Enable auto-repeat. + +Each button on the ADC keypad is represented by a sub-node. + +Required sub-node properties: + - label: Descriptive name for the key. + - linux,code: Keycode to emit. + - channel: IIO channel (index into the 'io-channels' above) to which this + button is attached. + - min-voltage: Minimum voltage in uV when this key is pressed. + - max-voltage: Maximum voltage in uV when this key is pressed. + +Optional sub-node properties: + - linux,input-type: Event type this key generates. Defaults to 1 (EV_KEY) if + not specified. + +Example: + +adc-keypad { + compatible = "adc-keys"; + poll-interval = <100>; + io-channels = <&adc 0>, <&adc 1>; + + vol-up-button { + label = "Volume Up"; + linux,code = ; + channel = <0>; + min-voltage = <1600000>; + max-voltage = <1640000>; + }; + + ... +};