From patchwork Tue Dec 15 14:42:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 344015 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp3975216jai; Tue, 15 Dec 2020 06:44:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJx0w6DM7niIgC68rja/hGCxQxiEJuySoLS9FC/uzAc20UjBUCANmegEwcF9TFXVQakGtOPI X-Received: by 2002:a05:6402:2041:: with SMTP id bc1mr14279255edb.369.1608043457796; Tue, 15 Dec 2020 06:44:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608043457; cv=none; d=google.com; s=arc-20160816; b=s9la4Jp2olyDStWFdo5aYcIPT35A4lqxLfP/4mZPd0BrMZC5ZPyDbXHCrRDYUurUsL 98cVG0wjDtXz51PUSpjLoZvq9er6BEzrsSr7mXLN6xfDAEmWatrKWzD14RVOG/0KI56h S507M+coe4sL4yH6pRe5lsCaa0deJd6t/ffCb0FxkxU+hYlVBVqFuV5WWsT4Pvpc70zq M1sLyylqtblYDpNcjj3bNegm+1XR/L9Oj0wBbHLfkt9R77WsNVVFOOD1YbUSrayWCoUR xGzB6jyPDv7eGS1WEVTadNE5nwAgerLshNcmhzxTNioWtc3QmblN1tN05ApZGabdkUpL bjRg== 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=tqiyrcofRXDD8+Jvxf8Hvi5HLF9twruT3mGu/SaynC8=; b=I8MwYOF5CouccbtRUOVgye4AaKEexgn5jV+fLcQsHwDWoOVW437j/TEKcwwrls9lC0 Z3qnD5cGGJxhvIiJnHcYfWamjZTjp/R7qJp73lENzXQRrx+Y2Tketo6ff2QXjJTVSHxv iudyPlflcipJH1HrgTxUnPzVMyCkheAs0VAwooL8AZEJnoTFrqRpfSpnzaPdCWbbcP8t ylEPi9mDvGFCLA4c0ZwXytplHz/R4lB2raE7kupWXg0E2Ywtv1KD3eDZAiMFisuE6i0r dtb6Bt9UKiFmiCpufTDtabNrhdfGkmtFl5OS83xa8Oz292MtEqL+Wc5trG41MO6akkrs 1+VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=NsGxCRlw; 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 k4si953459eds.355.2020.12.15.06.44.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 06:44:17 -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=NsGxCRlw; 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 381E0829CA; Tue, 15 Dec 2020 15:43:20 +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="NsGxCRlw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 45465829A8; Tue, 15 Dec 2020 15:43:05 +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 ACF3D829A8 for ; Tue, 15 Dec 2020 15:42:58 +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 mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20201215144248euoutp01733a11f3aaec6a4dc53610336da7b4d7~Q6ux5ktE91458714587euoutp01x for ; Tue, 15 Dec 2020 14:42:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20201215144248euoutp01733a11f3aaec6a4dc53610336da7b4d7~Q6ux5ktE91458714587euoutp01x DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608043368; bh=tqiyrcofRXDD8+Jvxf8Hvi5HLF9twruT3mGu/SaynC8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NsGxCRlwm+C3CRRhixC6vNf3R1S6BXE8l9dvaoWvuEs8QsYoC9dB6T3GUNMrzzqFe yp7gt3Fx2mfaWYM5vEbiMYNuQNLY63wPbPmsoVl9CryWfDm34BYHxkMFqFreVTgB+O X25ooMaQgLdaPiVLs6t6BCMyF7E0QEG2EaF+WQQQ= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20201215144243eucas1p1e3cf557fb014fae32f148d860136eba3~Q6utCdaBU0119001190eucas1p1F; Tue, 15 Dec 2020 14:42:43 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 71.36.27958.36BC8DF5; Tue, 15 Dec 2020 14:42:43 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201215144242eucas1p1ff9e7e4acd3ef9b86fa15a2cd4ac05a5~Q6usdNJBJ0489004890eucas1p1Z; Tue, 15 Dec 2020 14:42:42 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201215144242eusmtrp2821871867cc46ecef18bd41d0aef2f77~Q6uschExs2505225052eusmtrp2t; Tue, 15 Dec 2020 14:42:42 +0000 (GMT) X-AuditID: cbfec7f2-f15ff70000006d36-88-5fd8cb6301db Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 86.DD.16282.26BC8DF5; Tue, 15 Dec 2020 14:42:42 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20201215144241eusmtip2e7d49219de61508381b709e31a9bc867~Q6ur8CgD83260432604eusmtip2h; Tue, 15 Dec 2020 14:42:41 +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 v2 1/7] clk: meson: add minimal driver for g12a-ao clocks Date: Tue, 15 Dec 2020 15:42:24 +0100 Message-Id: <20201215144230.9235-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201215144230.9235-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphleLIzCtJLcpLzFFi42LZduznOd3k0zfiDa7/Y7bYOGM9q8WNX22s Fs/fXWayWHvkLrvFob5oi47DyhbftmxjtJg04Rebxdu9newWh6d+YHTg8nh/o5XdY3bDRRaP ebNOsHh8+BjnMb/zO5PH2Ts7GD36tqxi9Ni47ABzAEcUl01Kak5mWWqRvl0CV8bRpk8sBbfE KjZeesnawNgs3MXIySEhYCLx9N0qpi5GLg4hgRWMEp/2/IByvjBKTHvylQXC+cwocX7JDTaY ln3HelghEssZJQ68n88O1/Jk109WkCo2AUOJrrddYB0iAkYSl5p2gI1iFrjDJNE1uYEFJCEs 4CnRuKSZHcRmEVCVODjlKpjNK2AjcbnhDzvEOnmJ1RsOMIPYnAK2En8mrgLbJiGwh0Ni5a+X LBBFLhJ/9myBahCWeHUcxpaR+L9zPhNEQzOjxMNza6G6exglLjfNYISospa4c+4X0K0cQPdp SqzfpQ8RdpTY9m0dM0hYQoBP4sZbQZAwM5A5adt0qDCvREebEES1msSs4+vg1h68cIkZwvaQ 6OlpA1skJDCBUWLjkcAJjPKzEHYtYGRcxSieWlqcm55abJiXWq5XnJhbXJqXrpecn7uJEZhg Tv87/mkH49xXH/UOMTJxMB5ilOBgVhLh7S29Hi/Em5JYWZValB9fVJqTWnyIUZqDRUmcd9Xs NfFCAumJJanZqakFqUUwWSYOTqkGJnurtpD4ybdv2Mmd8e8wyuY/p/MwOKPJ6peqx+Tyt1OT GWXcProuPHdwxtvzKYfe/K01MmzlOyAeYygj7FomuOz71ldK/icfHG96Nkt7Q/8S08DT+kYK J2x2PNDc8qr9Y1W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5mScT+DtpaXXL4pMS2Z+M5eb1fxfU7f0rtsr8QJJ4DYfaJvci381ve4q6zW8y dIpf2jPvb0DMrwlObpxfux7e0ZNY5v7M4cDabad2v3nesXVyIX9yRq398usly9I23nnyy+7e DsGgirbbhrW/pVqq8nLYss9c1Obe9mr5xrjvMv/VpkyLz+plXX83rKldiaU4I9FQi7moOBEA OpW2NwADAAA= X-CMS-MailID: 20201215144242eucas1p1ff9e7e4acd3ef9b86fa15a2cd4ac05a5 X-Msg-Generator: CA X-RootMTR: 20201215144242eucas1p1ff9e7e4acd3ef9b86fa15a2cd4ac05a5 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201215144242eucas1p1ff9e7e4acd3ef9b86fa15a2cd4ac05a5 References: <20201215144230.9235-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 minimal driver AO clocks on meson G12A family. Only ADC related clocks are supported. Signed-off-by: Marek Szyprowski Reviewed-by: Neil Armstrong Tested-by: Jaehoon Chung Reviewed-by: Jaehoon Chung --- drivers/clk/meson/Makefile | 1 + drivers/clk/meson/g12a-ao.c | 83 +++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 drivers/clk/meson/g12a-ao.c -- 2.17.1 diff --git a/drivers/clk/meson/Makefile b/drivers/clk/meson/Makefile index c873d6976f..7204383e17 100644 --- a/drivers/clk/meson/Makefile +++ b/drivers/clk/meson/Makefile @@ -6,4 +6,5 @@ obj-$(CONFIG_CLK_MESON_GX) += gxbb.o obj-$(CONFIG_CLK_MESON_AXG) += axg.o obj-$(CONFIG_CLK_MESON_G12A) += g12a.o +obj-$(CONFIG_CLK_MESON_G12A) += g12a-ao.o diff --git a/drivers/clk/meson/g12a-ao.c b/drivers/clk/meson/g12a-ao.c new file mode 100644 index 0000000000..7a0abea77c --- /dev/null +++ b/drivers/clk/meson/g12a-ao.c @@ -0,0 +1,83 @@ +// SPDX-License-Identifier: GPL-2.0+ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "clk_meson.h" + +struct meson_clk { + struct regmap *map; +}; + +#define AO_CLK_GATE0 0x4c +#define AO_SAR_CLK 0x90 + +static struct meson_gate gates[] = { + MESON_GATE(CLKID_AO_SAR_ADC, AO_CLK_GATE0, 8), + MESON_GATE(CLKID_AO_SAR_ADC_CLK, AO_SAR_CLK, 8), +}; + +static int meson_set_gate(struct clk *clk, bool on) +{ + struct meson_clk *priv = dev_get_priv(clk->dev); + struct meson_gate *gate; + + if (clk->id >= ARRAY_SIZE(gates)) + return -ENOENT; + + gate = &gates[clk->id]; + + if (gate->reg == 0) + return 0; + + regmap_update_bits(priv->map, gate->reg, + BIT(gate->bit), on ? BIT(gate->bit) : 0); + + return 0; +} + +static int meson_clk_enable(struct clk *clk) +{ + return meson_set_gate(clk, true); +} + +static int meson_clk_disable(struct clk *clk) +{ + return meson_set_gate(clk, false); +} + +static int meson_clk_probe(struct udevice *dev) +{ + struct meson_clk *priv = dev_get_priv(dev); + + priv->map = syscon_node_to_regmap(dev_get_parent(dev)->node); + if (IS_ERR(priv->map)) + return PTR_ERR(priv->map); + + return 0; +} + +static struct clk_ops meson_clk_ops = { + .disable = meson_clk_disable, + .enable = meson_clk_enable, +}; + +static const struct udevice_id meson_clk_ids[] = { + { .compatible = "amlogic,meson-g12a-aoclkc" }, + { } +}; + +U_BOOT_DRIVER(meson_clk_axg) = { + .name = "meson_clk_g12a_ao", + .id = UCLASS_CLK, + .of_match = meson_clk_ids, + .priv_auto_alloc_size = sizeof(struct meson_clk), + .ops = &meson_clk_ops, + .probe = meson_clk_probe, +}; From patchwork Tue Dec 15 14:42:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 344012 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp3974738jai; Tue, 15 Dec 2020 06:43:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJyD5PZ1w4qv0CLXNK7yOjTpohKBj6I/jiXPC3R35YTsiOAwyKS8uBcDRtMfiCn+QWnV6b4I X-Received: by 2002:a17:906:d8a1:: with SMTP id qc1mr7001245ejb.294.1608043423186; Tue, 15 Dec 2020 06:43:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608043423; cv=none; d=google.com; s=arc-20160816; b=cLvrjRgeQ9QxIaAiQyL+dHbBnQsnOYI5x9U9bUh+YbuM9liJ+iANcYDdQu/fVWMz9+ JYBRmM8ezBuK2zkWxNdLItw9tiGy5L6Mf8ww5KzFobFV7XsltFtaldBKxSCiO/vAk96e xX7Y9Lsvd8T/YgE1kpECeCP08L0v8x4/TOay47fJ1t/qa5/rgks8uGhruoo0P6HHd/Qv oVmGEUpViDuztz2+nbEC5QONtbG3hKO7HCoN5XClaQXvJ5VISdCaOnBb+ecTm5eiUHmr vyjFoLjIPtTUAxYxU8Tg2YQ2WgvotyCcsOwPQLUAEd5TPGzTbLFf8YJM2StGYgOBp8W1 ZpzA== 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=knAMYuM5Fv2FwCCrJdg7R7ZZOjjU0BpAeAqjZRDnCJ4=; b=Fmu/WrAVGaUZdljRbv6zK7Au9H7aul93e+qC9lIPU1BkJFZ3pKPvvvqAPiPZzpuBx3 3i3AmXBXacrLtC8voyhLnbHq/Hk1H7fzcQaOvsVlt0Oy07YKoR848PJntc72UWnnszYi a6I/k5tOqU2G47gy+AFYIB+O8/9uMWXG9jS/JJJuYay0ZCFqYAhvrr81ZfOQnjcsO1cF WceDncU+EUIzKr+k3r2Az5Drp+7dKLz1qpdXGbT+TuI9lmIL3c/aCwJfIMAA3p5EIZRy 1o6VHe0dfHNNn2oHRUUqAU83BcE3iLtOVrjb6dERndprHgOHKmzQv0TSq5BZdaTd5TUk 1u0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=njRUkEmb; 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 a3si984089ejx.101.2020.12.15.06.43.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 06:43:43 -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=njRUkEmb; 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 D15CA829B5; Tue, 15 Dec 2020 15:43: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=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="njRUkEmb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BC799829AD; Tue, 15 Dec 2020 15:43:03 +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 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 1FCEE829A9 for ; Tue, 15 Dec 2020 15:42:59 +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 20201215144248euoutp02a92558368bf967889665e2c6b00a2649~Q6uyKfpni1507615076euoutp02k for ; Tue, 15 Dec 2020 14:42:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20201215144248euoutp02a92558368bf967889665e2c6b00a2649~Q6uyKfpni1507615076euoutp02k DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608043368; bh=knAMYuM5Fv2FwCCrJdg7R7ZZOjjU0BpAeAqjZRDnCJ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=njRUkEmbMJ45OCuaJUC1GgXqdJAzxxkaSd5tHpNpaB0MeACBYo8RENpk9k+nDoHJD yhZQ2mvjMKZDqVc8QxjAFSIYZmmxaU6oCrL2I9R7f/+UpK721R4V8/DFhLGelZRY+U d/ggBDjofBbgmC5XJg2SROIijb0DVCnjlGWwv0Cg= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20201215144243eucas1p24cf3be54040197763a1bd73085d1c520~Q6utVQ1Po0227602276eucas1p2B; Tue, 15 Dec 2020 14:42:43 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id AA.C0.45488.36BC8DF5; Tue, 15 Dec 2020 14:42:43 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20201215144243eucas1p281404c3b46cd0b32811c1af3a2ef2ba4~Q6us_Ddcz3233932339eucas1p2O; Tue, 15 Dec 2020 14:42:43 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201215144243eusmtrp2e18313667b875395c83ae78afd4446cc~Q6us9ewGb2505225052eusmtrp2v; Tue, 15 Dec 2020 14:42:43 +0000 (GMT) X-AuditID: cbfec7f5-c77ff7000000b1b0-a5-5fd8cb6300e7 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id D0.A0.21957.26BC8DF5; Tue, 15 Dec 2020 14:42:42 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20201215144242eusmtip2bfa9fc4ee0ff13b6ec94c1aa59e186d5~Q6usZWgo93260432604eusmtip2i; Tue, 15 Dec 2020 14:42:42 +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 v2 2/7] adc: meson-saradc: add G12A variant Date: Tue, 15 Dec 2020 15:42:25 +0100 Message-Id: <20201215144230.9235-3-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201215144230.9235-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmleLIzCtJLcpLzFFi42LZduznOd3k0zfiDT5eELDYOGM9q8WNX22s Fs/fXWayWHvkLrvFob5oi47DyhbftmxjtJg04Rebxdu9newWh6d+YHTg8nh/o5XdY3bDRRaP ebNOsHh8+BjnMb/zO5PH2Ts7GD36tqxi9Ni47ABzAEcUl01Kak5mWWqRvl0CV8br52/YC+6w VSx43sTWwHiFtYuRk0NCwETixqqFzF2MXBxCAisYJfbd2sYG4XxhlHi69QoThPOZUWJyxwlm mJZXs6dAVS1nlHj0eS8zXMvvd5cZQarYBAwlut52sYHYIgJGEpeadrCAFDEL3GGS6JrcwAKS EBawlti1YCdYA4uAqsSELwvAGngFbCSmPu9kglgnL7F6wwGw1ZwCthJ/Jq5ih4gf4JCYuSoW wnaR6D71hAXCFpZ4dXwLVI2MxP+d88F+kBBoZpR4eG4tO4TTwyhxuWkGI0SVtcSdc7+ANnMA nacpsX6XPkTYUWLrhiNgYQkBPokbbwVBwsxA5qRt05khwrwSHW1CENVqErOOr4Nbe/DCJagS D4nrPwUh4TOBUeLbxbvsExjlZyHsWsDIuIpRPLW0ODc9tdg4L7Vcrzgxt7g0L10vOT93EyMw vZz+d/zrDsYVrz7qHWJk4mA8xCjBwawkwttbej1eiDclsbIqtSg/vqg0J7X4EKM0B4uSOO+u rWvihQTSE0tSs1NTC1KLYLJMHJxSDUzK/2ZLttc1K8ZGStUpi+grrXzqWbr8eX78RX6phsMb Emt0b7SE/LTJ0Vyq0LRsSYLnzRM6H5keWCUuePnzN3NC+I+maWtaRKJyTr53dG2xe6M/2+r7 9MVZfSEfXd+dUVtxOiBh554nofOE2LtS8vM3PT2afdRR/vP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/a7uk/A5qdouhQE1m43XHC79spSv b3es/Pa6toq7GrN+ahYdVsjKdfsvP6vH1lxhRdDC3ReT/vax+c+ps5TKP7rj98OrCtyC6ZKy 3Lms/jaMv1Xqnmt4/1/4l5NNqSPhYOElt+mtsczXu3OZV30P1xTeOWul2o0PSizFGYmGWsxF xYkA8RBi5gADAAA= X-CMS-MailID: 20201215144243eucas1p281404c3b46cd0b32811c1af3a2ef2ba4 X-Msg-Generator: CA X-RootMTR: 20201215144243eucas1p281404c3b46cd0b32811c1af3a2ef2ba4 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201215144243eucas1p281404c3b46cd0b32811c1af3a2ef2ba4 References: <20201215144230.9235-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 the SARADC variant found on the G12A SoCs family. Signed-off-by: Marek Szyprowski Reviewed-by: Neil Armstrong Tested-by: Jaehoon Chung Reviewed-by: Jaehoon Chung --- drivers/adc/meson-saradc.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/drivers/adc/meson-saradc.c b/drivers/adc/meson-saradc.c index 72b0cc4e5b..998cef24d8 100644 --- a/drivers/adc/meson-saradc.c +++ b/drivers/adc/meson-saradc.c @@ -711,6 +711,8 @@ static const struct udevice_id meson_saradc_ids[] = { .data = (ulong)&gxl_saradc_data }, { .compatible = "amlogic,meson-gxm-saradc", .data = (ulong)&gxl_saradc_data }, + { .compatible = "amlogic,meson-g12a-saradc", + .data = (ulong)&gxl_saradc_data }, { } }; From patchwork Tue Dec 15 14:42:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 344009 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp3974295jai; Tue, 15 Dec 2020 06:43:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJwMim49ci05JIAV6GiArKIQtukziufbY5B39jxblq/M7gycB9RlkvzhRtBtYy1qsNzuTKXq X-Received: by 2002:a05:6402:17:: with SMTP id d23mr20193299edu.341.1608043388054; Tue, 15 Dec 2020 06:43:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608043388; cv=none; d=google.com; s=arc-20160816; b=RC0rkxHRLhvOWV7Ygo0c3f8NZeXob7LI4r8rS4n3Ms0O0jgit1ahgaRZeRoXaKknVr FRPaMieW3vLr/YmXboCD6GBP3Gp/ghS602PfeNn2mhRI687t7bXnhXF0vD3LNRTVQFb/ oLVljwWwCGAmxpxwxO9hCcHsFpLKfJHvj7Wej2m26VC0BdgWe6MAsS+rAE6dcNMuy3Ob SpLiPddCWAh2HTv273JnTtjSHXU4fxh/UDT7q+ijL219OgNKsdKTG0uRW0tiuHHfio4S UVM+9+0fy/+Tp9fm+QFuwuKyqgavlAyHHVsFN4b4KDX+8xdWj0YqRwXOvAWmC8j5ulgJ S94g== 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=niKH6BNL1ADCXiwc4ADswQfLUZeqREE5EgoAsfjsh+8=; b=eJCPTF6x7Ext/LvHn7406X8qJDX0tJ8qDmvKrZ0KLemfanh/+t7Fd/xAAhH2yiWBb2 57/3SO5PQl1dF1c0UUTxc3I6cEdHTyeE/mkvcG/3t2C6XynuuHpRsGw5LNea76KhKTgY a5K3w3xtbPm9oy4B6qNYlV60kfTp7/W+4QfqD7jtj3TSdMmawEMJ683QNQkwUql90yX8 /9iFmbSTH2LUMkrC3bGg0sBm+csQAw4yK2iTSNkNf34VjcWNc6AgFbWXF5W+YXDnrxzI YJR3441h1y2FiDgOt8OFYIJXQCssOJGgtNQLiRyRk9P4SwAP7k1idNPriR/6lwRr/cMZ /zwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=A49SQpxj; 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 t6si962359ejr.116.2020.12.15.06.43.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 06:43:08 -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=A49SQpxj; 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 D5CEF82998; Tue, 15 Dec 2020 15:43:01 +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="A49SQpxj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DC000829AC; Tue, 15 Dec 2020 15:42:59 +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 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 E52E382998 for ; Tue, 15 Dec 2020 15:42:56 +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 20201215144246euoutp02cfbdf7a37c9108de0d2fc988a6ab10fc~Q6uwLQ1Cp1508115081euoutp02i for ; Tue, 15 Dec 2020 14:42:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20201215144246euoutp02cfbdf7a37c9108de0d2fc988a6ab10fc~Q6uwLQ1Cp1508115081euoutp02i DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608043366; bh=niKH6BNL1ADCXiwc4ADswQfLUZeqREE5EgoAsfjsh+8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A49SQpxjIUmq0hvhmf/SvLOKg+IVglxX2LztlSu4WsNjiRZRBTn65lmGDB7sH+XQ2 DNydCbj1Xxb8frA5qdkGYSJK8LVGaWaNVpK+doo9nvy3+4qgtatUlYWA0ckTR7zU6C 35Widjd7C7kY4Gw5H4esnl3dW0sXDwdxQ6PX1Jyo= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20201215144244eucas1p2974afe13adbb673fe9a96ca91b09a627~Q6uuQAR590385003850eucas1p2C; Tue, 15 Dec 2020 14:42:44 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 3C.C0.45488.46BC8DF5; Tue, 15 Dec 2020 14:42:44 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201215144243eucas1p1d1a361740f20097fd2db505c9bdfee7d~Q6utb5-C-0484804848eucas1p1W; Tue, 15 Dec 2020 14:42:43 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201215144243eusmtrp2deda85c1f18d1149da21f41bff07170e~Q6utbUQqb2505225052eusmtrp2w; Tue, 15 Dec 2020 14:42:43 +0000 (GMT) X-AuditID: cbfec7f5-c77ff7000000b1b0-a7-5fd8cb64b6c5 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id B1.A0.21957.36BC8DF5; Tue, 15 Dec 2020 14:42:43 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20201215144242eusmtip2a6c21445821e0abd06283e88637d34e3~Q6us4GTIY0137801378eusmtip2C; Tue, 15 Dec 2020 14:42:42 +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 v2 3/7] adc: meson-saradc: skip hardware init only if ADC is enabled Date: Tue, 15 Dec 2020 15:42:26 +0100 Message-Id: <20201215144230.9235-4-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201215144230.9235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1gm3/J2Xy+8I6Ib215fzgMlFiKMxIN tZiLihMBlwTXdP8CAAA= X-CMS-MailID: 20201215144243eucas1p1d1a361740f20097fd2db505c9bdfee7d X-Msg-Generator: CA X-RootMTR: 20201215144243eucas1p1d1a361740f20097fd2db505c9bdfee7d X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201215144243eucas1p1d1a361740f20097fd2db505c9bdfee7d References: <20201215144230.9235-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 The driver skips hardware initialization if it is already configured by the earlier bootloader stage (BL30). Skip the initialization only if the hardware is really initialized and enabled. Signed-off-by: Marek Szyprowski Reviewed-by: Neil Armstrong Tested-by: Jaehoon Chung Reviewed-by: Jaehoon Chung --- drivers/adc/meson-saradc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/adc/meson-saradc.c b/drivers/adc/meson-saradc.c index 998cef24d8..ce7ae990ad 100644 --- a/drivers/adc/meson-saradc.c +++ b/drivers/adc/meson-saradc.c @@ -512,8 +512,11 @@ static int meson_saradc_init(struct meson_saradc_priv *priv) * reading the temperature sensor. */ regmap_read(priv->regmap, MESON_SAR_ADC_REG3, ®val); - if (regval & MESON_SAR_ADC_REG3_BL30_INITIALIZED) - return 0; + if (regval & MESON_SAR_ADC_REG3_BL30_INITIALIZED) { + regmap_read(priv->regmap, MESON_SAR_ADC_REG3, ®val); + if (regval & MESON_SAR_ADC_REG3_ADC_EN) + return 0; + } meson_saradc_stop_sample_engine(priv); From patchwork Tue Dec 15 14:42:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 344014 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp3975064jai; Tue, 15 Dec 2020 06:44:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJwEGOzdCPpfvgXwyBkKNIxKe5TfKElS9Z5sBHV7sOFLlexcCeOjbfxOaP986Qt+4HTxnQKj X-Received: by 2002:a17:906:d10f:: with SMTP id b15mr26576540ejz.268.1608043446775; Tue, 15 Dec 2020 06:44:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608043446; cv=none; d=google.com; s=arc-20160816; b=WgCvOZnREEUTB1wER37E12KDYOVre7QA4V0eJbihpPB6vQ8hkkKcLfQfmCXIS+l9rz gs5CtwMxu7z6tujsSMZuwCjDXaNaDmN+wiZX9jU6fXbgj9KM5ZsEkArypag4VnwF8a3Z WtVuawKDn1qpV/QNW0fTZ3i3rH13OmUu/AwOgNXE2CCL91fc/eSClvX/Plu4XVOXUztf V3IWYqPXcRdG1Yg0Qh6Sm5Mi+MKo10XKQL0qMrcQ5mS65i38h645MNvbgCCUTbLyUZRq Ej9Yle4RxpHIQKlp84j1I9lnfC6/GybWTYmJK9mk4euCMLJ+eyAOdOEN//7LySG5oinO Dq1A== 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=gdX/SWG3cofRDmYv7DV/EUjzT0L8GOfezczTVzI9fu8=; b=u85dZkpEcVaUBxxRPWj1R1LZf54FNI9PaJ/CbABzZ7zGyNb5wPB7ep/ogxlbWYtyQE AhkkRa2KySBRgsf0M7d5ftSCY68FIZe2ztFl9Vs/Ie19eFYmq19zQkowQHVAj+Y7sW7D kQe4lhXRB/kGG1zI2sT+sUTlYZjYLtTCIyi0Es2i/7Z+VuwZitI+Ae8rfw0DRHYOe2oM fU2RbDloGs8FJ9RvrYJC4VSF/sjt/0+ChO+wp+gBpWPxDX3nPbPzSBVCokqBoH8+IEmK gpplh8UHbnTKzUIqrz+3uXkjqzO85IMU0sa/ymcVTB0jhGorobBtsgexXdRykBGcRV5w SSaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=usCcE9x6; 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 v26si980995edw.486.2020.12.15.06.44.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 06:44:06 -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=usCcE9x6; 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 E58EB829C4; Tue, 15 Dec 2020 15:43:17 +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="usCcE9x6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F082D829B5; Tue, 15 Dec 2020 15:43:02 +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 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 12448829A3 for ; Tue, 15 Dec 2020 15:42:57 +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 20201215144246euoutp02e04215c30a448ab7e6d2b12b65054f82~Q6uwTSZwZ1507615076euoutp02g for ; Tue, 15 Dec 2020 14:42:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20201215144246euoutp02e04215c30a448ab7e6d2b12b65054f82~Q6uwTSZwZ1507615076euoutp02g DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608043366; bh=gdX/SWG3cofRDmYv7DV/EUjzT0L8GOfezczTVzI9fu8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=usCcE9x6lETcfH+55IjazTKM9T0/CkTvsSEuigoRbudAmIjBUkamnYSmScPmD8uo6 oR3ZyMwmOsrLt6roPFdhV+6n3lls9a4BGfAQ41aDFuYT9ATh0fCOXhFP1qXiZqCA8n 0GydHIKShJI01XVzmzXgi1C5FQywsXY7MK0FQhcY= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20201215144244eucas1p13d2880bab832b0ab4750d0d0fee25647~Q6uuU4WTc0470104701eucas1p1R; Tue, 15 Dec 2020 14:42:44 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 43.36.27958.46BC8DF5; Tue, 15 Dec 2020 14:42:44 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20201215144244eucas1p2a581daac51d792e119f8db88bdda7086~Q6ut6GDq90066600666eucas1p2S; Tue, 15 Dec 2020 14:42:44 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201215144244eusmtrp2f1c7bce5dbabfaf13a3c9265a34dc645~Q6ut5QIle2505225052eusmtrp2x; Tue, 15 Dec 2020 14:42:44 +0000 (GMT) X-AuditID: cbfec7f2-efdff70000006d36-8d-5fd8cb6401f2 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 82.A0.21957.36BC8DF5; Tue, 15 Dec 2020 14:42:43 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20201215144243eusmtip24b53be8fc7bd3c6f0aa0bd33086eb3b7~Q6utTeGZk3260432604eusmtip2j; Tue, 15 Dec 2020 14:42:43 +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 v2 4/7] configs: khadas-vim3: enable ADC device support Date: Tue, 15 Dec 2020 15:42:27 +0100 Message-Id: <20201215144230.9235-5-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201215144230.9235-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efr60NnilhM+mX1Rs6c72kRcUWIpzkg01GIu Kk4EAAf91v4AAwAA X-CMS-MailID: 20201215144244eucas1p2a581daac51d792e119f8db88bdda7086 X-Msg-Generator: CA X-RootMTR: 20201215144244eucas1p2a581daac51d792e119f8db88bdda7086 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201215144244eucas1p2a581daac51d792e119f8db88bdda7086 References: <20201215144230.9235-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 ADC device (Meson SARADC) will be used for probing 'Function' button state. Signed-off-by: Marek Szyprowski --- configs/khadas-vim3_defconfig | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/configs/khadas-vim3_defconfig b/configs/khadas-vim3_defconfig index 9d7ba72d44..5d16652fd6 100644 --- a/configs/khadas-vim3_defconfig +++ b/configs/khadas-vim3_defconfig @@ -29,6 +29,8 @@ CONFIG_CMD_REGULATOR=y CONFIG_OF_CONTROL=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_ADC=y +CONFIG_SARADC_MESON=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_MESON=y CONFIG_DM_MMC=y From patchwork Tue Dec 15 14:42:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 344016 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp3975376jai; Tue, 15 Dec 2020 06:44:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJzwZ8Zz41CbmHkUtsnquvs2KYbCC6o3yoVuC7wmzco4szAwmES88DGv8hNnYvWV7rJwOeUG X-Received: by 2002:a50:9f4a:: with SMTP id b68mr29664017edf.296.1608043469195; Tue, 15 Dec 2020 06:44:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608043469; cv=none; d=google.com; s=arc-20160816; b=TLwKa0rvsBI/6/41TSrArbEX1fWdBvUwjbJGsQ9VoljpMRGXtmSYCv2Qaz1jvd7dwL Sly5SE9p/1HuwTrnv/vqqpUIlIWXcjhJQMeI2pwATXKdeG2HWoWaNKUo/PQaOBc4OldR o0xelWs6krh4rw3RtUnNYObcZlpQI5et0nqoY9n0wT5oxMM5ColM0btakR2aV/vMk6bT /y5Tk13UErVOeVZNkiP4+/wkCMSouJQ8s171q/dWBswV4MJB4MPVaxcBH9wpsv1d5ETh smwxGhPpBq0HuCH0/0k5n6ye+oFSz0rl5gWfM9Qwpp4xTz3WJmkVBsBo6lY8NVEjvdlq lWaQ== 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=0Xav+A+9dQCe2IQu9jP7gRV/iH3XCUGWANAZ0kxLTCI=; b=OjeGvX6+w1STtcJZ5uXs5xwxb0dFtaphCx0tyGO3supmtXPZUyGp1qoWHZCI924tg1 nT2oVsr3+dKqPkJUe8k7aMgjXW+U9e+p1ckpp3FX8/SZldI+nlOQeYPA9LNpIjYKKDrL 6TXSCWgnImTI0LMjCfo9aBv/MIXGyDPZCbgi+BgCFc2nKTOWOHEih57P7p9afSE59RLM s7G4TcfTfUdNpSl+ZzZCQaUxeWuSv94vXiVH9lkCO9WbcRMB5wVwLFfGkHpQbihfqyVc gtbc69y3vbeTAmPwapQF7m9Eao1+UZGUt8uwNU8Dtom1UYbIkYTJAq1hi+PqsI+6bmoh sm+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=hZXe+PSr; 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 j13si963330edt.512.2020.12.15.06.44.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 06:44:29 -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=hZXe+PSr; 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 30A01829D5; Tue, 15 Dec 2020 15:43:24 +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="hZXe+PSr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 89634829BB; Tue, 15 Dec 2020 15:43: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.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 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 7BB51829A8 for ; Tue, 15 Dec 2020 15:43: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 20201215144250euoutp02165313b9a5d137f2d6736ae3b00d4f49~Q6uzpf1qR1439514395euoutp02Y for ; Tue, 15 Dec 2020 14:42:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20201215144250euoutp02165313b9a5d137f2d6736ae3b00d4f49~Q6uzpf1qR1439514395euoutp02Y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608043370; bh=0Xav+A+9dQCe2IQu9jP7gRV/iH3XCUGWANAZ0kxLTCI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hZXe+PSrM2Hb1NGD00NPbub5asu+wSRvzxz5mKnQaJ1KGEEhVm1y9gzIE76oXbbpR oD7JhXi44QWyUYlqhSFJTsCnjANjp7mHydavOAg675WxX5KMLkEFfLvp/kE51IN01I 5pm3zFBtFQWdPk5dDCVr4RpZPkhklxyR1GNj2t4M= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20201215144244eucas1p2f5e3a8c465f0a6a720bc6f3462e41c55~Q6uumW1Az0232202322eucas1p28; Tue, 15 Dec 2020 14:42:44 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 32.51.44805.46BC8DF5; Tue, 15 Dec 2020 14:42:44 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201215144244eucas1p12404d7047f032e03ebcad27b88f23a25~Q6uuR4auL0484804848eucas1p1X; Tue, 15 Dec 2020 14:42:44 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201215144244eusmtrp29dfc45cdf1bb5e2a2f56451282e785b8~Q6uuRNywI2514325143eusmtrp2e; Tue, 15 Dec 2020 14:42:44 +0000 (GMT) X-AuditID: cbfec7f4-b4fff7000000af05-06-5fd8cb649563 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 43.A0.21957.46BC8DF5; Tue, 15 Dec 2020 14:42:44 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20201215144243eusmtip2baa6727add6ead2fcc3cad65ec517268~Q6utxSJAI0137801378eusmtip2D; Tue, 15 Dec 2020 14:42:43 +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 v2 5/7] button: add a simple ADC-based button driver Date: Tue, 15 Dec 2020 15:42:28 +0100 Message-Id: <20201215144230.9235-6-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201215144230.9235-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphleLIzCtJLcpLzFFi42LZduzned2U0zf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4EQBYtDhjnwMAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLLMWRmVeSWpSXmKPExsVy+t/xe7opp2/EG+z7LmqxccZ6Vosbv9pY LZ6/u8xksfbIXXaLQ33RFh2HlS2+bdnGaDFpwi82i7d7O9ktDk/9wOjA5fH+Riu7x+yGiywe 82adYPH48DHOY37ndyaPs3d2MHr0bVnF6LFx2QHmAI4oPZui/NKSVIWM/OISW6VoQwsjPUNL Cz0jE0s9Q2PzWCsjUyV9O5uU1JzMstQifbsEvYxP/a9ZCm4oVnw8sZulgXG5dBcjJ4eEgInE 3nUTmboYuTiEBJYyShyd85UVIiEjcXJaA5QtLPHnWhcbRNEnRone31cZQRJsAoYSXW9BEpwc IkCTTnZdYgUpYhZ4xCTxtKuZHSQhLOAicffzBWYQm0VAVeLTzd1gcV4BG4ndfefZITbIS6ze cACshlPAVuLPxFVgcSGgmp+ntrBPYORbwMiwilEktbQ4Nz232FCvODG3uDQvXS85P3cTIzDc tx37uXkH47xXH/UOMTJxMB5ilOBgVhLh7S29Hi/Em5JYWZValB9fVJqTWnyI0RTojonMUqLJ +cCIyyuJNzQzMDU0MbM0MLU0M1YS5906d028kEB6YklqdmpqQWoRTB8TB6dUA1OQY8+m7Qra n1NvGtoqrenccGv63gjXK5Vl/xdvncGbazLPvvL2IZNZzxQ+bti83SlSpJmvcOYjaflcXb3J 6dxMb/e81k68/XSvbXqiFQOTaNtX9dsl862Zi25uyJrM4GrKe6HXiPeF939Jxc03lGdprGqb wRz166DHXNdZ85pEXLZXzZffI17400nla1A0p9rrJRxuqg+z4/cc3uIYE6rmGF9Vma+a5eh+ 6xJHcjOP751EwTl7lzN+L3060cVbRsm9yOUhY4WyuVPd3DvRL/w/33SOT53+UpjhZ5r68U62 dJXcnRNtbWUWJGVvsfPeXp7ILGGyv3XjkZpVi6a7JrEqy/LJX3zHp3NqZ1+SEktxRqKhFnNR cSIAhMO8WAADAAA= X-CMS-MailID: 20201215144244eucas1p12404d7047f032e03ebcad27b88f23a25 X-Msg-Generator: CA X-RootMTR: 20201215144244eucas1p12404d7047f032e03ebcad27b88f23a25 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201215144244eucas1p12404d7047f032e03ebcad27b88f23a25 References: <20201215144230.9235-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 ADC-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 | 117 ++++++++++++++++++++++++++++++++++++ 3 files changed, 126 insertions(+) create mode 100644 drivers/button/button-adc.c -- 2.17.1 diff --git a/drivers/button/Kconfig b/drivers/button/Kconfig index 6b3ec7e55d..283367f2bd 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 ADC lines. 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..086c676c02 --- /dev/null +++ b/drivers/button/button-adc.c @@ -0,0 +1,117 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2020 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * Author: Marek Szyprowski + */ + +#include +#include +#include +#include +#include +#include +#include + +struct button_adc_priv { + struct udevice *adc; + int channel; +}; + +static enum button_state_t button_adc_get_state(struct udevice *dev) +{ + struct button_adc_priv *priv = dev_get_priv(dev); + unsigned int val, mask; + 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; + + ret = adc_data_mask(priv->adc, &mask); + if (ret) + return ret; + + /* getting state is simplified a bit */ + if (ret == 0) + return (val < mask / 2) ? BUTTON_ON : BUTTON_OFF; + + return ret; +} + +static int button_adc_probe(struct udevice *dev) +{ + struct button_uc_plat *uc_plat = dev_get_uclass_platdata(dev); + struct button_adc_priv *priv = dev_get_priv(dev); + struct ofnode_phandle_args args; + int ret; + + /* 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_name(UCLASS_ADC, ofnode_get_name(args.node), + &priv->adc); + if (ret) + return ret; + + priv->channel = args.args[0]; + + 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_platdata(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_alloc_size = sizeof(struct button_adc_priv), + .bind = button_adc_bind, + .probe = button_adc_probe, +}; From patchwork Tue Dec 15 14:42:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 344010 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp3974436jai; Tue, 15 Dec 2020 06:43:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJwJleOR+j7aulx/DpvE5AtjFCmKqge0Ny+cZVQWMGDbXnLG40xuLcngnQqEPnEV272gdLaE X-Received: by 2002:a17:906:1510:: with SMTP id b16mr15793814ejd.5.1608043399167; Tue, 15 Dec 2020 06:43:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608043399; cv=none; d=google.com; s=arc-20160816; b=MXcUdlo+yrNu1pSPqoBJrAmTBYGMfcG9QyphSqcZDPcPWC2Y6ftRrI/D6LpGU21zYn MraFC2lzVFIfJJzQA5LJN0V6tMOpIPCn2eFRdQgbn4G4K779K2G02NLvJji/DdN/N/+R YRGghDciiu+ItPAY5k/oX47pGNzSb7Bvo1+PPDFtwTxyfrcPg79Q0JCBneOqNIZmF1sc SJ/q0BWzG5Q4T8QBY51l4YKha4V6PWe9JyI+Oro/p6gW8Gd2a29TZP+bb5jZNB09CzEm 4Y9T+2m8+UEZ3Sf2HPKUjSZF7M7zqndI+m4HwWn+500b5nxK36Gg0VjcGb7ErgOUEiUi ZL6A== 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=JjCbe7dJUMYOKHef9/EJ+A4k4tBdZY2KTbt99YPqGHM=; b=WXkznCzjJUvIz5dRjJy4OYYpTf6YJK+7YbiBIUNT7cbp19QcXZbDccqcIL7wzYmaRC D9VCZ3u7B2DAn7dN6Y3a+dCWr3DcwBuq/YED5sGW0XtlTZpXhu7j2MZ4CnWiFPwGyi/O 9rSZyLZp9y6zqa1aMgZZfGPwHLbh6Sy/l1t8Jd3R0F0pxW8zf/3R2E/NZuunNVGuJ4pu 4+G3+hE+GnxGfaDIl4ttSU+FvRsRxPR0rX616t+PKRBRM9/HVdf4fwZlfswknk7UjA+o qn1/AoaurA/u+AsVwk0FdYjTL3zbh4utx/9o6HmyRxBeQwG2UAkHZp9U1eP6ZJpKWops Z05g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=IF+9CJTO; 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 q4si920582eds.576.2020.12.15.06.43.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 06:43:19 -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=IF+9CJTO; 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 303A8829A4; Tue, 15 Dec 2020 15:43:05 +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="IF+9CJTO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 956F3829B0; Tue, 15 Dec 2020 15:42:59 +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 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 AABF182980 for ; Tue, 15 Dec 2020 15:42:56 +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 20201215144245euoutp029c0b5e994fd1025c3a5efeef8ec62095~Q6uvp0rKs1508115081euoutp02g for ; Tue, 15 Dec 2020 14:42:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20201215144245euoutp029c0b5e994fd1025c3a5efeef8ec62095~Q6uvp0rKs1508115081euoutp02g DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608043365; bh=JjCbe7dJUMYOKHef9/EJ+A4k4tBdZY2KTbt99YPqGHM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IF+9CJTOjwC6kRypu4JJTUKIfBpiri3Wuc3xrPMio6RzwoPcIQcUjPom2F/GwdoOl 8LbS/uL/cc3Blm75GT3rZWPyBwhnMfo6yXTfSK7c07H0VJ6dLWuBk1wrMXJSSKu/E/ ykQwJLbKqKUiIr7WiVDX0bpWn5uP8wwp8vN9A16g= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20201215144245eucas1p14e88f9e5eb55176e4e85821e9c648d0c~Q6uvUT64P0481904819eucas1p1d; Tue, 15 Dec 2020 14:42:45 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id C4.36.27958.56BC8DF5; Tue, 15 Dec 2020 14:42:45 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201215144245eucas1p174ae2f6945b84f7f67528f76d0ff5939~Q6uu1DmFG0484804848eucas1p1Y; Tue, 15 Dec 2020 14:42:45 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201215144244eusmtrp2deeb7c128087876b04dfe51737d2c2e3~Q6uuuwUAY2505225052eusmtrp21; Tue, 15 Dec 2020 14:42:44 +0000 (GMT) X-AuditID: cbfec7f2-f15ff70000006d36-94-5fd8cb65cf86 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 59.DD.16282.46BC8DF5; Tue, 15 Dec 2020 14:42:44 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20201215144244eusmtip2e6a5f6540ee10d3f079fde8c1c9a1f0e~Q6uuNCoSs0557505575eusmtip2N; Tue, 15 Dec 2020 14:42:44 +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 v2 6/7] cmd: button: store button state in the 'button' env Date: Tue, 15 Dec 2020 15:42:29 +0100 Message-Id: <20201215144230.9235-7-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201215144230.9235-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplleLIzCtJLcpLzFFi42LZduzned3U0zfiDbYtlLXYOGM9q8WNX22s Fs/fXWayWHvkLrvFob5oi47DyhbftmxjtJg04Rebxdu9newWh6d+YHTg8nh/o5XdY3bDRRaP ebNOsHh8+BjnMb/zO5PH2Ts7GD36tqxi9Ni47ABzAEcUl01Kak5mWWqRvl0CV8b+mauYCm6z Vrxa+oOtgfESSxcjJ4eEgInE4ytnWLsYuTiEBFYwSmxbfI4FwvnCKHFxx1+ozGdGic/9z5lg WtbOfMQMkVjOKPFj4RY2uJa2ec/YQKrYBAwlut52gdkiAkYSl5p2gM1lFrjDJNE1uQFsu7CA t8S2vzeZQWwWAVWJxobLYDavgI1E1/Y7UOvkJVZvOAAW5xSwlfgzcRU7yCAJgQMcEl1/5kC9 4SJx4uAXdghbWOLV8S1QtozE/53zmSAamhklHp5bC9XdwyhxuWkGI0SVtcSdc7+AbuUAuk9T Yv0ufYiwo8SRuW9YQMISAnwSN94KgoSZgcxJ26YzQ4R5JTrahCCq1SRmHV8Ht/bghUvMELaH xKrWB9DgmsAosfnaAbYJjPKzEJYtYGRcxSieWlqcm55abJiXWq5XnJhbXJqXrpecn7uJEZhi Tv87/mkH49xXH/UOMTJxMB5ilOBgVhLh7S29Hi/Em5JYWZValB9fVJqTWnyIUZqDRUmc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iioyD y3/VK05PpjcbiYhO/F2d4CarcM5M2djvzu6flvmG82rMI/mCcpkkGpr4lvlNvTLP6PgWj/vN Rv6RuYI5huefH2no9f/HtW/1rvVNLFdYWd22tfTtsK/+EsQQc2Vy3NZzArEmQSlGgoUahpZL qjfNaZKVWj5TKep2f4pbseev9R4h5isnKVb2XtwYa73c/ui/Nz/j1p4zW3bLnFfpWQfHpwOe 5sfKzT2b/y5J038cm7PnWHWkz9f2pMliQrJ2bSt0O7XCN/FJdTm8Zei3XDO9ereL1uP+zVd/ dF17p3d0y5/MxZeaFszuubn0p8n0JL01i2vYqhhyDGTqGPsTtlrdrvvesF+JpTgj0VCLuag4 EQA6xsYa/wIAAA== X-CMS-MailID: 20201215144245eucas1p174ae2f6945b84f7f67528f76d0ff5939 X-Msg-Generator: CA X-RootMTR: 20201215144245eucas1p174ae2f6945b84f7f67528f76d0ff5939 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201215144245eucas1p174ae2f6945b84f7f67528f76d0ff5939 References: <20201215144230.9235-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 Save examined button state in 'button' environment variable to enable checking button state in the scripts. Signed-off-by: Marek Szyprowski Change-Id: I78b539e1516573fcfea4401f75469291844daae4 --- cmd/button.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/cmd/button.c b/cmd/button.c index 64c5a8fa04..8da911068a 100644 --- a/cmd/button.c +++ b/cmd/button.c @@ -23,8 +23,10 @@ static int show_button_state(struct udevice *dev) ret = button_get_state(dev); if (ret >= BUTTON_COUNT) ret = -EINVAL; - if (ret >= 0) + if (ret >= 0) { printf("%s\n", state_label[ret]); + env_set("button", state_label[ret]); + } return ret; } From patchwork Tue Dec 15 14:42: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: 344011 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp3974595jai; Tue, 15 Dec 2020 06:43:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxTj6MOSwptn/hfRTL/KXnbTMBB5Jab/mhZpgyDbEGc3f6SPqhUaLqsi4PaAQ/K1mId4hrZ X-Received: by 2002:a05:6402:104e:: with SMTP id e14mr16414072edu.316.1608043411158; Tue, 15 Dec 2020 06:43:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608043411; cv=none; d=google.com; s=arc-20160816; b=wi4ZIB/AZVorcCApUHaARhdgqo8HRtjYcRyn4URZRzqz0OtPOr7qyS4ZsLdh3lMtJP TGTbqSx+856xpEV+TJD3HR/FugyWH4gwPX4HKRGump/FJCZ/kgCHBw3w2apX2G2ANon8 kFMD1+hhfwHSyppKWpEx8LcEDNlaIiIakuhu7ZuEkJ37uUeuL8rOHK6jb1AOJpoo2P7x qxG3Rm154L/cmO6EN6oY96Azs3CR2E/99RtkSGDpUmOEvPIjLbfSJOG8FAbuvf7DIZtJ Lm5OCLIXyatpBmISr6h4xhAi4XjFppENq5MSHtXNjzgKCDMOE/E/tUfl97elZDfau3p6 5Oqw== 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=td8uawKm1W8t8Dtxc9yvshPvyyJ1X5yUjQUrR9tBTM4=; b=MECcdn0Uj710HX0bQaMPUoHsPJu/NxieXyZ5WdoD/oAigKOW95wjq4Ca3OrX+rcKfP ci/8Kvm5cxluhawyz029rZkG8ZCiN+0s2XDl2dtepYh3VlHN4gC6q/qEW851AzeUhK6V LLwg/zzXGRNA8vBtBzfFo3QA6YroK4AdaEz+GBAx7UFHTanqP9vOYzbwTBeTviDsgt3M WQk1aT+rL//M9xRviYDVQupQMHJJRFVpA+428qg0sgSmyBW1tv85aR41eZIxX1tWTxW3 39RykbyySa1X296e73yd0l7P1gye4ZSzWv2e2NvviSboQTiVdvkgsCZoNXPv8plY6fp7 4pSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=lAbLSzkU; 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 j10si947079edt.142.2020.12.15.06.43.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 06:43:31 -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=lAbLSzkU; 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 36B5C829B9; Tue, 15 Dec 2020 15:43:11 +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="lAbLSzkU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 52970829B2; Tue, 15 Dec 2020 15:43:04 +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 959D7829A1 for ; Tue, 15 Dec 2020 15:42:57 +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 20201215144246euoutp011f4f532b0cfcf66c2f2c3a0dfbc35e02~Q6uwfaHD21401814018euoutp01M for ; Tue, 15 Dec 2020 14:42:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20201215144246euoutp011f4f532b0cfcf66c2f2c3a0dfbc35e02~Q6uwfaHD21401814018euoutp01M DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608043366; bh=td8uawKm1W8t8Dtxc9yvshPvyyJ1X5yUjQUrR9tBTM4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lAbLSzkUq99e5jyG1tUMkpQzgcusrxAmelqE1NuJJRaUoUDcizKfVFi0EOlmG/Ag8 D3zQ4iuH7C8SZIlP2V0u2GuIlfTa/b8Go9zsWvwJv9hK4hux+boM+IBlY1tT31rgDM OMds/qgyuLUwL1fwavDuOVMqgbhQIZNQbWgPnF4g= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20201215144245eucas1p2d245f34c037b7d045b8a7ddbd41c525a~Q6uvps6r40385003850eucas1p2L; Tue, 15 Dec 2020 14:42:45 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 06.36.27958.56BC8DF5; Tue, 15 Dec 2020 14:42:45 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201215144245eucas1p112636015eaba5f50cc79044080ce9fed~Q6uvNTOoo0484804848eucas1p1Z; Tue, 15 Dec 2020 14:42:45 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201215144245eusmtrp26dad99da9eb3fa4c9e9ea1dad8899ffe~Q6uvMn_3L2505225052eusmtrp25; Tue, 15 Dec 2020 14:42:45 +0000 (GMT) X-AuditID: cbfec7f2-f15ff70000006d36-96-5fd8cb659b9f Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 4A.DD.16282.56BC8DF5; Tue, 15 Dec 2020 14:42:45 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20201215144244eusmtip2e74563252e8e7e76dee40710befc2b47~Q6uuq-pqb0137801378eusmtip2E; Tue, 15 Dec 2020 14:42:44 +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 v2 7/7] configs: khadas-vim3: enable Function button support Date: Tue, 15 Dec 2020 15:42:30 +0100 Message-Id: <20201215144230.9235-8-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201215144230.9235-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0VSZ0xTYRTN9zaNNc+6PnGQ1IEaBYtgnjMa1Dwiiko07lLtE5Rl+sAZkqqg UhSwFcE2iAtHGYJixZUUFKoiWKQCRoziJDVFiiCCoFIe4r9zzz3n3nu+fBQqScLdqR1RMZwq ShEhJUSYqbyzajpXUS+foU/yYQozruNMfdcRnPnSXIMweY/ekExp8kbm2MPxzI8iE2C0qV0E 43iQSDIP01rAQhH7rT6BZA3qaow9q3+MsS3OLWxWYgfCVjYUAza5yAjYwstmdCW1QTRPyUXs 2M2pvBeEiMISczrRXc3Y3ifVSbga6DENoChI+0LrhzgNEFES+iqAje02VCjaALxkaCCE4juA t3tMA46jyTKBvwJgXnUZNuCwX/jca3ejCFoGNQ4N4cLDaB/44lBxnwilGxCo0akxV2MoHQg/ xRfjLozRE6H1u76PF9PzoOlad98gSHvAnAJzH3aj58Puk0bSNQjSjyiYmf0TEUSLoS3TRgh4 KLRbikgBj4F/7mQhguFwb7qqvH73cQBrDmUAQTUXNlR1Ea5wKD0FXr/rLdCLoL6iChUyD4b1 jiEuGu2FWlN6Py2Gx45IBPUkqLfkD6wtsb7ov5+FHeWX+p8xFUDdzY9YKvDQ/192DgAjGMnF 8pGhHC+L4vZ48YpIPjYq1GtbdOQN0PtfKn5bWotBpt3pVQoQCpQCSKHSYeITsXVyiVip2Lef U0XLVbERHF8KRlOYdKTYaMiVS+hQRQwXznG7ONW/LkK5uauRUyHt1vMvK+Xj/EtmN3VEK50X Z3WfmElvmnETmWxJsOaPbdqtOR9JvvOT5tuWxU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dWTf9KBdbXlz39XbJ9YlMKsct5n1+pfPHsMnPr6WPwMOx7ZOZlaS maCcxdkiLjcrMKgrr6y+rf3QrGiJuf561VmHvrZWGj7cM39+lKLtEYPFd7VO39Kq+rtwU982 yXIr7ofPzn0SPPhVzSNts9+v7b+uGR2/yGW3xjq0p8QqlomnqerhYTnxj8kzH+1wPurdPXvz qwwxr81H/8wIcWS5MlN8c7yZhY5JYVtzQffE4NnHb518tOJ27CIrubgbQZprHooosRRnJBpq MRcVJwIA2sepIP8CAAA= X-CMS-MailID: 20201215144245eucas1p112636015eaba5f50cc79044080ce9fed X-Msg-Generator: CA X-RootMTR: 20201215144245eucas1p112636015eaba5f50cc79044080ce9fed X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201215144245eucas1p112636015eaba5f50cc79044080ce9fed References: <20201215144230.9235-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 needed to check the 'Function' button state. Signed-off-by: Marek Szyprowski --- configs/khadas-vim3_defconfig | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 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