From patchwork Tue Jan 26 09:50:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 370588 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp4802191jam; Tue, 26 Jan 2021 01:51:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxooe3SQgJDg7uCCSR7EE8kUKG0UkMEYKeBj7n7OiNVNRreqb2oGXlKTZ/eehJG4pBDDObf X-Received: by 2002:aa7:d148:: with SMTP id r8mr3894782edo.127.1611654700695; Tue, 26 Jan 2021 01:51:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611654700; cv=none; d=google.com; s=arc-20160816; b=CW/D49HSbsBSEo7DhDVkYr37CVu+lzSE/+KGWggh+kUmspCEuDY0AgtYswZ/O4OcVP SFPrN9OHmyD3WKOQOkvqqf5RB76/qa2yMKOlR66fnJjKDy+PEmI4sYkdWgm6TUXXsmNx M3G02+cOYgvwgTrPlAueLP1xIJij8tIzOCj5szbV/0zAni1W3Hj2Zk7tI4Fg0S75dpUN ZjXAP/d0AyYS69eaV64bMBEzmtzsMq82/l/bU943jTxluKug9eoDV7el9PiO2n0ipOpb 82zPYw4hRkx7BEb1AEAncFu7JZby/+oIb79f9gGlRjUcGA+ihyqNNmoLBMmu93Ox0hNN XKfA== 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=uorCwXOMIezDRs8xJlJ1ODAOP7QSWfnCRowti/qHHig=; b=InrABS1HAUgNMkNxsxoDVB6ExiI3ooHuBr9021NAJqzaiAZ0tysCH84v137EK00U57 OgoysKWzr79pxZgTzqAkObUmdDH7hEwioteXp5LglVgsRUPHPKoYGxA+TSzkmE0idEzE 9cG5VMJCFYH996qL80Jvb0AXqMWnY6DpZh0oi8SYybRH4/GE8vRviLr49CRKaezmsXJV 2D4+5NIZhIPtApcdUwW8wxW8jugnT4vD1YVKm4maT//e7YKaD6ajy9QdeCUfqKcp54vi FFoStGMtBreUceXZziEXS9TSk/O4D0CB9z0xdCGPhnAqwlyZ3Fl0VAJK+qDwdHPvfZIB A7Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=egxMdTq3; 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 m24si521547ejg.728.2021.01.26.01.51.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jan 2021 01:51:40 -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=egxMdTq3; 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 165D6825BF; Tue, 26 Jan 2021 10:51:38 +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="egxMdTq3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 47821825F4; Tue, 26 Jan 2021 10:51:20 +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.3 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 mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 75C2C825A6 for ; Tue, 26 Jan 2021 10:51:13 +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 eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20210126095113euoutp01b0ad979167e7a14b566282a6296ec33f~dv2LdTGpa0650406504euoutp01K for ; Tue, 26 Jan 2021 09:51:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20210126095113euoutp01b0ad979167e7a14b566282a6296ec33f~dv2LdTGpa0650406504euoutp01K DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1611654673; bh=uorCwXOMIezDRs8xJlJ1ODAOP7QSWfnCRowti/qHHig=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=egxMdTq3Q548chha8CvAeoYnid8egnYOcnLMm1HLclsBhREXzcuf9A26fJbQBVACR cbtk5Rd0lHVkc+zRnuT0OapV6Z9giwPYYKAR8hxfOGSgjx57jkQGM8jw1SZ5+tEa1s 5/u9Da2HKzL0yR72qIQzYnZmLLPpjikgKD8xk20Y= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20210126095112eucas1p1edfcfd59e637aed8e3ea4678b326102b~dv2LKNzxx2162521625eucas1p1v; Tue, 26 Jan 2021 09:51:12 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id C2.4A.27958.016EF006; Tue, 26 Jan 2021 09:51:12 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20210126095112eucas1p2d9c00a9d509ac482a08dca1cf35b22de~dv2KxGG3n2177721777eucas1p29; Tue, 26 Jan 2021 09:51:12 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210126095112eusmtrp2707bdf978060ef097e51ee4727196c16~dv2Kqyoxe0402704027eusmtrp25; Tue, 26 Jan 2021 09:51:12 +0000 (GMT) X-AuditID: cbfec7f2-f15ff70000006d36-99-600fe610aeb6 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 69.E7.16282.F06EF006; Tue, 26 Jan 2021 09:51:11 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210126095111eusmtip2ed63176a3c47e7437ee63112891761fa~dv2KHSSI10094400944eusmtip26; Tue, 26 Jan 2021 09:51:11 +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 v5 1/4] dt-bindings: input: adc-keys bindings documentation Date: Tue, 26 Jan 2021 10:50:33 +0100 Message-Id: <20210126095036.6429-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210126095036.6429-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmleLIzCtJLcpLzFFi42LZduzneV2BZ/wJBpNPKFpsnLGe1eLGrzZW i+fvLjNZrD1yl93iUF+0RcdhZYtvW7YxWkya8IvN4u3eTnaLw1M/MDpweby/0cruMbvhIovH vFknWDw+fIzzmN/5ncnj7J0djB59W1YxemxcdoA5gCOKyyYlNSezLLVI3y6BK+PYhBlMBavE KhbeOM/awLhSqIuRg0NCwERi6zefLkYuDiGBFYwSvzd/ZoJwvjBKbJ+wih3C+cwo8X7bGcYu Rk6wjpkbjjJCJJYzSvxq/MAI1/Lw2R2wKjYBQ4mut11sILaIgJHEpaYdLCBFzAJ3mCS6Jjew gCSEBbwl9v2byQRiswioSty92Qdm8wrYSExc9JIVYp28xOoNB5hBbE4BW4lFt1cwgwySEDjA IXHm3DcmiCIXiZ9nzkM1CEu8Or6FHcKWkfi/cz4TREMz0Hnn1rJDOD2MEpebZkB9ZC1x59wv NlB4MAtoSqzfpQ8JGkeJ3hYLCJNP4sZbQZBiZiBz0rbpzBBhXomONiGIGWoSs46vg9t68MIl ZgjbQ6Lj4gRWSABNYJRYd7aLeQKj/CyEXQsYGVcxiqeWFuempxYb5qWW6xUn5haX5qXrJefn bmIEppfT/45/2sE499VHvUOMTByMhxglOJiVRHh36/EkCPGmJFZWpRblxxeV5qQWH2KU5mBR EuddNXtNvJBAemJJanZqakFqEUyWiYNTqoGJQyZx4kbd/dmaBs/Ob9/FdqjfrlXXxH7KrI7q vORFjj7lTenfBZd+7TDev/nyU07zmoTA5q8JAVP2r5SPKHjH6jW5eWXQjWhbOfbtX3RDH6Sa pVx/o5C/xrfZiiPk6/fsiV5q27ZsL1uiI9ja6VW7IsThUwD/YoeDtb2KThxzT0tk72Yvbr9j fGBP+HPxmHPexXM7NzBNPK2QWrpbkPdJnmrp4buLM/eWnOD7d95F7rBzcbDpCpXpqedEv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vOj3tjo/pixQC49 MkAiZmnywl4p88Jizk7+TVtfpWxYvN036crSprY/QSd9jm8xmTbNz6verVKJpTgj0VCLuag4 EQDZGX9i/wIAAA== X-CMS-MailID: 20210126095112eucas1p2d9c00a9d509ac482a08dca1cf35b22de X-Msg-Generator: CA X-RootMTR: 20210126095112eucas1p2d9c00a9d509ac482a08dca1cf35b22de X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20210126095112eucas1p2d9c00a9d509ac482a08dca1cf35b22de References: <20210126095036.6429-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 --- 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 Reviewed-by: Simon Glass 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 | ++--------------------------------+------------------------+