linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Ricardo Ribalda <ribalda@chromium.org>,
	Jiri Kosina <jikos@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	linux-input@vger.kernel.org, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] iio: hid-sensor-prox: Fix invalid read_raw for attention
Date: Sun, 15 Dec 2024 12:57:58 +0000	[thread overview]
Message-ID: <20241215125758.558cc0ef@jic23-huawei> (raw)
In-Reply-To: <d164919c9290ca1410bc21746511799a5c17b94d.camel@linux.intel.com>

On Fri, 22 Nov 2024 09:55:04 -0800
srinivas pandruvada <srinivas.pandruvada@linux.intel.com> wrote:

> On Fri, 2024-11-22 at 17:36 +0000, Ricardo Ribalda wrote:
> > The attention channel is a IIO_CHAN_INFO_PROCESSED, not a
> > IIO_CHAN_INFO_RAW.
> > 
> > Modify prox_read_raw() to support it.
> > 
> > Fixes: 596ef5cf654b ("iio: hid-sensor-prox: Add support for more
> > channels")
> > Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>  
> 
> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

Applied to the fixes-togreg branch of iio.git.

Thanks,

Jonathan

> 
> > ---
> > Changes in v2:
> > - Do not change the condition for applying the multiplier.
> > - Link to v1:
> > https://lore.kernel.org/r/20241121-fix-processed-v1-1-4fae6770db30@chromium.org
> > ---
> >  drivers/iio/light/hid-sensor-prox.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/iio/light/hid-sensor-prox.c
> > b/drivers/iio/light/hid-sensor-prox.c
> > index e8e7b2999b4c..0daa8d365a6c 100644
> > --- a/drivers/iio/light/hid-sensor-prox.c
> > +++ b/drivers/iio/light/hid-sensor-prox.c
> > @@ -94,6 +94,7 @@ static int prox_read_raw(struct iio_dev *indio_dev,
> >  	*val2 = 0;
> >  	switch (mask) {
> >  	case IIO_CHAN_INFO_RAW:
> > +	case IIO_CHAN_INFO_PROCESSED:
> >  		if (chan->scan_index >= prox_state->num_channels)
> >  			return -EINVAL;
> >  		address = prox_state->channel2usage[chan-  
> > >scan_index];  
> > 
> > ---
> > base-commit: decc701f41d07481893fdea942c0ac6b226e84cd
> > change-id: 20241121-fix-processed-ed1a95641e64
> > 
> > Best regards,  
> 


      reply	other threads:[~2024-12-15 12:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-22 17:36 [PATCH v2] iio: hid-sensor-prox: Fix invalid read_raw for attention Ricardo Ribalda
2024-11-22 17:55 ` srinivas pandruvada
2024-12-15 12:57   ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241215125758.558cc0ef@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=jikos@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ribalda@chromium.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).