[2/3] media: vgxy61: Add legacy compatible string

Message ID 20240610150815.228790-3-benjamin.mugnier@foss.st.com (mailing list archive)
State Changes Requested
Delegated to: Sakari Ailus
Headers
Series media: vgxy61: Remove vendor prefix from driver name |

Commit Message

Benjamin Mugnier June 10, 2024, 3:08 p.m. UTC
  As the driver has been renamed from 'st-vgxy61' to 'vgxy61', its
compatible string has been updated to reflect this change. Therefore old
device trees will not work anymore.
Add the old driver name as another compatible name to handle the
retro compatibility.

Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
---
 drivers/media/i2c/vgxy61.c | 5 +++++
 1 file changed, 5 insertions(+)
  

Comments

Krzysztof Kozlowski June 11, 2024, 6:47 a.m. UTC | #1
On 10/06/2024 17:08, Benjamin Mugnier wrote:
> As the driver has been renamed from 'st-vgxy61' to 'vgxy61', its
> compatible string has been updated to reflect this change. Therefore old
> device trees will not work anymore.
> Add the old driver name as another compatible name to handle the
> retro compatibility.
> 
> Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
> ---
>  drivers/media/i2c/vgxy61.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/media/i2c/vgxy61.c b/drivers/media/i2c/vgxy61.c
> index 30378e962016..ca3b43608dad 100644
> --- a/drivers/media/i2c/vgxy61.c
> +++ b/drivers/media/i2c/vgxy61.c
> @@ -1867,6 +1867,11 @@ static void vgxy61_remove(struct i2c_client *client)
>  }
>  
>  static const struct of_device_id vgxy61_dt_ids[] = {
> +	{ .compatible = "st,vgxy61" },
> +	/*
> +	 * Previously the driver was named 'st-vgxy61' instead of simply
> +	 * 'vgxy61', keep it for retrocompatibility purposes.

NAK.

Best regards,
Krzysztof
  
Sakari Ailus June 11, 2024, 8:19 a.m. UTC | #2
Hi Krzysztof,

On Tue, Jun 11, 2024 at 08:47:25AM +0200, Krzysztof Kozlowski wrote:
> On 10/06/2024 17:08, Benjamin Mugnier wrote:
> > As the driver has been renamed from 'st-vgxy61' to 'vgxy61', its
> > compatible string has been updated to reflect this change. Therefore old
> > device trees will not work anymore.
> > Add the old driver name as another compatible name to handle the
> > retro compatibility.
> > 
> > Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
> > ---
> >  drivers/media/i2c/vgxy61.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/drivers/media/i2c/vgxy61.c b/drivers/media/i2c/vgxy61.c
> > index 30378e962016..ca3b43608dad 100644
> > --- a/drivers/media/i2c/vgxy61.c
> > +++ b/drivers/media/i2c/vgxy61.c
> > @@ -1867,6 +1867,11 @@ static void vgxy61_remove(struct i2c_client *client)
> >  }
> >  
> >  static const struct of_device_id vgxy61_dt_ids[] = {
> > +	{ .compatible = "st,vgxy61" },
> > +	/*
> > +	 * Previously the driver was named 'st-vgxy61' instead of simply
> > +	 * 'vgxy61', keep it for retrocompatibility purposes.
> 
> NAK.

Is that because the comment says "driver" rather than "device"?

Please try to express clearer what you'd expect from the patch author.
  
Krzysztof Kozlowski June 11, 2024, 8:38 a.m. UTC | #3
On 11/06/2024 10:19, Sakari Ailus wrote:
> Hi Krzysztof,
> 
> On Tue, Jun 11, 2024 at 08:47:25AM +0200, Krzysztof Kozlowski wrote:
>> On 10/06/2024 17:08, Benjamin Mugnier wrote:
>>> As the driver has been renamed from 'st-vgxy61' to 'vgxy61', its
>>> compatible string has been updated to reflect this change. Therefore old
>>> device trees will not work anymore.
>>> Add the old driver name as another compatible name to handle the
>>> retro compatibility.
>>>
>>> Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
>>> ---
>>>  drivers/media/i2c/vgxy61.c | 5 +++++
>>>  1 file changed, 5 insertions(+)
>>>
>>> diff --git a/drivers/media/i2c/vgxy61.c b/drivers/media/i2c/vgxy61.c
>>> index 30378e962016..ca3b43608dad 100644
>>> --- a/drivers/media/i2c/vgxy61.c
>>> +++ b/drivers/media/i2c/vgxy61.c
>>> @@ -1867,6 +1867,11 @@ static void vgxy61_remove(struct i2c_client *client)
>>>  }
>>>  
>>>  static const struct of_device_id vgxy61_dt_ids[] = {
>>> +	{ .compatible = "st,vgxy61" },
>>> +	/*
>>> +	 * Previously the driver was named 'st-vgxy61' instead of simply
>>> +	 * 'vgxy61', keep it for retrocompatibility purposes.
>>
>> NAK.
> 
> Is that because the comment says "driver" rather than "device"?
> 
> Please try to express clearer what you'd expect from the patch author.

There is almost never a need to rename compatible or add new compatible
matching existing one. There are exceptions, like development or work in
progress with no users at all (and really no users!).

The commit did not provide any rationale for binding change.

Additionally, it does not make any sense. There is no point in doing it
at all. No benefit.

Best regards,
Krzysztof
  
Benjamin Mugnier June 11, 2024, 11:57 a.m. UTC | #4
Hi Sakari and Krzysztof,

On 6/11/24 10:38, Krzysztof Kozlowski wrote:
> On 11/06/2024 10:19, Sakari Ailus wrote:
>> Hi Krzysztof,
>>
>> On Tue, Jun 11, 2024 at 08:47:25AM +0200, Krzysztof Kozlowski wrote:
>>> On 10/06/2024 17:08, Benjamin Mugnier wrote:
>>>> As the driver has been renamed from 'st-vgxy61' to 'vgxy61', its
>>>> compatible string has been updated to reflect this change. Therefore old
>>>> device trees will not work anymore.
>>>> Add the old driver name as another compatible name to handle the
>>>> retro compatibility.
>>>>
>>>> Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
>>>> ---
>>>>  drivers/media/i2c/vgxy61.c | 5 +++++
>>>>  1 file changed, 5 insertions(+)
>>>>
>>>> diff --git a/drivers/media/i2c/vgxy61.c b/drivers/media/i2c/vgxy61.c
>>>> index 30378e962016..ca3b43608dad 100644
>>>> --- a/drivers/media/i2c/vgxy61.c
>>>> +++ b/drivers/media/i2c/vgxy61.c
>>>> @@ -1867,6 +1867,11 @@ static void vgxy61_remove(struct i2c_client *client)
>>>>  }
>>>>  
>>>>  static const struct of_device_id vgxy61_dt_ids[] = {
>>>> +	{ .compatible = "st,vgxy61" },
>>>> +	/*
>>>> +	 * Previously the driver was named 'st-vgxy61' instead of simply
>>>> +	 * 'vgxy61', keep it for retrocompatibility purposes.
>>>
>>> NAK.
>>
>> Is that because the comment says "driver" rather than "device"?
>>

You're correct, I'll replace all occurrences for the series.

>> Please try to express clearer what you'd expect from the patch author.
> 
> There is almost never a need to rename compatible or add new compatible
> matching existing one. There are exceptions, like development or work in
> progress with no users at all (and really no users!).
> 
> The commit did not provide any rationale for binding change.
> 
> Additionally, it does not make any sense. There is no point in doing it
> at all. No benefit.
> 

Thanks, here is a draft of a new commit message for v2 highlighting the
rationale :

The previous binding 'st,st-vgxy61' did not reflect the actual device
name : vgxy61 (and not st-vgxy61 as ST is the vendor prefix), and was
changed to 'st,vgxy61'.
Still some device trees uses the old binding. This commit adds back the
'st,vgxy61' binding in addition to the new one to ensure retro
compatibility.

Will this be ok for you ? Tell me your thoughts.

> Best regards,
> Krzysztof
>
  
Krzysztof Kozlowski June 11, 2024, 12:17 p.m. UTC | #5
On 11/06/2024 13:57, Benjamin Mugnier wrote:
> Hi Sakari and Krzysztof,
> 
> On 6/11/24 10:38, Krzysztof Kozlowski wrote:
>> On 11/06/2024 10:19, Sakari Ailus wrote:
>>> Hi Krzysztof,
>>>
>>> On Tue, Jun 11, 2024 at 08:47:25AM +0200, Krzysztof Kozlowski wrote:
>>>> On 10/06/2024 17:08, Benjamin Mugnier wrote:
>>>>> As the driver has been renamed from 'st-vgxy61' to 'vgxy61', its
>>>>> compatible string has been updated to reflect this change. Therefore old
>>>>> device trees will not work anymore.
>>>>> Add the old driver name as another compatible name to handle the
>>>>> retro compatibility.
>>>>>
>>>>> Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
>>>>> ---
>>>>>  drivers/media/i2c/vgxy61.c | 5 +++++
>>>>>  1 file changed, 5 insertions(+)
>>>>>
>>>>> diff --git a/drivers/media/i2c/vgxy61.c b/drivers/media/i2c/vgxy61.c
>>>>> index 30378e962016..ca3b43608dad 100644
>>>>> --- a/drivers/media/i2c/vgxy61.c
>>>>> +++ b/drivers/media/i2c/vgxy61.c
>>>>> @@ -1867,6 +1867,11 @@ static void vgxy61_remove(struct i2c_client *client)
>>>>>  }
>>>>>  
>>>>>  static const struct of_device_id vgxy61_dt_ids[] = {
>>>>> +	{ .compatible = "st,vgxy61" },
>>>>> +	/*
>>>>> +	 * Previously the driver was named 'st-vgxy61' instead of simply
>>>>> +	 * 'vgxy61', keep it for retrocompatibility purposes.
>>>>
>>>> NAK.
>>>
>>> Is that because the comment says "driver" rather than "device"?
>>>
> 
> You're correct, I'll replace all occurrences for the series.
> 
>>> Please try to express clearer what you'd expect from the patch author.
>>
>> There is almost never a need to rename compatible or add new compatible
>> matching existing one. There are exceptions, like development or work in
>> progress with no users at all (and really no users!).
>>
>> The commit did not provide any rationale for binding change.
>>
>> Additionally, it does not make any sense. There is no point in doing it
>> at all. No benefit.
>>
> 
> Thanks, here is a draft of a new commit message for v2 highlighting the
> rationale :
> 
> The previous binding 'st,st-vgxy61' did not reflect the actual device
> name : vgxy61 (and not st-vgxy61 as ST is the vendor prefix), and was
> changed to 'st,vgxy61'.

That's not really a reason to change binding.

> Still some device trees uses the old binding. This commit adds back the
> 'st,vgxy61' binding in addition to the new one to ensure retro
> compatibility.

"Adds back"? This means it was there but was removed, so please document
it with commit references.

> 
> Will this be ok for you ? Tell me your thoughts.

It seems you are making some changes assuming there is some error to be
fixed, but there is none. Compatible is just some unique string, so the
original compatible, although unfortunate, is okay and must not be
changed. I already explained that adding new compatibles for such cases
is only for exceptions. Is this exception? No. You provided no rationale
to make it an exception.

Best regards,
Krzysztof
  
Benjamin Mugnier June 11, 2024, 1:07 p.m. UTC | #6
Hi Krzysztof,

On 6/11/24 14:17, Krzysztof Kozlowski wrote:
> On 11/06/2024 13:57, Benjamin Mugnier wrote:
>> Hi Sakari and Krzysztof,
>>
>> On 6/11/24 10:38, Krzysztof Kozlowski wrote:
>>> On 11/06/2024 10:19, Sakari Ailus wrote:
>>>> Hi Krzysztof,
>>>>
>>>> On Tue, Jun 11, 2024 at 08:47:25AM +0200, Krzysztof Kozlowski wrote:
>>>>> On 10/06/2024 17:08, Benjamin Mugnier wrote:
>>>>>> As the driver has been renamed from 'st-vgxy61' to 'vgxy61', its
>>>>>> compatible string has been updated to reflect this change. Therefore old
>>>>>> device trees will not work anymore.
>>>>>> Add the old driver name as another compatible name to handle the
>>>>>> retro compatibility.
>>>>>>
>>>>>> Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
>>>>>> ---
>>>>>>  drivers/media/i2c/vgxy61.c | 5 +++++
>>>>>>  1 file changed, 5 insertions(+)
>>>>>>
>>>>>> diff --git a/drivers/media/i2c/vgxy61.c b/drivers/media/i2c/vgxy61.c
>>>>>> index 30378e962016..ca3b43608dad 100644
>>>>>> --- a/drivers/media/i2c/vgxy61.c
>>>>>> +++ b/drivers/media/i2c/vgxy61.c
>>>>>> @@ -1867,6 +1867,11 @@ static void vgxy61_remove(struct i2c_client *client)
>>>>>>  }
>>>>>>  
>>>>>>  static const struct of_device_id vgxy61_dt_ids[] = {
>>>>>> +	{ .compatible = "st,vgxy61" },
>>>>>> +	/*
>>>>>> +	 * Previously the driver was named 'st-vgxy61' instead of simply
>>>>>> +	 * 'vgxy61', keep it for retrocompatibility purposes.
>>>>>
>>>>> NAK.
>>>>
>>>> Is that because the comment says "driver" rather than "device"?
>>>>
>>
>> You're correct, I'll replace all occurrences for the series.
>>
>>>> Please try to express clearer what you'd expect from the patch author.
>>>
>>> There is almost never a need to rename compatible or add new compatible
>>> matching existing one. There are exceptions, like development or work in
>>> progress with no users at all (and really no users!).
>>>
>>> The commit did not provide any rationale for binding change.
>>>
>>> Additionally, it does not make any sense. There is no point in doing it
>>> at all. No benefit.
>>>
>>
>> Thanks, here is a draft of a new commit message for v2 highlighting the
>> rationale :
>>
>> The previous binding 'st,st-vgxy61' did not reflect the actual device
>> name : vgxy61 (and not st-vgxy61 as ST is the vendor prefix), and was
>> changed to 'st,vgxy61'.
> 
> That's not really a reason to change binding.
> 
>> Still some device trees uses the old binding. This commit adds back the
>> 'st,vgxy61' binding in addition to the new one to ensure retro
>> compatibility.
> 
> "Adds back"? This means it was there but was removed, so please document
> it with commit references.
> 

My bad, patch 1/3 on this series changes the binding, only to be added
back by this one (2/3).
I'll do it the other way around : patch 1/3 will *not* change the
binding, and patch 2/3 will add the new binding instead. Way cleaner.

>>
>> Will this be ok for you ? Tell me your thoughts.
> 
> It seems you are making some changes assuming there is some error to be
> fixed, but there is none. Compatible is just some unique string, so the
> original compatible, although unfortunate, is okay and must not be
> changed. I already explained that adding new compatibles for such cases
> is only for exceptions. Is this exception? No. You provided no rationale
> to make it an exception.

Thank you. I think I failed to provide some details :

The change is motivated by a will of consistency in naming.
As you correctly mentioned in the vd56g3 series [1], bindings should be
'vendor,device'. This will be changed for the vd56g3 series v3 by
Sylvain, but the vgxy61 binding is already badly named.
We will then have these 2 bindings in the wild : st,vd56g3 and
st,st-vgxy61, for very similar sensors. Hence the will to add a
st,vgxy61 binding for consistency.
This also prepares the ground for new camera sensor drivers we plan to
submit later on, and that will respect the st,device binding naming scheme.

Is it the correct way to go ?

I will add something along these lines to the commit message.


[1] https://lkml.org/lkml/2024/5/27/670

> 
> Best regards,
> Krzysztof
>
  
Krzysztof Kozlowski June 11, 2024, 8:54 p.m. UTC | #7
On 11/06/2024 15:07, Benjamin Mugnier wrote:
> 
>>>
>>> Will this be ok for you ? Tell me your thoughts.
>>
>> It seems you are making some changes assuming there is some error to be
>> fixed, but there is none. Compatible is just some unique string, so the
>> original compatible, although unfortunate, is okay and must not be
>> changed. I already explained that adding new compatibles for such cases
>> is only for exceptions. Is this exception? No. You provided no rationale
>> to make it an exception.
> 
> Thank you. I think I failed to provide some details :
> 
> The change is motivated by a will of consistency in naming.

Consistency is a preference and not really a reason here. Could be named
"st,yellow-elephant" and it would be kind of fine...

> As you correctly mentioned in the vd56g3 series [1], bindings should be
> 'vendor,device'. This will be changed for the vd56g3 series v3 by

Yeah, but that ship has sailed. Where is the answer about all the users?
You pick pieces of my arguments and ignore some parts of it.

None of this is suitable for exception. Style or preference is not
argument for exception.

> Sylvain, but the vgxy61 binding is already badly named.
> We will then have these 2 bindings in the wild : st,vd56g3 and
> st,st-vgxy61, for very similar sensors. Hence the will to add a
> st,vgxy61 binding for consistency.

Nope.

> This also prepares the ground for new camera sensor drivers we plan to
> submit later on, and that will respect the st,device binding naming scheme.

Nope

> 
> Is it the correct way to go ?

Nope, sorry.

I already said this several times in this email thread - answers here
and in other emails. Now, again.

When I said about exceptions, I really meant exceptions, e.g. something
is broken or something never worked and has to be fixed. Style or
preference is not this case. No point to keep arguing how style is
important for you.


Best regards,
Krzysztof
  

Patch

diff --git a/drivers/media/i2c/vgxy61.c b/drivers/media/i2c/vgxy61.c
index 30378e962016..ca3b43608dad 100644
--- a/drivers/media/i2c/vgxy61.c
+++ b/drivers/media/i2c/vgxy61.c
@@ -1867,6 +1867,11 @@  static void vgxy61_remove(struct i2c_client *client)
 }
 
 static const struct of_device_id vgxy61_dt_ids[] = {
+	{ .compatible = "st,vgxy61" },
+	/*
+	 * Previously the driver was named 'st-vgxy61' instead of simply
+	 * 'vgxy61', keep it for retrocompatibility purposes.
+	 */
 	{ .compatible = "st,st-vgxy61" },
 	{ /* sentinel */ }
 };