Re: [PATCH v2 2/4] iio: light: veml6030: fix channel type when pushing events

From: David Lechner

Date: Mon May 18 2026 - 10:57:11 EST


On 5/18/26 8:12 AM, Matti Vaittinen wrote:
> On 13/05/2026 07:49, Javier Carrasco wrote:
>> The events are registered for IIO_LIGHT and not for IIO_INTENSITY.
>> Use the correct channel type.
>> This bug was introduced in the first version of the driver.
>>
>> When at it, fix minor checkpatch code style warning (alignment).
>>
>> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>
>> ---
>>   drivers/iio/light/veml6030.c | 8 +++++---
>>   1 file changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/iio/light/veml6030.c b/drivers/iio/light/veml6030.c
>> index 745cf3ad7092..855f052b60c2 100644
>> --- a/drivers/iio/light/veml6030.c
>> +++ b/drivers/iio/light/veml6030.c
>> @@ -871,9 +871,11 @@ static irqreturn_t veml6030_event_handler(int irq, void *private)
>>       else
>>           evtdir = IIO_EV_DIR_FALLING;
>>   -    iio_push_event(indio_dev, IIO_UNMOD_EVENT_CODE(IIO_INTENSITY,
>> -                    0, IIO_EV_TYPE_THRESH, evtdir),
>> -                    iio_get_time_ns(indio_dev));
>> +    iio_push_event(indio_dev, IIO_UNMOD_EVENT_CODE(IIO_LIGHT,
>> +                               0,
>> +                               IIO_EV_TYPE_THRESH,
>> +                               evtdir),
>> +            iio_get_time_ns(indio_dev));
>>         return IRQ_HANDLED;
>>   }
>>
>
> Is this change reflected to the user-space? If so, is it safe? We shouldn't break the ABI, right?

On things like this, we will sometime risk breaking userspace in hopes
that no one was actually depending on it. If no one notices that we
broke it, did we really break it?

>
>
> Yours,
>     -- Matti
>
> ---
> Matti Vaittinen
> Linux kernel developer at ROHM Semiconductors
> Oulu Finland
>
> ~~ When things go utterly wrong vim users can always type :help! ~~