From patchwork Thu Feb 11 08:47:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 380889 Delivered-To: patch@linaro.org Received: by 2002:a02:b18a:0:0:0:0:0 with SMTP id t10csp1884961jah; Thu, 11 Feb 2021 00:48:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqmZFDwMO4fJhpqzWmywsCv0aMNF543H5wmOTZL7SbE1Yyo6CGz8AIi8OU94i0F3/eKhhf X-Received: by 2002:a50:9f4e:: with SMTP id b72mr7544711edf.4.1613033310934; Thu, 11 Feb 2021 00:48:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613033310; cv=none; d=google.com; s=arc-20160816; b=lzBoAvyNOzao3sMp3SmQaZJB+L454riI3Woqp/cG9pwQLw9/CP04AmlRO/ayAPCs1E qTr3Y5J4thzLvggR+VeT24lA/PM+qiDEVTK8B3aTdnMtyqR/Kq2hf8xnNMdmI129DPzE TSzebhGIYMYgTRWoAu6evRyspV3zocuzfN5WcZQm9imGEBH9mp3fRB7aHC0BY6q1PL4X 2uEaMqoLfa3yph7gUFJntlP6tJugC9cqaLFtTp1S8bWFBRlL015Q8/N5O9DcW2uDosCz Odd3cA+aWo+jF1R9a365hKr3KygRvx3hwL8zr+ISK4Y0FmlEMbwO5bNe7uGCvtQDNIj0 nXUg== 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=C/lhj7YoRXqcpQB7hy7/hluS936VzPFeq8TXI4Opfe4SGnffKVoFSXYcmAKhsAtUo2 PT3yFVIC9R+CGaozq1L+IEKjTAStOlqYOgZuJcoIjOlbt32MzMaRxsYWRX9B7u97BPu8 CnRnV45FgPp5kA678UJyUZe9QFZJqXrsJxnj7oehCQnc3TwxBJd3cBXpn5O/dOjbUde2 pJNZUyMKZmLFDuIkA9m3RpA6MTKKWLmsl8jYsPPf/KFwg5FmGIRxR3BVt0MaOfzsph7k KLmoyxpxKdWpKyuc2Qc2Gxd17QFfS8dj9OeYW8xcfvzMeHKID9LKVFBoyloTabfN/8rF Nx7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="po5sE1V/"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id x22si3443632edl.456.2021.02.11.00.48.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 00:48:30 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="po5sE1V/"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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 3EBEF8268C; Thu, 11 Feb 2021 09:48:16 +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="po5sE1V/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A4A2582673; Thu, 11 Feb 2021 09:48:11 +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=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI, 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 1BB0E82657 for ; Thu, 11 Feb 2021 09:48:07 +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 20210211084806euoutp024ef157cdafbd1a8c230087796eb5ecfc~ipTpBqfrC2291222912euoutp02t for ; Thu, 11 Feb 2021 08:48:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20210211084806euoutp024ef157cdafbd1a8c230087796eb5ecfc~ipTpBqfrC2291222912euoutp02t DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1613033286; bh=D47RA9MzNM4nc/l88JXosw7tAT3dRhcZFuVE29Hw6E8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=po5sE1V/BV9J2jdxthBk9MLf/AEDiBWuLq6l4RWI+7ZUQ6bcHZp2ZRni/rT4dHoBS AiBhBkoepDRjA/bXwCLA0xpveV3ETRP99lJwE+cRmXBAFTogfAHceq9QN6rsct2Oqc aOW2atL/z1h4050njfjgG9nORLM5BER46vWG1tUU= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20210211084805eucas1p2c061749e5a9fc2065b905c968a9e9405~ipTolNOyV1135811358eucas1p2g; Thu, 11 Feb 2021 08:48:05 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 3D.94.45488.54FE4206; Thu, 11 Feb 2021 08:48:05 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20210211084805eucas1p2a9c601311c97458a3435e3fec49e331b~ipToNIGIr1359613596eucas1p2O; Thu, 11 Feb 2021 08:48:05 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210211084805eusmtrp1c6e9bb6e4dfc578a887a2c9701d1ad77~ipToMePM83224632246eusmtrp1T; Thu, 11 Feb 2021 08:48:05 +0000 (GMT) X-AuditID: cbfec7f5-c5fff7000000b1b0-84-6024ef451e6f Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id BD.56.16282.54FE4206; Thu, 11 Feb 2021 08:48:05 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20210211084804eusmtip13d652f7f21a298564ed7b18c6e190630~ipTnugX5M2072020720eusmtip1s; Thu, 11 Feb 2021 08:48:04 +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 v6 1/5] dt-bindings: input: adc-keys bindings documentation Date: Thu, 11 Feb 2021 09:47:53 +0100 Message-Id: <20210211084757.22759-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210211084757.22759-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphleLIzCtJLcpLzFFi42LZduzneV3X9yoJBs+mq1hsnLGe1eLGrzZW i+fvLjNZrD1yl93iUF+0RcdhZYtvW7YxWkya8IvN4u3eTnaLw1M/MDpweby/0cruMbvhIovH vFknWDw+fIzzmN/5ncnj7J0djB59W1YxemxcdoA5gCOKyyYlNSezLLVI3y6BK6Nt63v2guti Fa8ezWVrYLwo1MXIySEhYCJx49pipi5GLg4hgRWMEhu/PGOFcL4wSky6ewQq85lRYu+5R8ww LVd6lrNBJJYzSmx6eJodrmXf+h9MIFVsAoYSXW+72EBsEQEjiUtNO1hAipgF7jBJdE1uYAFJ CAt4S/SfmsMOYrMIqEpcWHoOrIFXwFZi8+RpLBDr5CVWbzgAtppTwE5i3547YAdKCBzgkLh6 /gITRJGLxMfF/9khbGGJV8e3QNkyEqcn97BANDQzSjw8t5YdwulhlLjcNIMRospa4s65X0Cr OYDu05RYv0sfIuwosax9DzNIWEKAT+LGW0GQMDOQOWnbdKgwr0RHGzQk1SRmHV8Ht/bghUvQ 4PKQmLr5LlhcSGAio8Tcg9UTGOVnIexawMi4ilE8tbQ4Nz212DgvtVyvODG3uDQvXS85P3cT IzDBnP53/OsOxhWvPuodYmTiYDzEKMHBrCTCy9+qkiDEm5JYWZValB9fVJqTWnyIUZqDRUmc d9fWNfFCAumJJanZqakFqUUwWSYOTqkGppbviearuHbxuZ27L6fMe2KFjlTSi+4L4Y9fp607 VNLUkfaoir17Je9hif6Jf5ZZ1fq5yHuctjrx9OSNLW87fszOnHnF7/HsDWJb4hxPsxburL0c XKqUrGi7/tDMlfGf30z12f2xlnem6S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7Jt8ihM//XzD/oMuXGwdsW9qUhYWvruLbMvfbTOeFwXLXPGKUmz+H2ruf SQv+w6/aq77GNeNvzUFb38S0DKPknl/frjw1nGSkdi3OyEFfa9bUhNrEH/mfVism7fsW92qu xLxzmh2pld/cTd+XlnYwLtLKe8nXWPEq/X91830Tz3tKKTO3/pwjfMav95ESS3FGoqEWc1Fx IgCiwpcKAAMAAA== X-CMS-MailID: 20210211084805eucas1p2a9c601311c97458a3435e3fec49e331b X-Msg-Generator: CA X-RootMTR: 20210211084805eucas1p2a9c601311c97458a3435e3fec49e331b X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20210211084805eucas1p2a9c601311c97458a3435e3fec49e331b References: <20210211084757.22759-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 | ++--------------------------------+------------------------+