From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Yassine Oudjana <yassine.oudjana@gmail.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Sen Chu <sen.chu@mediatek.com>,
Sean Wang <sean.wang@mediatek.com>,
Macpaul Lin <macpaul.lin@mediatek.com>,
Lee Jones <lee@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
jason-ch chen <Jason-ch.Chen@mediatek.com>,
Chen Zhong <chen.zhong@mediatek.com>,
Flora Fu <flora.fu@mediatek.com>,
Alexandre Mergnat <amergnat@baylibre.com>,
Yassine Oudjana <y.oudjana@protonmail.com>,
linux-input@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH 5/6] regulator: Add driver for MediaTek MT6328 PMIC regulators
Date: Tue, 22 Oct 2024 11:49:51 +0200 [thread overview]
Message-ID: <52a7c00a-6638-420b-a65b-208491c55074@collabora.com> (raw)
In-Reply-To: <04OPLS.YYQIIIW9J73R3@gmail.com>
Il 21/10/24 16:55, Yassine Oudjana ha scritto:
>
> On Mon, Oct 21 2024 at 15:24:51 +02:00:00, AngeloGioacchino Del Regno
> <angelogioacchino.delregno@collabora.com> wrote:
>> Il 18/10/24 10:10, Yassine Oudjana ha scritto:
>>> From: Yassine Oudjana <y.oudjana@protonmail.com>
>>>
>>> Add a driver for the regulators on the MT6328 PMIC.
>>>
>>> Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.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.
>>> \x7f+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@protonmail.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.
>
> I can't seem to fit even the first one in 2 lines in under 90 columns :/
> That is unless I don't indent the second line:
>
> MT6328_BUCK("buck_vpa", VPA, 500000, 3650000, 50000, buck_volt_range1,
> MT6328_VPA_CON9, MT6328_VPA_CON11, 0x3f, MT6328_VPA_CON12, MT6328_VPA_CON7),
>
> Which I don't think is what you meant by fixing the indentation. Can you show me an
> example? With 100 columns on the other hand it seems like they should fit.
I can get that one specifically to 96 columns... it's okay.
Just don't get over 100 columns please: if a few need 3 lines, they just do.
Anyway, here's an example:
MT6328_BUCK("buck_vpa", VPA, 500000, 3650000, 50000, buck_volt_range1, MT6328_VPA_CON9,
MT6328_VPA_CON11, 0x3f, MT6328_VPA_CON12, MT6328_VPA_CON7),
...since I'm not sure that this will render correctly in the outgoing email, here's
another example:
MT6328_BUCK("buck_something", SOMETHING, params, blahblah, thisandthat,
something_else),
Cheers,
Angelo
>>
>
>
next prev parent reply other threads:[~2024-10-22 10:14 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-18 8:10 [PATCH 0/6] MediaTek MT6735+MT6328 SoC/PMIC pair base support Yassine Oudjana
2024-10-18 8:10 ` [PATCH 1/6] dt-bindings: mediatek: pwrap: Add MT6735 compatible Yassine Oudjana
2024-10-18 13:38 ` Rob Herring (Arm)
2024-10-21 13:25 ` AngeloGioacchino Del Regno
2024-10-18 8:10 ` [PATCH 2/6] dt-bindings: mfd: mediatek: mt6397: Add bindings for MT6328 Yassine Oudjana
2024-10-18 13:38 ` Rob Herring (Arm)
2024-10-21 13:25 ` AngeloGioacchino Del Regno
2024-10-31 16:19 ` Lee Jones
2024-11-19 13:50 ` Rob Herring
2024-10-18 8:10 ` [PATCH 3/6] soc: mediatek: pwrap: Add support for MT6735 and MT6328 SoC/PMIC pair Yassine Oudjana
2024-10-21 13:25 ` AngeloGioacchino Del Regno
2024-10-21 14:48 ` Yassine Oudjana
2024-10-22 9:44 ` AngeloGioacchino Del Regno
2024-11-06 11:30 ` Yassine Oudjana
2024-10-18 8:10 ` [PATCH 4/6] mfd: mt6397: Add initial support for MT6328 Yassine Oudjana
2024-10-21 13:24 ` AngeloGioacchino Del Regno
2024-10-21 14:39 ` Yassine Oudjana
2024-10-22 15:20 ` AngeloGioacchino Del Regno
2024-10-31 16:25 ` (subset) " Lee Jones
2024-10-18 8:10 ` [PATCH 5/6] regulator: Add driver for MediaTek MT6328 PMIC regulators Yassine Oudjana
2024-10-21 13:24 ` AngeloGioacchino Del Regno
2024-10-21 14:55 ` Yassine Oudjana
2024-10-22 9:49 ` AngeloGioacchino Del Regno [this message]
2024-10-22 16:31 ` Mark Brown
2024-10-18 8:10 ` [PATCH 6/6] Input: mtk-pmic-keys - Add support for MT6328 Yassine Oudjana
2024-10-18 19:09 ` Dmitry Torokhov
2024-10-21 13:24 ` AngeloGioacchino Del Regno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52a7c00a-6638-420b-a65b-208491c55074@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--cc=Jason-ch.Chen@mediatek.com \
--cc=amergnat@baylibre.com \
--cc=broonie@kernel.org \
--cc=chen.zhong@mediatek.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=flora.fu@mediatek.com \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=macpaul.lin@mediatek.com \
--cc=matthias.bgg@gmail.com \
--cc=robh@kernel.org \
--cc=sean.wang@mediatek.com \
--cc=sen.chu@mediatek.com \
--cc=y.oudjana@protonmail.com \
--cc=yassine.oudjana@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).