* [PATCH v2 0/2] iio: light: veml6030: fix channel type for events and remove unused read
@ 2026-05-14 1:01 Javier Carrasco
2026-05-14 1:01 ` [PATCH v2 1/2] iio: light: veml6030: fix channel type when pushing events Javier Carrasco
0 siblings, 1 reply; 2+ messages in thread
From: Javier Carrasco @ 2026-05-14 1:01 UTC (permalink / raw)
To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Rishi Gupta
Cc: Javier Carrasco, linux-iio, linux-kernel, Jonathan Cameron,
stable
This series fixes a current bug that leads to pushing events with the
wrong channel type (IIO_INTENSITY instead of IIO_LIGHT, the latter being
the configured channel for events), and also removes an unnecessary read
operation when setting a new scale.
This series has been tested on real HW (veml6030) with positive results.
V1 of this new series is V2 of the one I recently sent to provide a new
driver for the veml6031x00 family, and additionally fix these issues.
As the driver will be split to ease the review, it will take some
time until I send V3, and they are actually independent matters,
I have moved these 2 simpler patches to this separate series, keeping V2
(where these 2 patches were sent for the first time) as the common
ancestor. I have provided a link to it at the end of this cover letter.
To: Jonathan Cameron <jic23@kernel.org>
To: David Lechner <dlechner@baylibre.com>
To: Nuno Sá <nuno.sa@analog.com>
To: Andy Shevchenko <andy@kernel.org>
To: Rishi Gupta <gupt21@gmail.com>
Cc: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: linux-iio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Changes in v2:
- Add fixes tag to the bug fix in [1/2].
- Remove Fixes tag for [2/2] as it does not fix a bug.
- Fix indentation in [1/2].
- Link to v1: https://lore.kernel.org/r/20260513-veml6031x00-v2-0-4703ca661a1d@gmail.com
---
Javier Carrasco (2):
iio: light: veml6030: fix channel type when pushing events
iio: light: veml6030: remove unnecessary read of IT index
drivers/iio/light/veml6030.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
---
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
change-id: 20260514-veml6030-fixes-ba43c3c72857
Best regards,
--
Javier Carrasco <javier.carrasco.cruz@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH v2 1/2] iio: light: veml6030: fix channel type when pushing events
2026-05-14 1:01 [PATCH v2 0/2] iio: light: veml6030: fix channel type for events and remove unused read Javier Carrasco
@ 2026-05-14 1:01 ` Javier Carrasco
0 siblings, 0 replies; 2+ messages in thread
From: Javier Carrasco @ 2026-05-14 1:01 UTC (permalink / raw)
To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Rishi Gupta
Cc: Javier Carrasco, linux-iio, linux-kernel, Jonathan Cameron,
stable
The events are registered for IIO_LIGHT and not for IIO_INTENSITY.
Use the correct channel type.
When at it, fix minor checkpatch code style warning (alignment).
Cc: stable@vger.kernel.org
Fixes: 7b779f573c48 ("iio: light: add driver for veml6030 ambient light sensor")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
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 6bcacae3863c..da8c32cabfd6 100644
--- a/drivers/iio/light/veml6030.c
+++ b/drivers/iio/light/veml6030.c
@@ -875,9 +875,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;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-14 1:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-14 1:01 [PATCH v2 0/2] iio: light: veml6030: fix channel type for events and remove unused read Javier Carrasco
2026-05-14 1:01 ` [PATCH v2 1/2] iio: light: veml6030: fix channel type when pushing events Javier Carrasco
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox