[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4cf5a3d0-97a2-4a43-a91a-0a35aa2bc7e4@collabora.com>
Date: Mon, 21 Oct 2024 15:24:51 +0200
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
To: Yassine Oudjana <yassine.oudjana@...il.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, Sen Chu <sen.chu@...iatek.com>,
Sean Wang <sean.wang@...iatek.com>, Macpaul Lin <macpaul.lin@...iatek.com>,
Lee Jones <lee@...nel.org>, Matthias Brugger <matthias.bgg@...il.com>,
Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
jason-ch chen <Jason-ch.Chen@...iatek.com>,
Chen Zhong <chen.zhong@...iatek.com>, Flora Fu <flora.fu@...iatek.com>,
Alexandre Mergnat <amergnat@...libre.com>
Cc: Yassine Oudjana <y.oudjana@...tonmail.com>, linux-input@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH 5/6] regulator: Add driver for MediaTek MT6328 PMIC
regulators
Il 18/10/24 10:10, Yassine Oudjana ha scritto:
> From: Yassine Oudjana <y.oudjana@...tonmail.com>
>
> Add a driver for the regulators on the MT6328 PMIC.
>
> Signed-off-by: Yassine Oudjana <y.oudjana@...tonmail.com>
> ---
> drivers/regulator/Kconfig | 9 +
> drivers/regulator/Makefile | 1 +
> drivers/regulator/mt6328-regulator.c | 479 +++++++++++++++++++++
> include/linux/regulator/mt6328-regulator.h | 49 +++
> 4 files changed, 538 insertions(+)
> create mode 100644 drivers/regulator/mt6328-regulator.c
> create mode 100644 include/linux/regulator/mt6328-regulator.h
>
> diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
> index 249933d6388dd..e9b9faff67f3a 100644
> --- a/drivers/regulator/Kconfig
> +++ b/drivers/regulator/Kconfig
> @@ -862,6 +862,15 @@ config REGULATOR_MT6323
> This driver supports the control of different power rails of device
> through regulator interface.
>
> +config REGULATOR_MT6328
> + tristate "MediaTek MT6328 PMIC"
> + depends on MFD_MT6397
> + help
> + Say y here to select this option to enable the power regulator of
> + MediaTek MT6328 PMIC.
> + This driver supports the control of different power rails of device
> + through regulator interface.
> +
> config REGULATOR_MT6331
> tristate "MediaTek MT6331 PMIC"
> depends on MFD_MT6397
> diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile
> index 9b69546fb3f65..c1a5a44413198 100644
> --- a/drivers/regulator/Makefile
> +++ b/drivers/regulator/Makefile
> @@ -103,6 +103,7 @@ obj-$(CONFIG_REGULATOR_MPQ7920) += mpq7920.o
> obj-$(CONFIG_REGULATOR_MT6311) += mt6311-regulator.o
> obj-$(CONFIG_REGULATOR_MT6315) += mt6315-regulator.o
> obj-$(CONFIG_REGULATOR_MT6323) += mt6323-regulator.o
> +obj-$(CONFIG_REGULATOR_MT6328) += mt6328-regulator.o
> obj-$(CONFIG_REGULATOR_MT6331) += mt6331-regulator.o
> obj-$(CONFIG_REGULATOR_MT6332) += mt6332-regulator.o
> obj-$(CONFIG_REGULATOR_MT6357) += mt6357-regulator.o
> diff --git a/drivers/regulator/mt6328-regulator.c b/drivers/regulator/mt6328-regulator.c
> new file mode 100644
> index 0000000000000..e15a64404f494
> --- /dev/null
> +++ b/drivers/regulator/mt6328-regulator.c
> @@ -0,0 +1,479 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * MediaTek MT6328 regulator driver
> + * Based on MT6323 driver.
> + *
> + * Copyright (c) 2016 MediaTek Inc.
> + * Copyright (c) 2022 Yassine Oudjana <y.oudjana@...tonmail.com>
> + */
> +
..snip..
> +/* The array is indexed by id(MT6328_ID_XXX) */
> +static struct mt6328_regulator_info mt6328_regulators[] = {
> + MT6328_BUCK("buck_vpa", VPA, 500000, 3650000, 50000,
> + buck_volt_range1, MT6328_VPA_CON9, MT6328_VPA_CON11, 0x3f,
> + MT6328_VPA_CON12, MT6328_VPA_CON7),
Can you please fix the indentation?
Also, all of those entries do fit in two lines, I checked a couple of those
and always ended up with less than 90 columns anyway.
After which,
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
Powered by blists - more mailing lists