mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/1] iio: atlas-ezo: Fix humidity channel read support
@ 2026-10-12 11:45 Nikhil Gautam
  2026-10-12 11:45 ` [PATCH 1/1] " Nikhil Gautam
  2026-10-12 13:57 ` [PATCH 0/1] " Joshua Crofts
  0 siblings, 2 replies; 4+ messages in thread
From: Nikhil Gautam @ 2026-10-12 11:45 UTC (permalink / raw)
  To: linux-iio; +Cc: linux-kernel, jic23, dlechner, nuno.sa, andy, Nikhil Gautam

The atlas_ezo_read_raw() function currently rejects channels whose
type is not IIO_CONCENTRATION. As a result, the relative humidity channel
cannot access the raw or scale values, even though the driver defines support
for IIO_HUMIDITYRELATIVE.

Remove the early channel type check so that both concentration and
relative humidity channels can be handled by the existing mask-specific logic.

Nikhil Gautam (1):
  iio: atlas-ezo: Fix humidity channel read support

 drivers/iio/chemical/atlas-ezo-sensor.c | 3 ---
 1 file changed, 3 deletions(-)

-- 
2.39.5


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] iio: atlas-ezo: Fix humidity channel read support
  2026-10-12 11:45 [PATCH 0/1] iio: atlas-ezo: Fix humidity channel read support Nikhil Gautam
@ 2026-10-12 11:45 ` Nikhil Gautam
  2026-10-12 13:56   ` Joshua Crofts
  2026-10-12 13:57 ` [PATCH 0/1] " Joshua Crofts
  1 sibling, 1 reply; 4+ messages in thread
From: Nikhil Gautam @ 2026-10-12 11:45 UTC (permalink / raw)
  To: linux-iio; +Cc: linux-kernel, jic23, dlechner, nuno.sa, andy, Nikhil Gautam

The atlas_ezo_read_raw() function rejects channels that are not of
type IIO_CONCENTRATION, preventing the relative humidity channel
from reading raw and scale values.

Remove the early channel type check to allow both concentration
and relative humidity channels to reach the mask-specific handling.

Signed-off-by: Nikhil Gautam <nikhilgtr@gmail.com>
---
 drivers/iio/chemical/atlas-ezo-sensor.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/iio/chemical/atlas-ezo-sensor.c b/drivers/iio/chemical/atlas-ezo-sensor.c
index de0b87edd188..ee939e74bdae 100644
--- a/drivers/iio/chemical/atlas-ezo-sensor.c
+++ b/drivers/iio/chemical/atlas-ezo-sensor.c
@@ -117,9 +117,6 @@ static int atlas_ezo_read_raw(struct iio_dev *indio_dev,
 	struct atlas_ezo_data *data = iio_priv(indio_dev);
 	struct i2c_client *client = data->client;
 
-	if (chan->type != IIO_CONCENTRATION)
-		return -EINVAL;
-
 	switch (mask) {
 	case IIO_CHAN_INFO_RAW: {
 		int ret;
-- 
2.39.5


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] iio: atlas-ezo: Fix humidity channel read support
  2026-10-12 11:45 ` [PATCH 1/1] " Nikhil Gautam
@ 2026-10-12 13:56   ` Joshua Crofts
  0 siblings, 0 replies; 4+ messages in thread
From: Joshua Crofts @ 2026-10-12 13:56 UTC (permalink / raw)
  To: Nikhil Gautam; +Cc: linux-iio, linux-kernel, jic23, dlechner, nuno.sa, andy

On Mon, 12 Oct 2026 17:15:53 +0530
Nikhil Gautam <nikhilgtr@gmail.com> wrote:

> The atlas_ezo_read_raw() function rejects channels that are not of
> type IIO_CONCENTRATION, preventing the relative humidity channel
> from reading raw and scale values.
> 
> Remove the early channel type check to allow both concentration
> and relative humidity channels to reach the mask-specific handling.
> 
> Signed-off-by: Nikhil Gautam <nikhilgtr@gmail.com>
> ---

What a weird check...

Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>

Additionally, Sashiko found a potential I2C read issue, please check
it out.

https://sashiko.dev/#/patchset/20261012114553.3327-1-nikhilgtr%40gmail.com

-- 
Kind regards,
Joshua Crofts

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/1] iio: atlas-ezo: Fix humidity channel read support
  2026-10-12 11:45 [PATCH 0/1] iio: atlas-ezo: Fix humidity channel read support Nikhil Gautam
  2026-10-12 11:45 ` [PATCH 1/1] " Nikhil Gautam
@ 2026-10-12 13:57 ` Joshua Crofts
  1 sibling, 0 replies; 4+ messages in thread
From: Joshua Crofts @ 2026-10-12 13:57 UTC (permalink / raw)
  To: Nikhil Gautam; +Cc: linux-iio, linux-kernel, jic23, dlechner, nuno.sa, andy

On Mon, 12 Oct 2026 17:15:52 +0530
Nikhil Gautam <nikhilgtr@gmail.com> wrote:

> The atlas_ezo_read_raw() function currently rejects channels whose
> type is not IIO_CONCENTRATION. As a result, the relative humidity channel
> cannot access the raw or scale values, even though the driver defines support
> for IIO_HUMIDITYRELATIVE.
> 
> Remove the early channel type check so that both concentration and
> relative humidity channels can be handled by the existing mask-specific logic.
> 
> Nikhil Gautam (1):
>   iio: atlas-ezo: Fix humidity channel read support
> 
>  drivers/iio/chemical/atlas-ezo-sensor.c | 3 ---
>  1 file changed, 3 deletions(-)
> 

No need to add a cover letter if you're just sending one patch.

Thanks.

-- 
Kind regards,
Joshua Crofts

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-12 13:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-12 11:45 [PATCH 0/1] iio: atlas-ezo: Fix humidity channel read support Nikhil Gautam
2026-10-12 11:45 ` [PATCH 1/1] " Nikhil Gautam
2026-10-12 13:56   ` Joshua Crofts
2026-10-12 13:57 ` [PATCH 0/1] " Joshua Crofts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®