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 | ++--------------------------------+------------------------+ From patchwork Tue Jan 26 09:50:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 370591 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp4802590jam; Tue, 26 Jan 2021 01:52:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJx1+lc2SxM7erPHnwlUNiTk+e8wi0FAN1PhyFgqfZ7nMR6E4Pg69PZdvhOyRwRdnYCE55aV X-Received: by 2002:aa7:c399:: with SMTP id k25mr4015949edq.305.1611654740126; Tue, 26 Jan 2021 01:52:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611654740; cv=none; d=google.com; s=arc-20160816; b=edWSm1r8vQ1oAqaEhTJm/IkKSRSKR2WOIEG8+afUQN6xcH8/zdNbbw2CQcgRcQzPJJ DH9IFMr7YDAsuV3+XQlTN3u3D4ZyrXRrB0XBcHbgELm3XrCQsCPAkYhVTGH0jhO11Sqb +nMLGqSIYdr39YQcMOq4vedbyaeIcSWM0O3yOXCuuqyMrh1dLGS7HBkKw7E/9eQAC3SU i/ptM7zcRvDhUlGKFP5tB4zF3AhWIodE9sEnCV16TZ84yyAqPUIPATqONuLH2NlbZiXb BvpTh9zevsjsBKLZHRhGPAYP0pLwqJvmOOr7/UJC/HvidpaLg7uN6Cmrx+SMd2b4mxVe qQpA== 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=mSTenG0qvtejMC6XKx66WSlcX9pHGUqeB9GA4T22ZBc=; b=i1+b7P4wKFsWvzEBIgmmSlBLQ1HWP60Twj6UWhdjcA1uYqddtX5kEbWhOG9+W/0fVG Cy22jMzLgQlzCELg49mYx+ZziCP7cEn199NdN8HCP1jr/BJb9p/VCpmYHip4NIXx3qqT WrOYYOJZnBlchcbMb+j6jD4IVQbkfG7hk6mvH5g+GYMgtWw1EQszLsXG26vTX5V2UEtI eho1mAiFcMtsgnP6JD54xZB7I1XKxxCLuOhW9T6s3BwMf2Zp2TgfMnxZ4LPupVbIJoID YXLGQ8tlFeWzX8/SFQj150saF7YCOW0IGaqq7wvSRT2WIT5fR+wPX2JpM8Ecgy+aps69 7rfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=X2yD8rkc; 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 lk20si6917260ejb.599.2021.01.26.01.52.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jan 2021 01:52:20 -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=X2yD8rkc; 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 60E098268A; Tue, 26 Jan 2021 10:51:52 +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="X2yD8rkc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E69D8825A6; Tue, 26 Jan 2021 10:51:29 +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 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 00E2A825AE 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 mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20210126095113euoutp0297b168b2f9fc4701a3e71a8655d50616~dv2Lr38UV3275432754euoutp02M for ; Tue, 26 Jan 2021 09:51:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20210126095113euoutp0297b168b2f9fc4701a3e71a8655d50616~dv2Lr38UV3275432754euoutp02M DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1611654673; bh=mSTenG0qvtejMC6XKx66WSlcX9pHGUqeB9GA4T22ZBc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X2yD8rkcSVFyj7h4BRp+pnSjw1+mXCx4/GkP+AOaO0XqX2XgH/jzD2W3FqFTLUXl8 /z4E1kD9VK4bIwoIQ8Gym5Q0Adfxg/sM9J+V58Gk12Qp4vavFaxdnv9Sj2+JBvjjve 9p+QKE8xR35GEvdeakSzD/u9XsdNPYr3mRbk9tQ0= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20210126095112eucas1p118e15e52cbd9069b8737eedaba7d1271~dv2LYXIdi2162521625eucas1p1x; Tue, 26 Jan 2021 09:51:12 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 7B.D2.45488.016EF006; Tue, 26 Jan 2021 09:51:12 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20210126095112eucas1p1af8ac76eaede4baf2b0cfeac561a6a06~dv2LDq-li0290402904eucas1p1_; Tue, 26 Jan 2021 09:51:12 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210126095112eusmtrp1875eac55cc2d784a4852c61fb752ea13~dv2LC9wnK0825108251eusmtrp1E; Tue, 26 Jan 2021 09:51:12 +0000 (GMT) X-AuditID: cbfec7f5-c77ff7000000b1b0-6c-600fe6104365 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id FA.E7.16282.016EF006; Tue, 26 Jan 2021 09:51:12 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210126095112eusmtip2b7e44d96f9f4fdded388017f0f69fe0c~dv2KiNrCS0504205042eusmtip2G; 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 2/4] button: add a simple Analog to Digital Converter device based button driver Date: Tue, 26 Jan 2021 10:50:34 +0100 Message-Id: <20210126095036.6429-3-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: H4sIAAAAAAAAA0WSbUhTYRTHee69267La7dN8smK2crEqFnr7YImhVL3g5B96cME28iLSm7K rmYZxNJatWwso5Qt863UnHNaukzTdFZapjmLstSoEEVJs6yklZW328u33/9/zv85h8ODoxKT IBBP1qUzep0mRS4UY677X3vXkaML1esvVSupugKngBrwGgXU2NQThHLcHRZRbnMcdapjJfWl 3gWoPItXSE22nBZRHRemwXYx/X7ghIi2GTwYfdnahdHTH+LpotOzCN0z1Ahoc30VoOvK29BY XCWOSGBSkg8y+rBItTiptOSZIG1wzSHrsTxgANV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nU1Kak5mWWqRvl2CXsaihddYC25rVcxqnMTYwLhGqYuRk0NCwETi +flD7F2MXBxCAksZJRZdmMcOkZCRODmtgRXCFpb4c62LDaLoE6PE/IeH2UASbAKGEl1vu8Bs EaBJJ7susYIUMQs8YpJ42tUMNklYIFlixb0epi5GDg4WAVWJKzdNQcK8AjYS6+fuY4JYIC+x esMBZhCbU8BWYtHtFWC2EFDNhv6rbBMY+RYwMqxiFEktLc5Nzy020itOzC0uzUvXS87P3cQI DPZtx35u2cG48tVHvUOMTByMhxglOJiVRHh36/EkCPGmJFZWpRblxxeV5qQWH2I0BTpjIrOU aHI+MN7ySuINzQxMDU3MLA1MLc2MlcR5TY6siRcSSE8sSc1OTS1ILYLpY+LglGpg2pO+4UFS doOH+e+p2/8+nV1zdvHthTm8qZL9E79rOR9iUBerKrCbOE02u9thxt5ttgzCr/r2/2i4wd7K 9XeuwsZFn/+lzp3k7PbV7V9jq4uY2+8JCx/9cq5gjYiMz7kQNLHt2UaRpZIO85je33z471LS rLo7hu1CHdYvjr0r9/HrPXm58/eR858dCm8+LhcPX+hwQ7n1is2CF6K7mYTNhTkzL/4s4p26 7Yvr5teCQUXroo/rH3mw3pnnteSb6nOx19We1B6OkI7Y9KwlKFy/8K/r/J/7fJ/mtudf3uY7 T6n8trPDWweRq8JiPx+/tZ8ctbJomv69yd+MeRrllrlv3Nm16dH0Z+u+20zY+2RqyzclluKM REMt5qLiRABmO4VL/wIAAA== X-CMS-MailID: 20210126095112eucas1p1af8ac76eaede4baf2b0cfeac561a6a06 X-Msg-Generator: CA X-RootMTR: 20210126095112eucas1p1af8ac76eaede4baf2b0cfeac561a6a06 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20210126095112eucas1p1af8ac76eaede4baf2b0cfeac561a6a06 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 Add a simple Analog to Digital Converter device based button driver. This driver binds to the 'adc-keys' device tree node. Signed-off-by: Marek Szyprowski --- drivers/button/Kconfig | 8 ++ drivers/button/Makefile | 1 + drivers/button/button-adc.c | 156 ++++++++++++++++++++++++++++++++++++ 3 files changed, 165 insertions(+) create mode 100644 drivers/button/button-adc.c -- 2.17.1 diff --git a/drivers/button/Kconfig b/drivers/button/Kconfig index 6b3ec7e55d..6db3c5e93a 100644 --- a/drivers/button/Kconfig +++ b/drivers/button/Kconfig @@ -9,6 +9,14 @@ config BUTTON can provide access to board-specific buttons. Use of the device tree for configuration is encouraged. +config BUTTON_ADC + bool "Button adc" + depends on BUTTON + help + Enable support for buttons which are connected to Analog to Digital + Converter device. The ADC driver must use driver model. Buttons are + configured using the device tree. + config BUTTON_GPIO bool "Button gpio" depends on BUTTON diff --git a/drivers/button/Makefile b/drivers/button/Makefile index fcc10ebe8d..bbd18af149 100644 --- a/drivers/button/Makefile +++ b/drivers/button/Makefile @@ -3,4 +3,5 @@ # Copyright (C) 2020 Philippe Reynes obj-$(CONFIG_BUTTON) += button-uclass.o +obj-$(CONFIG_BUTTON_ADC) += button-adc.o obj-$(CONFIG_BUTTON_GPIO) += button-gpio.o diff --git a/drivers/button/button-adc.c b/drivers/button/button-adc.c new file mode 100644 index 0000000000..1901d59a0e --- /dev/null +++ b/drivers/button/button-adc.c @@ -0,0 +1,156 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2021 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * Author: Marek Szyprowski + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +/** + * struct button_adc_priv - private data for button-adc driver. + * + * @adc: Analog to Digital Converter device to which button is connected. + * @channel: channel of the ADC device to probe the button state. + * @min: minimal raw ADC sample value to consider button as pressed. + * @max: maximal raw ADC sample value to consider button as pressed. + */ +struct button_adc_priv { + struct udevice *adc; + int channel; + int min; + int max; +}; + +static enum button_state_t button_adc_get_state(struct udevice *dev) +{ + struct button_adc_priv *priv = dev_get_priv(dev); + unsigned int val; + int ret; + + ret = adc_start_channel(priv->adc, priv->channel); + if (ret) + return ret; + + ret = adc_channel_data(priv->adc, priv->channel, &val); + if (ret) + return ret; + + if (ret == 0) + return (val >= priv->min && val < priv->max) ? + BUTTON_ON : BUTTON_OFF; + + return ret; +} + +static int button_adc_probe(struct udevice *dev) +{ + struct button_uc_plat *uc_plat = dev_get_uclass_plat(dev); + struct button_adc_priv *priv = dev_get_priv(dev); + struct ofnode_phandle_args args; + u32 treshold, up_treshold, t; + unsigned int mask; + ofnode node; + int ret, vdd; + + /* Ignore the top-level button node */ + if (!uc_plat->label) + return 0; + + ret = dev_read_phandle_with_args(dev->parent, "io-channels", + "#io-channel-cells", 0, 0, &args); + if (ret) + return ret; + + ret = uclass_get_device_by_ofnode(UCLASS_ADC, args.node, &priv->adc); + if (ret) + return ret; + + ret = ofnode_read_u32(dev_ofnode(dev->parent), + "keyup-threshold-microvolt", &up_treshold); + if (ret) + return ret; + + ret = ofnode_read_u32(dev_ofnode(dev), "press-threshold-microvolt", + &treshold); + if (ret) + return ret; + + dev_for_each_subnode(node, dev->parent) { + ret = ofnode_read_u32(dev_ofnode(dev), + "press-threshold-microvolt", &t); + if (ret) + return ret; + + if (t > treshold) + up_treshold = t; + } + + ret = adc_vdd_value(priv->adc, &vdd); + if (ret) + return ret; + + ret = adc_data_mask(priv->adc, &mask); + if (ret) + return ret; + + priv->channel = args.args[0]; + priv->min = mask * (treshold / 1000) / (vdd / 1000); + priv->max = mask * (up_treshold / 1000) / (vdd / 1000); + + return ret; +} + +static int button_adc_bind(struct udevice *parent) +{ + struct udevice *dev; + ofnode node; + int ret; + + dev_for_each_subnode(node, parent) { + struct button_uc_plat *uc_plat; + const char *label; + + label = ofnode_read_string(node, "label"); + if (!label) { + debug("%s: node %s has no label\n", __func__, + ofnode_get_name(node)); + return -EINVAL; + } + ret = device_bind_driver_to_node(parent, "button_adc", + ofnode_get_name(node), + node, &dev); + if (ret) + return ret; + uc_plat = dev_get_uclass_plat(dev); + uc_plat->label = label; + } + + return 0; +} + +static const struct button_ops button_adc_ops = { + .get_state = button_adc_get_state, +}; + +static const struct udevice_id button_adc_ids[] = { + { .compatible = "adc-keys" }, + { } +}; + +U_BOOT_DRIVER(button_adc) = { + .name = "button_adc", + .id = UCLASS_BUTTON, + .of_match = button_adc_ids, + .ops = &button_adc_ops, + .priv_auto = sizeof(struct button_adc_priv), + .bind = button_adc_bind, + .probe = button_adc_probe, +}; From patchwork Tue Jan 26 09:50:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 370590 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp4802452jam; Tue, 26 Jan 2021 01:52:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJxorgHWpHjFi6S9g8ngaCmwe2z8APX4Ci42w+F3OThBH+ltI7tfPAeU3H3c4n+6fqxwCl9v X-Received: by 2002:a17:906:6846:: with SMTP id a6mr2899264ejs.470.1611654728276; Tue, 26 Jan 2021 01:52:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611654728; cv=none; d=google.com; s=arc-20160816; b=Li0KkVeCBIyHmIa1bkYk0vHnH1kTw/EmO6KwV8BRX00Hx41tZcFH/HT/i4WWHKoYxZ YWzw+F7/yASoAev6+64DSt9tBwgfNAG0t2kttBPCkHMWpJMfWlVHzVWv6OCyyydQu15v zxd2+mSplDIE0i2vc1uUWnQ0+Mpdp5C06Nlp//2iVC31/YQ2D36RyXAKFLxoKKihJL41 3HFLnwZUkVuYJUnNHY3MntvI9cH8h4R4hNWPiysMJPRvKjYxICafZ3T30DEwxxPYdUQ/ 1TJ4RLIsc8L16BVDoH/s7Fd3/h3znakRwJ+dmf0f53fvwo/2+vFb0mPwHYLfJcsORf4f F8sA== 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=txv+bFh9xDbqQOiyvI95mIA15L7JnhrzXb1RhxQZZts=; b=DOY6OloBVUT4JdSR8TMkFbQKkRo8N1LBgpUKH8o9xHrNXaQsgKYSkVCKDOPvbvzwMi U1jjCjz2lPsKXgIU5m05jiTtdaZPoZix2NnK4oY4ehBU01kt/QQ55wmqahRzM6zizDee ZUrmodUBHhhX4Hke+lssJfw8XrL0MWj5akOWHGSBMGr5r2+bDhR7cXjtwdyC3bbd401g Xxm8jFaMamNWMske9q3Xkjng4W5Aq5IqMPZNWiJQQ3BugiTZ8dtMWu3O7VdMc6WLFjrN QOhi6bKRkDDNo1yaESyhOtOGhXf8hM8ucTyWjBRH1lN8ssBeHBYQxnAY2QUfngsYADa0 KKzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=fmshGJp9; 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 n8si3438529edy.77.2021.01.26.01.52.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jan 2021 01:52:08 -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=fmshGJp9; 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 C3AA882674; Tue, 26 Jan 2021 10:51:45 +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="fmshGJp9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E1260825D9; Tue, 26 Jan 2021 10:51:28 +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 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 5D855825B6 for ; Tue, 26 Jan 2021 10:51:14 +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 20210126095113euoutp028a4095169f5ad7c956d849b414286067~dv2MV3uQn3202732027euoutp02F for ; Tue, 26 Jan 2021 09:51:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20210126095113euoutp028a4095169f5ad7c956d849b414286067~dv2MV3uQn3202732027euoutp02F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1611654673; bh=txv+bFh9xDbqQOiyvI95mIA15L7JnhrzXb1RhxQZZts=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fmshGJp9fdJLLzojuu80syQEjqlFixoIYUVydAOi6dvZSTXfTMBfAj4SLWbPYzDaB Rn9pKT7wvEbG5hYzgb5EHUv658EbTtLBuUrHg7XiVwd5TFS88Nbx8gqbI1Xe1WBVX2 qzuYMV7L2x5jYZs50ZZitUj4a58cVXSwMIe7GE/M= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20210126095113eucas1p1035112566647076f7f7801b9b7f7dd23~dv2L3Oxbp0759307593eucas1p1t; Tue, 26 Jan 2021 09:51:13 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 5C.D2.45488.116EF006; Tue, 26 Jan 2021 09:51:13 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20210126095113eucas1p1cbd41e98d0d5f454fe45a4c5e4bb5e2f~dv2LhetK80760807608eucas1p1w; Tue, 26 Jan 2021 09:51:13 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210126095113eusmtrp24c4abf583bd3e5835724849358028a98~dv2Lg4mpA0431304313eusmtrp2d; Tue, 26 Jan 2021 09:51:13 +0000 (GMT) X-AuditID: cbfec7f5-c77ff7000000b1b0-6e-600fe611769c Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 5C.E7.16282.016EF006; Tue, 26 Jan 2021 09:51:12 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210126095112eusmtip2928838765a09e3bfd7853a225e364516~dv2K_I2bx0454904549eusmtip2R; Tue, 26 Jan 2021 09:51:12 +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 3/4] adc: meson-saradc: add support for getting reference voltage value Date: Tue, 26 Jan 2021 10:50:35 +0100 Message-Id: <20210126095036.6429-4-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+NgFupmleLIzCtJLcpLzFFi42LZduznOV3BZ/wJBu/PilpsnLGe1eLGrzZW i+fvLjNZrD1yl93iUF+0RcdhZYtvW7YxWkya8IvN4u3eTnaLw1M/MDpweby/0cruMbvhIovH vFknWDw+fIzzmN/5ncnj7J0djB59W1YxemxcdoA5gCOKyyYlNSezLLVI3y6BK+P63X62gpm8 FTs3bWFsYPzA1cXIySEhYCJxZctB9i5GLg4hgRWMEq29LxghnC+MEluPzWUBqRIS+MwoMe0b O0xH/7tTTBBFyxkl5i54wgbXsfzAcrAqNgFDia63XWwgtoiAkcSlph0sIEXMAneYJLomN4CN FRaIkeie9pMZxGYRUJV4v/UTWAOvgI3E8vcdjBDr5CVWbzgAVsMpYCux6PYKZpBBEgJHOCTa znxlhihykWj+e4MVwhaWeHV8C9StMhL/d85ngmhoZpR4eG4tO4TTwyhxuWkG1ApriTvnfgGt 5gC6T1Ni/S59EFNCwFHi09QKCJNP4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PkWMDKsYhRJLS3OTc8tNtIrTswtLs1L10vOz93E CAz1bcd+btnBuPLVR71DjEwcjIcYJTiYlUR4d+vxJAjxpiRWVqUW5ccXleakFh9iNAW6YyKz lGhyPjDa8kriDc0MTA1NzCwNTC3NjJXEeU2OrIkXEkhPLEnNTk0tSC2C6WPi4JRqYEp5crZJ 26hIkdmtfXNM0Krzf8Rf3y/32FlWZ/7aJH51BlPQt2e/lCUdln9s/FOfIcfI7Dwnf6ezwZ9+ BZOsv3e3KyTu57i0PvARw+Ogi1fcraaldlc/0hUWkPXpKHdedVUg86b7734Rbv8l+icbg6te 2xzg+GC/ZAZjRU/Fh68+hsbnPjDGWVs1d6340Xz5pa21xd/fjLcv77bO+Mwlbf9d/vRBn2lC LC7dHRs0EiNMVOpDIjcveLRtokj/832SIV7/MivW60p/C5hgcXDm5uucFgumnLpzPUyPY7JH VfRjiZnc8+3amV/+Vfo1ITQqu4mnpSrDVeM93yr1X6tjVho+OPbKSm9/zCfDPdI6SizFGYmG WsxFxYkATeSS8P4CAAA= X-CMS-MailID: 20210126095113eucas1p1cbd41e98d0d5f454fe45a4c5e4bb5e2f X-Msg-Generator: CA X-RootMTR: 20210126095113eucas1p1cbd41e98d0d5f454fe45a4c5e4bb5e2f X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20210126095113eucas1p1cbd41e98d0d5f454fe45a4c5e4bb5e2f 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 Add support for getting the 'vref-supply' regulator and register it as ADC's reference voltage regulator, so clients can translate sampled ADC values to the voltage. Signed-off-by: Marek Szyprowski --- drivers/adc/meson-saradc.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) -- 2.17.1 Reviewed-by: Simon Glass diff --git a/drivers/adc/meson-saradc.c b/drivers/adc/meson-saradc.c index 21db55831d..1a45a3a265 100644 --- a/drivers/adc/meson-saradc.c +++ b/drivers/adc/meson-saradc.c @@ -18,6 +18,7 @@ #include #include #include +#include #define MESON_SAR_ADC_REG0 0x00 #define MESON_SAR_ADC_REG0_PANEL_DETECT BIT(31) @@ -656,7 +657,10 @@ static int meson_saradc_stop(struct udevice *dev) static int meson_saradc_probe(struct udevice *dev) { + struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev); struct meson_saradc_priv *priv = dev_get_priv(dev); + struct udevice *vref; + int vref_uv; int ret; ret = regmap_init_mem(dev_ofnode(dev), &priv->regmap); @@ -675,6 +679,23 @@ static int meson_saradc_probe(struct udevice *dev) priv->active_channel = -1; + ret = device_get_supply_regulator(dev, "vref-supply", &vref); + if (ret) { + printf("can't get vref-supply: %d\n", ret); + return ret; + } + + vref_uv = regulator_get_value(vref); + if (vref_uv < 0) { + printf("can't get vref-supply value: %d\n", vref_uv); + return vref_uv; + } + + /* VDD supplied by common vref pin */ + uc_pdata->vdd_supply = vref; + uc_pdata->vdd_microvolts = vref_uv; + uc_pdata->vss_microvolts = 0; + return 0; } From patchwork Tue Jan 26 09:50:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 370589 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp4802321jam; Tue, 26 Jan 2021 01:51:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJyffiBtWKc63uA0lXGpi9DKv9uskOeVvNRaprXVlAaeuW4MSVIo5oemjsEP5xJOuer7E91d X-Received: by 2002:aa7:c4c9:: with SMTP id p9mr4161928edr.234.1611654715213; Tue, 26 Jan 2021 01:51:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611654715; cv=none; d=google.com; s=arc-20160816; b=piSs8h3IcasyQ5KjGH7RnVFvVvyIdbj8IJeCujWtRYUE7sbexdZEvO7zD3n89zzQhg XOI2cLWby3237qpEpHbeEe3xHLwlq+1xIBkLG/GWXI0U4/shpo6mFx3aIfLhY9e6fYzo /1j4hJ8e8Ml1vXAhyPxNQNolWtvUaL4qq9fJWcNoNc/sLPQPw3IboCxkGiPl69Ha5hg3 skk+2LcT7ukrMDLAaGUBPoBFb9vMO2tSNhb84tzmMlMy+H8BB7AWD1uo5FaDoOSULZiT WQ3uEDm+SBUSRnG6gC42gFP+hfCAYO0ERrv5/652GzDBANPKR00VKtAeVJ22JHZtTGMj Ip1g== 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=9IdDzZ8GdWGcUmRPgYEgd990FpUtNOEQigb+SpSli+g=; b=s8a4bJffH6WpxfbtKUO/HDV8rL7gVja0PXuxDibhaWmK/6Vxr1C64YUmrBU3UxRK7H Cy73H3vHqYu+3D6DpC7fiDRNBTBsE5uQdrOj1FJ++3Flu6S7h78Q9+v6sC7uRpzLIHjG G3g/k6bKf/bbg6daZM7JUxCkow9lyCehLTKxbRCVqigyxQ6uSXEUV0nG87cm/B5lgXYW mfJD33Or2gwTYXeZvuMp8HdBl42ksKOmIEkMBGddXbuiXZFdTOoOxsPPatuEfOWpJKVJ k8bO9b9zrMwdm2NNXEK8dhSDesn/I3ibOgZUH5X9GoyinNv0YFXVcW2yJZ/w9J7JYEiC T+2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=RyilzVju; 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 qp24si1383210ejb.563.2021.01.26.01.51.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jan 2021 01:51:55 -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=RyilzVju; 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 E0CF182571; Tue, 26 Jan 2021 10:51:40 +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="RyilzVju"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4548782653; Tue, 26 Jan 2021 10:51:27 +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 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 317EF825BF for ; Tue, 26 Jan 2021 10:51:15 +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 20210126095114euoutp0214b5039140e719f30c5506a45b42c04d~dv2NE7YvQ3205232052euoutp02C for ; Tue, 26 Jan 2021 09:51:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20210126095114euoutp0214b5039140e719f30c5506a45b42c04d~dv2NE7YvQ3205232052euoutp02C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1611654674; bh=9IdDzZ8GdWGcUmRPgYEgd990FpUtNOEQigb+SpSli+g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RyilzVjum74MbYTZ6CIotQQ2iNnalKsCkIFEYVZmudKCVqd104a0ouQ+IciSJ1ZT3 njFgBl+CC0SWEp4AiLRJKYJinocrYZclxeq38a9rOAEPh1NcDZEWOIwQhlkDH0Zpnn XhJQ+b5po1NISVUwKkbOIPOnjZbDsRNpWUqTKrAw= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20210126095114eucas1p1280966954696e8a47d2d3a5770b26e8e~dv2MkUUqC2162421624eucas1p1j; Tue, 26 Jan 2021 09:51:14 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id F1.91.44805.216EF006; Tue, 26 Jan 2021 09:51:14 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20210126095113eucas1p1154fc4a8742f9a969a5a19114fb79000~dv2MIQ3kZ0759307593eucas1p1v; Tue, 26 Jan 2021 09:51:13 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210126095113eusmtrp23ae46096d3b2cfc1cd55760e95885374~dv2MHnud80402704027eusmtrp2A; Tue, 26 Jan 2021 09:51:13 +0000 (GMT) X-AuditID: cbfec7f4-b37ff7000000af05-c3-600fe612ff09 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 3D.E7.16282.116EF006; Tue, 26 Jan 2021 09:51:13 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210126095112eusmtip2f7f132bf3aba7a3a4a8e6f516deed697~dv2LZGUL50504205042eusmtip2H; Tue, 26 Jan 2021 09:51:12 +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 4/4] configs: khadas-vim3(l): enable Function button support Date: Tue, 26 Jan 2021 10:50:36 +0100 Message-Id: <20210126095036.6429-5-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+NgFuphleLIzCtJLcpLzFFi42LZduzneV2hZ/wJBv132C02zljPanHjVxur xfN3l5ks1h65y25xqC/aouOwssW3LdsYLSZN+MVm8XZvJ7vF4akfGB24PN7faGX3mN1wkcVj 3qwTLB4fPsZ5zO/8zuRx9s4ORo++LasYPTYuO8AcwBHFZZOSmpNZllqkb5fAldFxZD1j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3bDRRaP ebNOsHh8+BjnMb/zO5PH2Ts7GD36tqxi9Ni47ABzAEeUnk1RfmlJqkJGfnGJrVK0oYWRnqGl hZ6RiaWeobF5rJWRqZK+nU1Kak5mWWqRvl2CXkbHkfWMBVs5Ks7uXsPSwLievYuRk0NCwETi Q/9ppi5GLg4hgaWMEn3Ll7NAJGQkTk5rYIWwhSX+XOtigyj6xCixeckfsG42AUOJrrcgCU4O EaBJJ7susYIUMQs8YpJ42tUMViQs4C/x4uklMJtFQFVi7tG3YA28AjYSPx5dYoTYIC+xesMB ZhCbU8BWYtHtFWC2EFDNhv6rbBMY+RYwMqxiFEktLc5Nzy020itOzC0uzUvXS87P3cQIDPdt x35u2cG48tVHvUOMTByMhxglOJiVRHh36/EkCPGmJFZWpRblxxeV5qQWH2I0BbpjIrOUaHI+ MOLySuINzQxMDU3MLA1MLc2MlcR5TY6siRcSSE8sSc1OTS1ILYLpY+LglGpgcn5pIqfzpbay QLpt97nLojcW66qff/l61UXJu3fvvn5/4vaZjLUXzFrOr+k4Z/zlbIFnRV24qg2PuGTRiXnn yrZcmbrNOvGyRudWj9mi63ft6vcwlH9gH1DIWvPtViaLxEZv28wIZoaNy3mYVmz121ciO7H/ yDSTPc05RoddGDhdpp23Xr3pU69iz+s3YhOY7Pa5vzAqnZ15tWNfcOmdjppPlS2d/y9YHdfQ 70vKtHy9/9vpBU+9d1lxN15njzmTx1j1k2mVV5bj1tjZsybunBctFHS8ZJ3007//M7uVZMK4 7usEt7z7NuNz5WzmHXIv58lfP3J1z3PmzRoZpWF1f7UO5jn0NAXFM/5rqTy3SYmlOCPRUIu5 qDgRAGjEwVkAAwAA X-CMS-MailID: 20210126095113eucas1p1154fc4a8742f9a969a5a19114fb79000 X-Msg-Generator: CA X-RootMTR: 20210126095113eucas1p1154fc4a8742f9a969a5a19114fb79000 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20210126095113eucas1p1154fc4a8742f9a969a5a19114fb79000 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 Add options required to check the 'Function' button state. Signed-off-by: Marek Szyprowski --- configs/khadas-vim3_defconfig | 2 ++ configs/khadas-vim3l_defconfig | 2 ++ 2 files changed, 4 insertions(+) -- 2.17.1 Reviewed-by: Simon Glass diff --git a/configs/khadas-vim3_defconfig b/configs/khadas-vim3_defconfig index 5d16652fd6..bc17430569 100644 --- a/configs/khadas-vim3_defconfig +++ b/configs/khadas-vim3_defconfig @@ -31,6 +31,8 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_ADC=y CONFIG_SARADC_MESON=y +CONFIG_BUTTON=y +CONFIG_BUTTON_ADC=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_MESON=y CONFIG_DM_MMC=y diff --git a/configs/khadas-vim3l_defconfig b/configs/khadas-vim3l_defconfig index 6b13ce045c..c1877922c7 100644 --- a/configs/khadas-vim3l_defconfig +++ b/configs/khadas-vim3l_defconfig @@ -31,6 +31,8 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_ADC=y CONFIG_SARADC_MESON=y +CONFIG_BUTTON=y +CONFIG_BUTTON_ADC=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_MESON=y CONFIG_DM_MMC=y