From patchwork Tue Dec 22 08:56:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 346620 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp5151163jai; Tue, 22 Dec 2020 00:57:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJyFkA56OCunzTCKrVmsGRtPFh61/NhAExviPymDDA0X7kQWq8CY+tcOHdzMM99Tg1smCjIt X-Received: by 2002:a17:906:3883:: with SMTP id q3mr18944307ejd.160.1608627424249; Tue, 22 Dec 2020 00:57:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608627424; cv=none; d=google.com; s=arc-20160816; b=pA2o5tYcJfzgWo+0ZL9dqM9KsR9Q9lzf5kk/6ty5O4Lq7W3EHac0rUt+6b74oFuuPU vXpTVm4BDqARjItXvsoYreIYd7EZS/VnZXedhPxOLj5rNNbS7n1DSUpfNFxDz7C9UV/x 8FRENNoYM94Wuorn2eyl+YiMWVnIXzEMXzYMMrcY+nDHJQcO8ttFmurU5Q9uEMa4ksqn JjKvE8rsaSTmUN98/hma5EHr4LZkKLGwNpymtp1zViFhZVclL098oNl8krJH7XbXFPR4 H66pViGubecLTr4J9JrRyIvh3srMdvO+yaLK4TWDJbFp3OK/lAohxT3FO9liygG9/fig 21OA== 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:message-id :date:subject:cc:to:from:dkim-signature:dkim-filter; bh=1/oZNWy+ZOf5uuMoUZdQsjOvYoFte06Fgcu1znUeKi0=; b=IULzZk6rT4U9y8FSTtqH4vbPJevlWmhB1n6XOuaqZRzG8o5BTMXqZG702EchG0botw iQmVf3Nyvb1COkF+JMBZMB+K0MQe1S3t1Sabc/P9EZ6E6bDII+U7lRgQotGOTFqEb/W0 L+B/V5pwWeEtU8R3Xv7XGMipAnqpjlIYuIS4f7tBSLOx34VM4YEAdSx32rndLQqGYEfp 8gWNVDxrp4SvVhu3EkIuGt5rVK2ovOdHu3izKuDwMGIN1+eHgT88+7ZmkvBpCbCuU9kj HhXFPrNORlUiQG0iVfgNxMhwdHIIkDtZDmu7T4M8LPfX7YBGem/Zxq05FUfC0syacWEA wOJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=qQowP4ob; 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 by4si10267553ejc.732.2020.12.22.00.57.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Dec 2020 00:57:04 -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=qQowP4ob; 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 7109882A28; Tue, 22 Dec 2020 09:56: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="qQowP4ob"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7019082A29; Tue, 22 Dec 2020 09:56:45 +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.0 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 9011782A1B for ; Tue, 22 Dec 2020 09:56: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=m.szyprowski@samsung.com Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20201222085639euoutp013cd04c8527336ac38548c6808bf668f8~S-hjGwHxM1313213132euoutp01Y for ; Tue, 22 Dec 2020 08:56:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20201222085639euoutp013cd04c8527336ac38548c6808bf668f8~S-hjGwHxM1313213132euoutp01Y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608627399; bh=1/oZNWy+ZOf5uuMoUZdQsjOvYoFte06Fgcu1znUeKi0=; h=From:To:Cc:Subject:Date:References:From; b=qQowP4oblPN+q7INQIbIf2mqe9ay6oNdmjagOUwnflNh7GJTq3wYydW4odcHRtctD MZmvvzJSxm0hlNhA1bxrqK4aRjpvGfI2vpn5agEWXeu7Z+Ii6QOF8g5aXNaZQD2Cuc qve3qmQMSqh5NjlugUkp+NPMZ+4dBIDHjucpCbPQ= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20201222085638eucas1p1fa9427c7c194aa93e197b7dea117b33c~S-hi1KSV22231022310eucas1p1c; Tue, 22 Dec 2020 08:56:38 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 87.9A.45488.6C4B1EF5; Tue, 22 Dec 2020 08:56:38 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201222085638eucas1p158d91ce4a22d13623b19706b26374078~S-hiPh14g2231022310eucas1p1b; Tue, 22 Dec 2020 08:56:38 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201222085638eusmtrp2338cbe61bdeec0e16d8112be9220337d~S-hiOdgrq3114731147eusmtrp2F; Tue, 22 Dec 2020 08:56:38 +0000 (GMT) X-AuditID: cbfec7f5-c77ff7000000b1b0-c6-5fe1b4c6f57e Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 15.8A.21957.6C4B1EF5; Tue, 22 Dec 2020 08:56:38 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201222085637eusmtip151e9d2b2bbc884026284107777c49788~S-hhviz2R2659926599eusmtip16; Tue, 22 Dec 2020 08:56:37 +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 v4 0/3] VIM3: add support for checking 'Function' button state Date: Tue, 22 Dec 2020 09:56:30 +0100 Message-Id: <20201222085633.10194-1-m.szyprowski@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KDEUpyRaKjFXFScCAAUxdUV5wIAAA== X-CMS-MailID: 20201222085638eucas1p158d91ce4a22d13623b19706b26374078 X-Msg-Generator: CA X-RootMTR: 20201222085638eucas1p158d91ce4a22d13623b19706b26374078 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201222085638eucas1p158d91ce4a22d13623b19706b26374078 References: 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 Hi All, This patchset adds all building blocks needed for checking the 'Function' button state in the boot script on Amlogic A311D based VIM3 board. This button is connected to the ADC lines of the SoC, so it required to enable meson SARADC, the clocks needed for it and a simple button-adc drivers. Once applied, one can use following commands in the boot scripts: -->8--- echo Checking Func button state: \\c if button Function then echo Selected alternative boot ... fi --->8--- Best regards Marek Szyprowski Samsung R&D Institute Poland Changelog: v4: - rebased onto uboot-amlogic/u-boot-amlogic-next and dropped merged patches - added adc-keys bindings docs (copied from Linux kernel) - minor code adjustments pointed by Simon - enabled driver also in khadas-vim3l_defconfig v3: https://lists.denx.de/pipermail/u-boot/2020-December/435072.html - removed 'button' env variable - extended kconfig and patch descriptions v2: https://lists.denx.de/pipermail/u-boot/2020-December/434991.html - removed Change-Id tags - split defconfig changes into ADC and button related v1: https://lists.denx.de/pipermail/u-boot/2020-December/434875.html - initial submission Patch summary: Marek Szyprowski (3): dt-bindings: input: adc-keys bindings documentation button: add a simple Analog to Digital Converter device based button driver configs: khadas-vim3(l): enable Function button support configs/khadas-vim3_defconfig | 2 + configs/khadas-vim3l_defconfig | 2 + doc/device-tree-bindings/input/adc-keys.txt | 49 ++++++++ drivers/button/Kconfig | 8 ++ drivers/button/Makefile | 1 + drivers/button/button-adc.c | 121 ++++++++++++++++++++ 6 files changed, 183 insertions(+) create mode 100644 doc/device-tree-bindings/input/adc-keys.txt create mode 100644 drivers/button/button-adc.c -- 2.17.1