From patchwork Thu Feb 18 10:33:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 384388 Delivered-To: patch@linaro.org Received: by 2002:a02:c80e:0:0:0:0:0 with SMTP id p14csp3559572jao; Thu, 18 Feb 2021 02:34:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdWJevfJMM2InTeXwX0IPUJG3nOPQmI5Yla9ZKytBKClr+wj4qfNoQpwxItUfk/oIsxZ7/ X-Received: by 2002:a17:906:6095:: with SMTP id t21mr3367834ejj.384.1613644498165; Thu, 18 Feb 2021 02:34:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613644498; cv=none; d=google.com; s=arc-20160816; b=SZcCvhw+UX6jKBdI/m1sjumOF4MRkoMwqPtgcFPxIRjMG0PyCsWnB3wH0eEf8vEX1p hMJCVJrbJ/IrvYEErq/FaO3r4ZD4vFjscDf5TOz9ky22Lpi9+wi2RQgkZyaPG+Cq+e5s kBtXbpj8J7ftHa/PyJ2qHAzt8cq9P6D5/R6/V9d+pDxOUC9WIoEB0vLMYj2Y34XpLteA 6eAgpcvqTULxF1z7Z0JaMtPapbLsRn9LI7mZVwZTIrJkn/69kOJm4sruTNTzTkFxnV/m XNeZQxqdFTWexydYIf3Ux7iLOV4wUojopuUK7QV8GPSifLHAPtFGwSOvNo4CUL1d3gtz 3JDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=D47RA9MzNM4nc/l88JXosw7tAT3dRhcZFuVE29Hw6E8=; b=wfA2z/C+GCh1PKZrNawax9HfDxInv/dYbcWz4VS5XWkLkXQB6Aa6FZOHHpHBuD9lFD TJwJQOeSmw7ceWvTOeqTqMntap7R4cqLGMZzTH39nbEC92UlESRC5ZjgJzC1yFOnqYir cyL6hls2LydvsFai3yMmy3Hs/Nmg7J4WT5n1A/rsgjChGe34VSD/AQshcMctlbHSYZ2q pJJG7A6mANP3K3aYf1efOHe5cTjEITb8kQ+IO+wUtcqygdNBJwt+GN6Z0e52nNi3nhC8 7b5FkqbX9MjWlcP6DcR8xZ+5VLB/MPlDOe+x8RHLwt560B+6zEPzcF/FzycePOVl8xmx DZcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=cvEo7On8; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id u5si2709722edy.35.2021.02.18.02.34.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 02:34:58 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=cvEo7On8; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 49ED08276E; Thu, 18 Feb 2021 11:34:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=samsung.com header.i=@samsung.com header.b="cvEo7On8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B5762826FB; Thu, 18 Feb 2021 11:33:55 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id F140C82656 for ; Thu, 18 Feb 2021 11:33:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=m.szyprowski@samsung.com Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20210218103329euoutp02555f6968f2312d5c4c5671a925f63946~k0QphuUb92955829558euoutp02f for ; Thu, 18 Feb 2021 10:33:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20210218103329euoutp02555f6968f2312d5c4c5671a925f63946~k0QphuUb92955829558euoutp02f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1613644409; bh=D47RA9MzNM4nc/l88JXosw7tAT3dRhcZFuVE29Hw6E8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cvEo7On8IkdXQDdOySXe22VXTYSUi5Mjetd1c5cuosNMR5cv85GieHv0Cj+xMs2lc OQ1KXlzuh0XdFk3428jJ1TSlfB7mVpHsNrbytxKL8Z8WMCpKgyG/2FRWrx8P4FkFST 6gsvDIRW7ohQpluzeiOSYadDFFjL+A1bw6Dnh6xo= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20210218103328eucas1p2a47ecc6c0f9325e640e3110ae9c93ef5~k0QpFlKEh0858108581eucas1p2F; Thu, 18 Feb 2021 10:33:28 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id D3.F7.44805.8724E206; Thu, 18 Feb 2021 10:33:28 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20210218103328eucas1p1f19a277901e86fd56c4c336fc9f861b5~k0Qoqbmgu2292022920eucas1p1I; Thu, 18 Feb 2021 10:33:28 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210218103328eusmtrp22f067b186594e227e58e124dad5570ee~k0QopkH3X2025120251eusmtrp2m; Thu, 18 Feb 2021 10:33:28 +0000 (GMT) X-AuditID: cbfec7f4-b4fff7000000af05-0f-602e4278e54d Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 36.56.16282.7724E206; Thu, 18 Feb 2021 10:33:27 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210218103327eusmtip29b2391a927e638d193494ed5ca364b58~k0QoKEj982851728517eusmtip2f; Thu, 18 Feb 2021 10:33:27 +0000 (GMT) From: Marek Szyprowski To: u-boot@lists.denx.de, u-boot-amlogic@groups.io Cc: Marek Szyprowski , Neil Armstrong , Lukasz Majewski , Philippe Reynes , Simon Glass , Heinrich Schuchardt , Jaehoon Chung , Bartlomiej Zolnierkiewicz Subject: [PATCH v7 1/5] dt-bindings: input: adc-keys bindings documentation Date: Thu, 18 Feb 2021 11:33:14 +0100 Message-Id: <20210218103318.18915-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210218103318.18915-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmleLIzCtJLcpLzFFi42LZduzned0KJ70Eg30bJSw2zljPanHjVxur xfN3l5ks1h65y25xqC/aouOwssW3LdsYLSZN+MVm8XZvJ7vF4akfGB24PN7faGX3mN1wkcVj 3qwTLB4fPsZ5zO/8zuRx9s4ORo++LasYPTYuO8AcwBHFZZOSmpNZllqkb5fAldG29T17wXWx ileP5rI1MF4U6mLk5JAQMJGYNe0bexcjF4eQwApGibYDl1khnC+MEktXHIVyPjNK7Lt0mgmm pXXvNCaIxHJGiStt59jhWjZc6garYhMwlOh628UGYosIGElcatrBAlLELHCHSaJrcgMLSEJY wFvixueDYEUsAqoS3xf/AbN5BWwljnw/zA6xTl5i9YYDzCA2p4CdxJOz81kg4kc4JPpfm0LY LhIbZsyFqheWeHV8C5QtI/F/53ywUyUEmhklHp5byw7h9DBKXG6awQhRZS1x59wvoM0cQOdp SqzfpQ8RdpS4OO8GK0hYQoBP4sZbQZAwM5A5adt0Zogwr0RHGzQg1SRmHV8Ht/bghUvMELaH xNTbT8BOFhKYyCjx4XrBBEb5WQi7FjAyrmIUTy0tzk1PLTbKSy3XK07MLS7NS9dLzs/dxAhM L6f/Hf+yg3H5q496hxiZOBgPMUpwMCuJ8LJ/1koQ4k1JrKxKLcqPLyrNSS0+xCjNwaIkzpu0 ZU28kEB6YklqdmpqQWoRTJaJg1OqgYmv+fqS5c+MBbOWLxG7rnrk4vyAWxo55UvWK82TVtVo KfCzUNzn/PNBlMAG7Sd3Xu26cdzqsa71cc0L1V232+TCW+yfhr84e7jxYLbnzoqXEecPn1TQ 8wk/H2285t5yd4NHnEqLri1Z6SARIVtzM2Xt6VtRwstPC8473ZY+yYA9a4ZFg67Iui+vtOSP Xf/tX3+Hg+n6CZOkrWzztplZC3e3xTnyM20L2h/1a5lSyGOfH+LhV3XWeR+VZHolOL3iVv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TOAxP zJhZWFtq/Xvzk3ijoJCUzsoNnZ98A5zOfNS9NOXGXf5ov8zra90XJqfym/hsDldiKc5INNRi LipOBAARRSsVAAMAAA== X-CMS-MailID: 20210218103328eucas1p1f19a277901e86fd56c4c336fc9f861b5 X-Msg-Generator: CA X-RootMTR: 20210218103328eucas1p1f19a277901e86fd56c4c336fc9f861b5 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20210218103328eucas1p1f19a277901e86fd56c4c336fc9f861b5 References: <20210218103318.18915-1-m.szyprowski@samsung.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Dump adc-keys bindings documentation from Linux kernel source tree from commit 698dc0cf9447 ("dt-bindings: input: adc-keys: clarify description"). Signed-off-by: Marek Szyprowski Reviewed-by: Simon Glass --- doc/device-tree-bindings/input/adc-keys.txt | 67 +++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 doc/device-tree-bindings/input/adc-keys.txt -- 2.17.1 diff --git a/doc/device-tree-bindings/input/adc-keys.txt b/doc/device-tree-bindings/input/adc-keys.txt new file mode 100644 index 0000000000..6c8be6a9ac --- /dev/null +++ b/doc/device-tree-bindings/input/adc-keys.txt @@ -0,0 +1,67 @@ +ADC attached resistor ladder buttons +------------------------------------ + +Required properties: + - compatible: "adc-keys" + - io-channels: Phandle to an ADC channel + - io-channel-names = "buttons"; + - keyup-threshold-microvolt: Voltage above or equal to which all the keys are + considered up. + +Optional properties: + - poll-interval: Poll interval time in milliseconds + - autorepeat: Boolean, Enable auto repeat feature of Linux input + subsystem. + +Each button (key) is represented as a sub-node of "adc-keys": + +Required subnode-properties: + - label: Descriptive name of the key. + - linux,code: Keycode to emit. + - press-threshold-microvolt: voltage above or equal to which this key is + considered pressed. + +No two values of press-threshold-microvolt may be the same. +All values of press-threshold-microvolt must be less than +keyup-threshold-microvolt. + +Example: + +#include + + adc-keys { + compatible = "adc-keys"; + io-channels = <&lradc 0>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <2000000>; + + button-up { + label = "Volume Up"; + linux,code = ; + press-threshold-microvolt = <1500000>; + }; + + button-down { + label = "Volume Down"; + linux,code = ; + press-threshold-microvolt = <1000000>; + }; + + button-enter { + label = "Enter"; + linux,code = ; + press-threshold-microvolt = <500000>; + }; + }; + ++--------------------------------+------------------------+ +| 2.000.000 <= value | no key pressed | ++--------------------------------+------------------------+ +| 1.500.000 <= value < 2.000.000 | KEY_VOLUMEUP pressed | ++--------------------------------+------------------------+ +| 1.000.000 <= value < 1.500.000 | KEY_VOLUMEDOWN pressed | ++--------------------------------+------------------------+ +| 500.000 <= value < 1.000.000 | KEY_ENTER pressed | ++--------------------------------+------------------------+ +| value < 500.000 | no key pressed | ++--------------------------------+------------------------+