diff mbox series

[v2,5/9] regulator: rt5033: Change regulator names to lowercase

Message ID d4218947e354aee45589acb1060ce41727a26750.1681646904.git.jahau@rocketmail.com
State New
Headers show
Series [v2,1/9] mfd: rt5033: Drop rt5033-battery sub-device | expand

Commit Message

Jakob Hauser April 16, 2023, 12:44 p.m. UTC
Lowercase is preferred for node names.

Cc: Beomho Seo <beomho.seo@samsung.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>
Cc: Axel Lin <axel.lin@ingics.com>
Cc: ChiYuan Huang <cy_huang@richtek.com>
Signed-off-by: Jakob Hauser <jahau@rocketmail.com>
---
 drivers/regulator/rt5033-regulator.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Krzysztof Kozlowski April 16, 2023, 6:32 p.m. UTC | #1
On 16/04/2023 14:44, Jakob Hauser wrote:
> Lowercase is preferred for node names.
> 

This will break all existing users. In-tree and out-of-tree. Where is
the binding update?

Best regards,
Krzysztof
Jakob Hauser April 18, 2023, 9:24 p.m. UTC | #2
Hi Krzysztof,

On 16.04.23 20:32, Krzysztof Kozlowski wrote:
> On 16/04/2023 14:44, Jakob Hauser wrote:
>> Lowercase is preferred for node names.
> 
> This will break all existing users. In-tree and out-of-tree. Where is
> the binding update?

In my reply to Rob's comments in v1 I was pointing out that this will 
affect an existing driver. There was no reaction.

As far as I can see, there is no in-tree usage yet. Though I can't tell 
about out-of-tree usage. Although if there is, adding the rt5033-charger 
driver might already causes the need for changes.

Well, to stay on the safe side, I'll drop this patch in v3 and will 
change the bindings (patch 9) back to uppercase.

Kind regards,
Jakob
Krzysztof Kozlowski April 19, 2023, 8:40 a.m. UTC | #3
On 18/04/2023 23:24, Jakob Hauser wrote:
> Hi Krzysztof,
> 
> On 16.04.23 20:32, Krzysztof Kozlowski wrote:
>> On 16/04/2023 14:44, Jakob Hauser wrote:
>>> Lowercase is preferred for node names.
>>
>> This will break all existing users. In-tree and out-of-tree. Where is
>> the binding update?
> 
> In my reply to Rob's comments in v1 I was pointing out that this will 
> affect an existing driver. There was no reaction.
> 
> As far as I can see, there is no in-tree usage yet. Though I can't tell 
> about out-of-tree usage. Although if there is, adding the rt5033-charger 
> driver might already causes the need for changes.
> 
> Well, to stay on the safe side, I'll drop this patch in v3 and will 
> change the bindings (patch 9) back to uppercase.
> 

Your v1 binding patch did not explain that you document existing ABI, so
you got comments like for a new binding. This is not really new binding,
is it?

Best regards,
Krzysztof
Jakob Hauser April 19, 2023, 10:21 p.m. UTC | #4
Hi Krzysztof,

On 19.04.23 10:40, Krzysztof Kozlowski wrote:
> On 18/04/2023 23:24, Jakob Hauser wrote:
>> On 16.04.23 20:32, Krzysztof Kozlowski wrote:
>>> On 16/04/2023 14:44, Jakob Hauser wrote:
>>>> Lowercase is preferred for node names.
>>>
>>> This will break all existing users. In-tree and out-of-tree. Where is
>>> the binding update?
>>
>> In my reply to Rob's comments in v1 I was pointing out that this will
>> affect an existing driver. There was no reaction.
>>
>> As far as I can see, there is no in-tree usage yet. Though I can't tell
>> about out-of-tree usage. Although if there is, adding the rt5033-charger
>> driver might already causes the need for changes.
>>
>> Well, to stay on the safe side, I'll drop this patch in v3 and will
>> change the bindings (patch 9) back to uppercase.
> 
> Your v1 binding patch did not explain that you document existing ABI, so
> you got comments like for a new binding. This is not really new binding,
> is it?

The bindings for the mfd and regulator are new, even though the drivers 
are already existing. Sorry for not being clear on this in v1. This is 
due to historic reasons of the old patchset, more information on that 
further down.

The current situation in the mainline kernel is as follows.

drivers
-------
rt5033:            drivers/mfd/rt5033.c
rt5033-regulator:  drivers/regulator/rt5033-regulator.c
rt5033-charger:    not existent
rt5033-battery:    drivers/power/supply/rt5033_battery.c
rt5033-leds:       not existent

bindings
--------
rt5033:            not existent
rt5033-regulator:  not existent
rt5033-charger:    not existent
rt5033-battery:    .../bindings/power/supply/richtek,rt5033-battery.yaml
rt5033-leds:       not existent

The reason for that discrepancy:
RT5033 mfd, regulator and fuelgauge drivers were applied but charger & 
documentation didn't make [1]. They were submitted again but it phased 
out at that point, last known state is [2]. The LEDs are also a phased 
out patchset [3]. The fuelgauge binding was added not so long ago by 
Stephan [4].

[1] 
https://lore.kernel.org/all/1421899601-19327-1-git-send-email-beomho.seo@samsung.com/T/#t
[2] 
https://lore.kernel.org/lkml/1425864191-4121-1-git-send-email-beomho.seo@samsung.com/T/#t
[3] 
https://lore.kernel.org/linux-leds/1448446948-13729-1-git-send-email-ingi2.kim@samsung.com/T/#u
[4] 
https://lore.kernel.org/linux-devicetree/20210517105113.240379-1-stephan@gerhold.net/T/#m197b5719a5d37b17ba4ff9f3b3ff4bd4efcda71e

Kind regards,
Jakob
diff mbox series

Patch

diff --git a/drivers/regulator/rt5033-regulator.c b/drivers/regulator/rt5033-regulator.c
index 2ba74f205543..dee272dc81df 100644
--- a/drivers/regulator/rt5033-regulator.c
+++ b/drivers/regulator/rt5033-regulator.c
@@ -41,8 +41,8 @@  static const struct regulator_ops rt5033_buck_ops = {
 
 static const struct regulator_desc rt5033_supported_regulators[] = {
 	[RT5033_BUCK] = {
-		.name		= "BUCK",
-		.of_match	= of_match_ptr("BUCK"),
+		.name		= "buck",
+		.of_match	= of_match_ptr("buck"),
 		.regulators_node = of_match_ptr("regulators"),
 		.id		= RT5033_BUCK,
 		.ops		= &rt5033_buck_ops,
@@ -57,8 +57,8 @@  static const struct regulator_desc rt5033_supported_regulators[] = {
 		.vsel_mask	= RT5033_BUCK_CTRL_MASK,
 	},
 	[RT5033_LDO] = {
-		.name		= "LDO",
-		.of_match	= of_match_ptr("LDO"),
+		.name		= "ldo",
+		.of_match	= of_match_ptr("ldo"),
 		.regulators_node = of_match_ptr("regulators"),
 		.id		= RT5033_LDO,
 		.ops		= &rt5033_buck_ops,
@@ -73,8 +73,8 @@  static const struct regulator_desc rt5033_supported_regulators[] = {
 		.vsel_mask	= RT5033_LDO_CTRL_MASK,
 	},
 	[RT5033_SAFE_LDO] = {
-		.name		= "SAFE_LDO",
-		.of_match	= of_match_ptr("SAFE_LDO"),
+		.name		= "safe_ldo",
+		.of_match	= of_match_ptr("safe_ldo"),
 		.regulators_node = of_match_ptr("regulators"),
 		.id		= RT5033_SAFE_LDO,
 		.ops		= &rt5033_safe_ldo_ops,