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 E2524C25B08 for ; Wed, 17 Aug 2022 10:02:54 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Qotg8rfAiu3H2K8YTa4teu+V6KIf4/dtvz95bATqZHI=; b=zkFle2c55h4bam RQj9BKq2ONrd/1Qrh10L39H3Lpo5AKPUlZSEIQf46zptZMuiwEI5zghEqbRRVJsQ2NLxOmzrjCZKc 1UxFry7sF26IzPCSEqiwJqOAneNCzz7KuA5QthDJmIId52PMPtIiiaJb5VXiFMovkB6KJQgwBFesf j65ASuZmnwdE1Exd4jgWgbg18+bE7IxCpCQ0IsLOyNQfHsKYQleJm4sOdULz0dsvXLSS8a2LV8JqF /OBqMsx0aE9K4Z9lUxrOLGeDebHhOb2g/ruycz2rRP4/uaRphATPLHt/TV57Papo1Fag0s+PPjW97 ebt/Fa/92vAbtAc/TExg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOFrn-000BCe-0i; Wed, 17 Aug 2022 10:01:39 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOFrg-000AkQ-Qf for linux-arm-kernel@lists.infradead.org; Wed, 17 Aug 2022 10:01:36 +0000 Received: from ip5b412258.dynamic.kabel-deutschland.de ([91.65.34.88] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oOFrW-0001ZB-2Q; Wed, 17 Aug 2022 12:01:22 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Samuel Holland Cc: Liam Girdwood , Mark Brown , Chen-Yu Tsai , Jernej Skrabec , Krzysztof Kozlowski , Rob Herring , linux-arm-kernel@lists.infradead.org, Maxime Ripard , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: Re: [PATCH v3 2/4] regulator: sun20i: Add support for Allwinner D1 LDOs Date: Wed, 17 Aug 2022 12:01:21 +0200 Message-ID: <5212752.LvFx2qVVIh@diego> In-Reply-To: <1c172085-9586-b612-8600-776e8a394f12@sholland.org> References: <20220815043436.20170-1-samuel@sholland.org> <37742446.J2Yia2DhmK@diego> <1c172085-9586-b612-8600-776e8a394f12@sholland.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220817_030132_895571_37B92993 X-CRM114-Status: GOOD ( 30.02 ) 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: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Am Mittwoch, 17. August 2022, 10:28:40 CEST schrieb Samuel Holland: > On 8/15/22 12:00 PM, Heiko St=FCbner wrote: > > Am Montag, 15. August 2022, 06:34:33 CEST schrieb Samuel Holland: > >> D1 contains two pairs of LDOs. Since they have similar bindings, and > >> they always exist together, put them in a single driver. > >> > >> The analog LDOs are relatively boring, with a single linear range. The= ir > >> one quirk is that a bandgap reference must be calibrated for them to > >> produce the correct voltage. > >> > >> The system LDOs have the complication that their voltage step is not an > >> integer, so a custom .list_voltage is needed to get the rounding right. > >> > >> Signed-off-by: Samuel Holland > >> --- > >> > >> Changes in v3: > >> - Adjust control flow in sun20i_regulator_get_regmap() for clarity > >> > >> Changes in v2: > >> - Use decimal numbers for .n_voltages instead of field widths > >> - Get the regmap from the parent device instead of a property/phandle > >> > >> drivers/regulator/Kconfig | 8 + > >> drivers/regulator/Makefile | 1 + > >> drivers/regulator/sun20i-regulator.c | 232 +++++++++++++++++++++++++++ > >> 3 files changed, 241 insertions(+) > >> create mode 100644 drivers/regulator/sun20i-regulator.c > >> > >> diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig > >> index 23e3e4a35cc9..0c5727173fa0 100644 > >> --- a/drivers/regulator/Kconfig > >> +++ b/drivers/regulator/Kconfig > >> @@ -1262,6 +1262,14 @@ config REGULATOR_STW481X_VMMC > >> This driver supports the internal VMMC regulator in the STw481x > >> PMIC chips. > >> = > >> +config REGULATOR_SUN20I > >> + tristate "Allwinner D1 internal LDOs" > >> + depends on ARCH_SUNXI || COMPILE_TEST > >> + depends on MFD_SYSCON && NVMEM > >> + default ARCH_SUNXI > >> + help > >> + This driver supports the internal LDOs in the Allwinner D1 SoC. > >> + > >> config REGULATOR_SY7636A > >> tristate "Silergy SY7636A voltage regulator" > >> help > >> diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile > >> index fa49bb6cc544..5dff112eb015 100644 > >> --- a/drivers/regulator/Makefile > >> +++ b/drivers/regulator/Makefile > >> @@ -148,6 +148,7 @@ obj-$(CONFIG_REGULATOR_STM32_VREFBUF) +=3D stm32-v= refbuf.o > >> obj-$(CONFIG_REGULATOR_STM32_PWR) +=3D stm32-pwr.o > >> obj-$(CONFIG_REGULATOR_STPMIC1) +=3D stpmic1_regulator.o > >> obj-$(CONFIG_REGULATOR_STW481X_VMMC) +=3D stw481x-vmmc.o > >> +obj-$(CONFIG_REGULATOR_SUN20I) +=3D sun20i-regulator.o > >> obj-$(CONFIG_REGULATOR_SY7636A) +=3D sy7636a-regulator.o > >> obj-$(CONFIG_REGULATOR_SY8106A) +=3D sy8106a-regulator.o > >> obj-$(CONFIG_REGULATOR_SY8824X) +=3D sy8824x.o > >> diff --git a/drivers/regulator/sun20i-regulator.c b/drivers/regulator/= sun20i-regulator.c > >> new file mode 100644 > >> index 000000000000..46f3927d7d10 > >> --- /dev/null > >> +++ b/drivers/regulator/sun20i-regulator.c > >> @@ -0,0 +1,232 @@ > >> +// SPDX-License-Identifier: GPL-2.0-only > >> +// > >> +// Copyright (c) 2021-2022 Samuel Holland > >> +// > > = > > nit: shouldn't the comment look like > > /* > > * Copyright (c) 2021-2022 Samuel Holland > > */ > = > I have had multiple requests from maintainers to use the former style bec= ause it > is more visually consistent. `git grep '^// Copy' drivers sound` returns = over > 1500 hits. But it doesn't really matter to me. ok ... I guess that is something that's changing then :-) I just looked into some drivers and the coding-style rst document, but I guess it's the maintainer's call how this should look. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel