From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5DDE3C433F5 for ; Mon, 2 May 2022 11:03:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1nJZFqoJP9+FMBi9ursiNvPDDRKnCCtAcWTSg2bQvXI=; b=CCYgkCsXIczhD/Pj+xzyaUcbWs TFLY48oOKwBIvouytH08WXtLnrcLAremsZ5EPvPcPDLC2iNsunpOb35hwVQItqt20FPGx1Msfhzk7 hDssutHprETA21l/FqBGoFGSKaTt2VBsJI2OvHUMET8gm2Tp5KTBBN/izcvmkYcb1rYAXxC7Sej0Y KERhgY+CbrRmQk32kv0DLJDOpGLTaftZ5owI1awzAbPOXmA5NHSG0kndPDeXcL/nWf+aZgHutdLDF XvqGrkOTGmwhDBj2NjchSHZCH498jruFfpv0IFvcB3oyXKP/g+b5/F+CbXEwyYMl5taBYuNPOblKn Xl8HPlgg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlTn7-000sSb-1Y; Mon, 02 May 2022 11:00:33 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlTn3-000sQN-Dw for linux-arm-kernel@lists.infradead.org; Mon, 02 May 2022 11:00:31 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 7E4465C00D3; Mon, 2 May 2022 07:00:14 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 02 May 2022 07:00:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1651489214; x=1651575614; bh=ItYICrTgTo hpwpBDhrRzrv8Mk71TJQUctJQK+kNCaEg=; b=LYscJNJ6Guke04cT64YEDVdjPk ZMKEn58Y41ffSfK8puh+bLL8Il/6dVJCwe4qSMJUNXWfMqBNmftpGAynZlUzbSQr aED+fki4Eq7DLKNWXZb6F0qa3RwbxEn+/eO11NZQglhXj14J7eDz+6lPWx5wEx2P No6/xGxh2vzIYk5eOlF4t8FWICQwJ3oyaYmqRy2a4745Ef3XdRUcRfe8UAOaHnht gKajLcDMaCbFe8bopUKxsWkB+QTdov7Ym4McXAZLAS13P13UMbwQOyJUY0wsVvs4 p0yVsFzj9negvdfW9yMcI2XEt2VNY+w09LXuCxDTlTvIE58pF1tMxu+tFg2g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1651489214; x= 1651575614; bh=ItYICrTgTohpwpBDhrRzrv8Mk71TJQUctJQK+kNCaEg=; b=f NJxWMgo52DAUSvr5ppVD+jC98ovCq/y/mMenmbrdp1EDOWqHv4+xjHNd9jMw+aoA 7vDzbEfF0CJMBMc398il+QjxgJFmtskl12ypCYCMldCTPlTExBPk/uQGCs29N61N CRC9XF90FvFRnHCLN5uqoIqsPEZ8hf/PQf7XkFuolTHaVksroukqiM4O6NbEWBXH r7u+9Ujfwui2a/QraPDLfb5wuXQyLACkhhWvdVkWXBrLscWzhObwOeHPRw0hBT+x b6+56x+V39044xAn9XmHlEOivbXdjY0qSg35eN1DrKzTgUEOZZTHhehertKdRkKP ftdQgGe+2vQWGjy7JQlHg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdehgdeffecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepteefffefgfektdefgfeludfgtdejfeejvddttdekteeiffejvdfgheehfffh vedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmh grgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 2 May 2022 07:00:12 -0400 (EDT) Date: Mon, 2 May 2022 13:00:10 +0200 From: Maxime Ripard To: Ruslan Zalata Cc: Guenter Roeck , Jean Delvare , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: Re: [PATCH v2] hwmon: (sun4i-lradc) Add driver for LRADC found on Allwinner A13/A20 SoC Message-ID: <20220502110010.q7vvdkdpaiz5acjl@houat> References: <20220428210906.29527-1-rz@fabmicro.ru> MIME-Version: 1.0 In-Reply-To: <20220428210906.29527-1-rz@fabmicro.ru> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220502_040030_192525_AB61BD19 X-CRM114-Status: GOOD ( 24.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============4241483854885870434==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============4241483854885870434== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jlw5hd26lnyezkda" Content-Disposition: inline --jlw5hd26lnyezkda Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Thu, Apr 28, 2022 at 09:09:03PM +0000, Ruslan Zalata wrote: > Some Allwinner SoCs like A13, A20 or T2 are equipped with two-channel > low rate (6 bit) ADC that is often used for extra keys. There's a driver > for that already implementing standard input device, but it has these > limitations: 1) it cannot be used for general ADC data equisition, and > 2) it uses only one LRADC channel of two available. >=20 > This driver provides basic hwmon interface to both channels of LRADC on > such Allwinner SoCs. >=20 > Signed-off-by: Ruslan Zalata > --- > MAINTAINERS | 6 + > drivers/hwmon/Kconfig | 13 ++ > drivers/hwmon/Makefile | 1 + > drivers/hwmon/sun4i-lradc-hwmon.c | 280 ++++++++++++++++++++++++++++++ > 4 files changed, 300 insertions(+) > create mode 100644 drivers/hwmon/sun4i-lradc-hwmon.c >=20 > diff --git a/MAINTAINERS b/MAINTAINERS > index 5e8c2f61176..d9c71e94133 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -18861,6 +18861,12 @@ S: Maintained > F: Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-key= s.yaml > F: drivers/input/keyboard/sun4i-lradc-keys.c > =20 > +SUN4I LOW RES ADC HWMON DRIVER > +M: Ruslan Zalata > +L: linux-hwmon@vger.kernel.org > +S: Maintained > +F: drivers/hwmon/sun4i-lradc-hwmon.c > + > SUNDANCE NETWORK DRIVER > M: Denis Kirjanov > L: netdev@vger.kernel.org > diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig > index 68a8a27ab3b..86776488a81 100644 > --- a/drivers/hwmon/Kconfig > +++ b/drivers/hwmon/Kconfig > @@ -1691,6 +1691,19 @@ config SENSORS_SIS5595 > This driver can also be built as a module. If so, the module > will be called sis5595. > =20 > +config SENSORS_SUN4I_LRADC > + tristate "Allwinner A13/A20 LRADC hwmon" > + depends on ARCH_SUNXI && !KEYBOARD_SUN4I_LRADC > + help > + Say y here to support the LRADC found in Allwinner A13/A20 SoCs. > + Both channels are supported. > + > + This driver can also be built as module. If so, the module > + will be called sun4i-lradc-hwmon. > + > + This option is not compatible with KEYBOARD_SUN4I_LRADC, one > + of these must be used at a time. How do you plan on enforcing that? I guess a better path forward would be to either register an hwmon device in the original driver, or convert that driver to iio and use iio-hwmon. Maxime --jlw5hd26lnyezkda Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYm+5ugAKCRDj7w1vZxhR xWLTAQCboX/1BSKFvZS12C8iuG73rMmjtoEPp7an4m1k3cxlmQEA1j3nBoQoAViK ntBC9sXc867rFYwx0NGyOqdWhao8Ywk= =5vhh -----END PGP SIGNATURE----- --jlw5hd26lnyezkda-- --===============4241483854885870434== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============4241483854885870434==--