2024-01-23 10:51:53

by Paul Cercueil

[permalink] [raw]
Subject: [PATCH] Revert "iio: add modifiers for A and B ultraviolet light"

This reverts
b89710bd215e ("iio: add modifiers for A and B ultraviolet light")

Enum iio_modifer is *ABI*, you can't just decide to change all the
values from one version to another, otherwise you break userspace.
The new entries should have been added to the end of the enum.

Signed-off-by: Paul Cercueil <[email protected]>
---
Documentation/ABI/testing/sysfs-bus-iio | 7 ++-----
drivers/iio/industrialio-core.c | 2 --
include/uapi/linux/iio/types.h | 2 --
tools/iio/iio_event_monitor.c | 2 --
4 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index 2e6d5ebfd3c7..7937bb4a4a68 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -1587,8 +1587,6 @@ What: /sys/.../iio:deviceX/in_intensityY_raw
What: /sys/.../iio:deviceX/in_intensityY_ir_raw
What: /sys/.../iio:deviceX/in_intensityY_both_raw
What: /sys/.../iio:deviceX/in_intensityY_uv_raw
-What: /sys/.../iio:deviceX/in_intensityY_uva_raw
-What: /sys/.../iio:deviceX/in_intensityY_uvb_raw
What: /sys/.../iio:deviceX/in_intensityY_duv_raw
KernelVersion: 3.4
Contact: [email protected]
@@ -1597,9 +1595,8 @@ Description:
that measurements contain visible and infrared light
components or just infrared light, respectively. Modifier
uv indicates that measurements contain ultraviolet light
- components. Modifiers uva, uvb and duv indicate that
- measurements contain A, B or deep (C) ultraviolet light
- components respectively.
+ components. Modifier duv indicates that measurements
+ contain deep ultraviolet light components.

What: /sys/.../iio:deviceX/in_uvindex_input
KernelVersion: 4.6
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index 9a85752124dd..bce09d325142 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -117,8 +117,6 @@ static const char * const iio_modifier_names[] = {
[IIO_MOD_LIGHT_GREEN] = "green",
[IIO_MOD_LIGHT_BLUE] = "blue",
[IIO_MOD_LIGHT_UV] = "uv",
- [IIO_MOD_LIGHT_UVA] = "uva",
- [IIO_MOD_LIGHT_UVB] = "uvb",
[IIO_MOD_LIGHT_DUV] = "duv",
[IIO_MOD_QUATERNION] = "quaternion",
[IIO_MOD_TEMP_AMBIENT] = "ambient",
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
index 5060963707b1..9c2ffdcd6623 100644
--- a/include/uapi/linux/iio/types.h
+++ b/include/uapi/linux/iio/types.h
@@ -91,8 +91,6 @@ enum iio_modifier {
IIO_MOD_CO2,
IIO_MOD_VOC,
IIO_MOD_LIGHT_UV,
- IIO_MOD_LIGHT_UVA,
- IIO_MOD_LIGHT_UVB,
IIO_MOD_LIGHT_DUV,
IIO_MOD_PM1,
IIO_MOD_PM2P5,
diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c
index 8073c9e4fe46..2eaaa7123b04 100644
--- a/tools/iio/iio_event_monitor.c
+++ b/tools/iio/iio_event_monitor.c
@@ -105,8 +105,6 @@ static const char * const iio_modifier_names[] = {
[IIO_MOD_LIGHT_GREEN] = "green",
[IIO_MOD_LIGHT_BLUE] = "blue",
[IIO_MOD_LIGHT_UV] = "uv",
- [IIO_MOD_LIGHT_UVA] = "uva",
- [IIO_MOD_LIGHT_UVB] = "uvb",
[IIO_MOD_LIGHT_DUV] = "duv",
[IIO_MOD_QUATERNION] = "quaternion",
[IIO_MOD_TEMP_AMBIENT] = "ambient",
--
2.43.0



2024-01-23 10:52:49

by Javier Carrasco

[permalink] [raw]
Subject: Re: [PATCH] Revert "iio: add modifiers for A and B ultraviolet light"

On 23.01.24 11:43, Paul Cercueil wrote:
> This reverts
> b89710bd215e ("iio: add modifiers for A and B ultraviolet light")
>
> Enum iio_modifer is *ABI*, you can't just decide to change all the
> values from one version to another, otherwise you break userspace.
> The new entries should have been added to the end of the enum.
>
> Signed-off-by: Paul Cercueil <[email protected]>
> ---
> Documentation/ABI/testing/sysfs-bus-iio | 7 ++-----
> drivers/iio/industrialio-core.c | 2 --
> include/uapi/linux/iio/types.h | 2 --
> tools/iio/iio_event_monitor.c | 2 --
> 4 files changed, 2 insertions(+), 11 deletions(-)
>
> diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
> index 2e6d5ebfd3c7..7937bb4a4a68 100644
> --- a/Documentation/ABI/testing/sysfs-bus-iio
> +++ b/Documentation/ABI/testing/sysfs-bus-iio
> @@ -1587,8 +1587,6 @@ What: /sys/.../iio:deviceX/in_intensityY_raw
> What: /sys/.../iio:deviceX/in_intensityY_ir_raw
> What: /sys/.../iio:deviceX/in_intensityY_both_raw
> What: /sys/.../iio:deviceX/in_intensityY_uv_raw
> -What: /sys/.../iio:deviceX/in_intensityY_uva_raw
> -What: /sys/.../iio:deviceX/in_intensityY_uvb_raw
> What: /sys/.../iio:deviceX/in_intensityY_duv_raw
> KernelVersion: 3.4
> Contact: [email protected]
> @@ -1597,9 +1595,8 @@ Description:
> that measurements contain visible and infrared light
> components or just infrared light, respectively. Modifier
> uv indicates that measurements contain ultraviolet light
> - components. Modifiers uva, uvb and duv indicate that
> - measurements contain A, B or deep (C) ultraviolet light
> - components respectively.
> + components. Modifier duv indicates that measurements
> + contain deep ultraviolet light components.
>
> What: /sys/.../iio:deviceX/in_uvindex_input
> KernelVersion: 4.6
> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> index 9a85752124dd..bce09d325142 100644
> --- a/drivers/iio/industrialio-core.c
> +++ b/drivers/iio/industrialio-core.c
> @@ -117,8 +117,6 @@ static const char * const iio_modifier_names[] = {
> [IIO_MOD_LIGHT_GREEN] = "green",
> [IIO_MOD_LIGHT_BLUE] = "blue",
> [IIO_MOD_LIGHT_UV] = "uv",
> - [IIO_MOD_LIGHT_UVA] = "uva",
> - [IIO_MOD_LIGHT_UVB] = "uvb",
> [IIO_MOD_LIGHT_DUV] = "duv",
> [IIO_MOD_QUATERNION] = "quaternion",
> [IIO_MOD_TEMP_AMBIENT] = "ambient",
> diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
> index 5060963707b1..9c2ffdcd6623 100644
> --- a/include/uapi/linux/iio/types.h
> +++ b/include/uapi/linux/iio/types.h
> @@ -91,8 +91,6 @@ enum iio_modifier {
> IIO_MOD_CO2,
> IIO_MOD_VOC,
> IIO_MOD_LIGHT_UV,
> - IIO_MOD_LIGHT_UVA,
> - IIO_MOD_LIGHT_UVB,
> IIO_MOD_LIGHT_DUV,
> IIO_MOD_PM1,
> IIO_MOD_PM2P5,
> diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c
> index 8073c9e4fe46..2eaaa7123b04 100644
> --- a/tools/iio/iio_event_monitor.c
> +++ b/tools/iio/iio_event_monitor.c
> @@ -105,8 +105,6 @@ static const char * const iio_modifier_names[] = {
> [IIO_MOD_LIGHT_GREEN] = "green",
> [IIO_MOD_LIGHT_BLUE] = "blue",
> [IIO_MOD_LIGHT_UV] = "uv",
> - [IIO_MOD_LIGHT_UVA] = "uva",
> - [IIO_MOD_LIGHT_UVB] = "uvb",
> [IIO_MOD_LIGHT_DUV] = "duv",
> [IIO_MOD_QUATERNION] = "quaternion",
> [IIO_MOD_TEMP_AMBIENT] = "ambient",
Oops, sorry about that. You are right, I will send a new patch with the
new elements at the end of the enum. This patch should be applied to get
things right again, though.

Thanks and best regards,
Javier Carrasco

2024-01-23 10:55:15

by Paul Cercueil

[permalink] [raw]
Subject: Re: [PATCH] Revert "iio: add modifiers for A and B ultraviolet light"

Hi Javier,

Le mardi 23 janvier 2024 à 11:51 +0100, Javier Carrasco a écrit :
> On 23.01.24 11:43, Paul Cercueil wrote:
> > This reverts
> > b89710bd215e ("iio: add modifiers for A and B ultraviolet light")
> >
> > Enum iio_modifer is *ABI*, you can't just decide to change all the
> > values from one version to another, otherwise you break userspace.
> > The new entries should have been added to the end of the enum.
> >
> > Signed-off-by: Paul Cercueil <[email protected]>
> > ---
> >  Documentation/ABI/testing/sysfs-bus-iio | 7 ++-----
> >  drivers/iio/industrialio-core.c         | 2 --
> >  include/uapi/linux/iio/types.h          | 2 --
> >  tools/iio/iio_event_monitor.c           | 2 --
> >  4 files changed, 2 insertions(+), 11 deletions(-)
> >
> > diff --git a/Documentation/ABI/testing/sysfs-bus-iio
> > b/Documentation/ABI/testing/sysfs-bus-iio
> > index 2e6d5ebfd3c7..7937bb4a4a68 100644
> > --- a/Documentation/ABI/testing/sysfs-bus-iio
> > +++ b/Documentation/ABI/testing/sysfs-bus-iio
> > @@ -1587,8 +1587,6 @@
> > What: /sys/.../iio:deviceX/in_intensityY_raw
> >  What: /sys/.../iio:deviceX/in_intensityY_ir_raw
> >  What: /sys/.../iio:deviceX/in_intensityY_both_raw
> >  What: /sys/.../iio:deviceX/in_intensityY_uv_raw
> > -What: /sys/.../iio:deviceX/in_intensityY_uva_raw
> > -What: /sys/.../iio:deviceX/in_intensityY_uvb_raw
> >  What: /sys/.../iio:deviceX/in_intensityY_duv_raw
> >  KernelVersion: 3.4
> >  Contact: [email protected]
> > @@ -1597,9 +1595,8 @@ Description:
> >   that measurements contain visible and infrared
> > light
> >   components or just infrared light, respectively.
> > Modifier
> >   uv indicates that measurements contain ultraviolet
> > light
> > - components. Modifiers uva, uvb and duv indicate
> > that
> > - measurements contain A, B or deep (C) ultraviolet
> > light
> > - components respectively.
> > + components. Modifier duv indicates that
> > measurements
> > + contain deep ultraviolet light components.
> >  
> >  What: /sys/.../iio:deviceX/in_uvindex_input
> >  KernelVersion: 4.6
> > diff --git a/drivers/iio/industrialio-core.c
> > b/drivers/iio/industrialio-core.c
> > index 9a85752124dd..bce09d325142 100644
> > --- a/drivers/iio/industrialio-core.c
> > +++ b/drivers/iio/industrialio-core.c
> > @@ -117,8 +117,6 @@ static const char * const iio_modifier_names[]
> > = {
> >   [IIO_MOD_LIGHT_GREEN] = "green",
> >   [IIO_MOD_LIGHT_BLUE] = "blue",
> >   [IIO_MOD_LIGHT_UV] = "uv",
> > - [IIO_MOD_LIGHT_UVA] = "uva",
> > - [IIO_MOD_LIGHT_UVB] = "uvb",
> >   [IIO_MOD_LIGHT_DUV] = "duv",
> >   [IIO_MOD_QUATERNION] = "quaternion",
> >   [IIO_MOD_TEMP_AMBIENT] = "ambient",
> > diff --git a/include/uapi/linux/iio/types.h
> > b/include/uapi/linux/iio/types.h
> > index 5060963707b1..9c2ffdcd6623 100644
> > --- a/include/uapi/linux/iio/types.h
> > +++ b/include/uapi/linux/iio/types.h
> > @@ -91,8 +91,6 @@ enum iio_modifier {
> >   IIO_MOD_CO2,
> >   IIO_MOD_VOC,
> >   IIO_MOD_LIGHT_UV,
> > - IIO_MOD_LIGHT_UVA,
> > - IIO_MOD_LIGHT_UVB,
> >   IIO_MOD_LIGHT_DUV,
> >   IIO_MOD_PM1,
> >   IIO_MOD_PM2P5,
> > diff --git a/tools/iio/iio_event_monitor.c
> > b/tools/iio/iio_event_monitor.c
> > index 8073c9e4fe46..2eaaa7123b04 100644
> > --- a/tools/iio/iio_event_monitor.c
> > +++ b/tools/iio/iio_event_monitor.c
> > @@ -105,8 +105,6 @@ static const char * const iio_modifier_names[]
> > = {
> >   [IIO_MOD_LIGHT_GREEN] = "green",
> >   [IIO_MOD_LIGHT_BLUE] = "blue",
> >   [IIO_MOD_LIGHT_UV] = "uv",
> > - [IIO_MOD_LIGHT_UVA] = "uva",
> > - [IIO_MOD_LIGHT_UVB] = "uvb",
> >   [IIO_MOD_LIGHT_DUV] = "duv",
> >   [IIO_MOD_QUATERNION] = "quaternion",
> >   [IIO_MOD_TEMP_AMBIENT] = "ambient",
> Oops, sorry about that. You are right, I will send a new patch with
> the
> new elements at the end of the enum. This patch should be applied to
> get
> things right again, though.

Np.

I notice now that we can't really apply the revert as the veml6075
driver is already using these enum values - so applying it would result
in build errors.

Can you just move these entries to the end of the enum in your new
patch?

>
> Thanks and best regards,
> Javier Carrasco

Cheers,
-Paul

2024-01-23 11:05:08

by Javier Carrasco

[permalink] [raw]
Subject: Re: [PATCH] Revert "iio: add modifiers for A and B ultraviolet light"



On 23.01.24 11:55, Paul Cercueil wrote:
> Hi Javier,
>
> Le mardi 23 janvier 2024 à 11:51 +0100, Javier Carrasco a écrit :
>> On 23.01.24 11:43, Paul Cercueil wrote:
>>> This reverts
>>> b89710bd215e ("iio: add modifiers for A and B ultraviolet light")
>>>
>>> Enum iio_modifer is *ABI*, you can't just decide to change all the
>>> values from one version to another, otherwise you break userspace.
>>> The new entries should have been added to the end of the enum.
>>>
>>> Signed-off-by: Paul Cercueil <[email protected]>
>>> ---
>>>  Documentation/ABI/testing/sysfs-bus-iio | 7 ++-----
>>>  drivers/iio/industrialio-core.c         | 2 --
>>>  include/uapi/linux/iio/types.h          | 2 --
>>>  tools/iio/iio_event_monitor.c           | 2 --
>>>  4 files changed, 2 insertions(+), 11 deletions(-)
>>>
>>> diff --git a/Documentation/ABI/testing/sysfs-bus-iio
>>> b/Documentation/ABI/testing/sysfs-bus-iio
>>> index 2e6d5ebfd3c7..7937bb4a4a68 100644
>>> --- a/Documentation/ABI/testing/sysfs-bus-iio
>>> +++ b/Documentation/ABI/testing/sysfs-bus-iio
>>> @@ -1587,8 +1587,6 @@
>>> What: /sys/.../iio:deviceX/in_intensityY_raw
>>>  What: /sys/.../iio:deviceX/in_intensityY_ir_raw
>>>  What: /sys/.../iio:deviceX/in_intensityY_both_raw
>>>  What: /sys/.../iio:deviceX/in_intensityY_uv_raw
>>> -What: /sys/.../iio:deviceX/in_intensityY_uva_raw
>>> -What: /sys/.../iio:deviceX/in_intensityY_uvb_raw
>>>  What: /sys/.../iio:deviceX/in_intensityY_duv_raw
>>>  KernelVersion: 3.4
>>>  Contact: [email protected]
>>> @@ -1597,9 +1595,8 @@ Description:
>>>   that measurements contain visible and infrared
>>> light
>>>   components or just infrared light, respectively.
>>> Modifier
>>>   uv indicates that measurements contain ultraviolet
>>> light
>>> - components. Modifiers uva, uvb and duv indicate
>>> that
>>> - measurements contain A, B or deep (C) ultraviolet
>>> light
>>> - components respectively.
>>> + components. Modifier duv indicates that
>>> measurements
>>> + contain deep ultraviolet light components.
>>>  
>>>  What: /sys/.../iio:deviceX/in_uvindex_input
>>>  KernelVersion: 4.6
>>> diff --git a/drivers/iio/industrialio-core.c
>>> b/drivers/iio/industrialio-core.c
>>> index 9a85752124dd..bce09d325142 100644
>>> --- a/drivers/iio/industrialio-core.c
>>> +++ b/drivers/iio/industrialio-core.c
>>> @@ -117,8 +117,6 @@ static const char * const iio_modifier_names[]
>>> = {
>>>   [IIO_MOD_LIGHT_GREEN] = "green",
>>>   [IIO_MOD_LIGHT_BLUE] = "blue",
>>>   [IIO_MOD_LIGHT_UV] = "uv",
>>> - [IIO_MOD_LIGHT_UVA] = "uva",
>>> - [IIO_MOD_LIGHT_UVB] = "uvb",
>>>   [IIO_MOD_LIGHT_DUV] = "duv",
>>>   [IIO_MOD_QUATERNION] = "quaternion",
>>>   [IIO_MOD_TEMP_AMBIENT] = "ambient",
>>> diff --git a/include/uapi/linux/iio/types.h
>>> b/include/uapi/linux/iio/types.h
>>> index 5060963707b1..9c2ffdcd6623 100644
>>> --- a/include/uapi/linux/iio/types.h
>>> +++ b/include/uapi/linux/iio/types.h
>>> @@ -91,8 +91,6 @@ enum iio_modifier {
>>>   IIO_MOD_CO2,
>>>   IIO_MOD_VOC,
>>>   IIO_MOD_LIGHT_UV,
>>> - IIO_MOD_LIGHT_UVA,
>>> - IIO_MOD_LIGHT_UVB,
>>>   IIO_MOD_LIGHT_DUV,
>>>   IIO_MOD_PM1,
>>>   IIO_MOD_PM2P5,
>>> diff --git a/tools/iio/iio_event_monitor.c
>>> b/tools/iio/iio_event_monitor.c
>>> index 8073c9e4fe46..2eaaa7123b04 100644
>>> --- a/tools/iio/iio_event_monitor.c
>>> +++ b/tools/iio/iio_event_monitor.c
>>> @@ -105,8 +105,6 @@ static const char * const iio_modifier_names[]
>>> = {
>>>   [IIO_MOD_LIGHT_GREEN] = "green",
>>>   [IIO_MOD_LIGHT_BLUE] = "blue",
>>>   [IIO_MOD_LIGHT_UV] = "uv",
>>> - [IIO_MOD_LIGHT_UVA] = "uva",
>>> - [IIO_MOD_LIGHT_UVB] = "uvb",
>>>   [IIO_MOD_LIGHT_DUV] = "duv",
>>>   [IIO_MOD_QUATERNION] = "quaternion",
>>>   [IIO_MOD_TEMP_AMBIENT] = "ambient",
>> Oops, sorry about that. You are right, I will send a new patch with
>> the
>> new elements at the end of the enum. This patch should be applied to
>> get
>> things right again, though.
>
> Np.
>
> I notice now that we can't really apply the revert as the veml6075
> driver is already using these enum values - so applying it would result
> in build errors.
>
> Can you just move these entries to the end of the enum in your new
> patch?
>
>>
>> Thanks and best regards,
>> Javier Carrasco
>
> Cheers,
> -Paul
Sure, I will do it right now.

Thank you again and best regards,
Javier Carrasco

2024-01-27 15:53:15

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH] Revert "iio: add modifiers for A and B ultraviolet light"

..
> > Can you just move these entries to the end of the enum in your new
> > patch?
> >
> >>
> >> Thanks and best regards,
> >> Javier Carrasco
> >
> > Cheers,
> > -Paul
> Sure, I will do it right now.
>
> Thank you again and best regards,
> Javier Carrasco

Hi Javier,

If you sent a v2, it didn't reach me or the list.

Jonathan



2024-01-27 16:08:45

by Javier Carrasco

[permalink] [raw]
Subject: Re: [PATCH] Revert "iio: add modifiers for A and B ultraviolet light"



On 27.01.24 16:52, Jonathan Cameron wrote:
> ...
>>> Can you just move these entries to the end of the enum in your new
>>> patch?
>>>
>>>>
>>>> Thanks and best regards,
>>>> Javier Carrasco
>>>
>>> Cheers,
>>> -Paul
>> Sure, I will do it right now.
>>
>> Thank you again and best regards,
>> Javier Carrasco
>
> Hi Javier,
>
> If you sent a v2, it didn't reach me or the list.
>
> Jonathan
>
>
Hi Jonathan,

I retrieved the To and CC with b4 and it seems that you were one of
them, but not the iio mailing list, maybe because the modification only
applies to an include. The linux-kernel mailing list was added, though:

https://lore.kernel.org/all/[email protected]/T/

Could you apply that patch like that or do you need a RESEND to the
iio-mailing list?

Best regards,
Javier Carrasco

2024-01-27 16:53:45

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH] Revert "iio: add modifiers for A and B ultraviolet light"

On Sat, 27 Jan 2024 17:08:28 +0100
Javier Carrasco <[email protected]> wrote:

> On 27.01.24 16:52, Jonathan Cameron wrote:
> > ...
> >>> Can you just move these entries to the end of the enum in your new
> >>> patch?
> >>>
> >>>>
> >>>> Thanks and best regards,
> >>>> Javier Carrasco
> >>>
> >>> Cheers,
> >>> -Paul
> >> Sure, I will do it right now.
> >>
> >> Thank you again and best regards,
> >> Javier Carrasco
> >
> > Hi Javier,
> >
> > If you sent a v2, it didn't reach me or the list.
> >
> > Jonathan
> >
> >
> Hi Jonathan,
>
> I retrieved the To and CC with b4 and it seems that you were one of
> them, but not the iio mailing list, maybe because the modification only
> applies to an include. The linux-kernel mailing list was added, though:
>
> https://lore.kernel.org/all/[email protected]/T/
>
> Could you apply that patch like that or do you need a RESEND to the
> iio-mailing list?
Please resend. IIO patches are all tracked via patchwork which monitors the
[email protected] list.

I also use several mail accounts, so only easy way to ensure it reaches
which ever machine I'm on today is to send it to the list.

Explains why I thought I'd seen it during the week but couldn't find it today though!

Thanks,

Jonathan

>
> Best regards,
> Javier Carrasco