lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52a7c00a-6638-420b-a65b-208491c55074@collabora.com>
Date: Tue, 22 Oct 2024 11:49:51 +0200
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
To: Yassine Oudjana <yassine.oudjana@...il.com>
Cc: 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>,
 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 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@...labora.com> wrote:
>> 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.
> 
> 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

>>
> 
> 




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ