linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio: light: tsl2563: use correct event code
Date: Wed, 21 Jun 2017 20:50:39 +0100	[thread overview]
Message-ID: <20170621205039.5872f8c3@kernel.org> (raw)
In-Reply-To: <1497977197-19157-1-git-send-email-akinobu.mita@gmail.com>

On Wed, 21 Jun 2017 01:46:37 +0900
Akinobu Mita <akinobu.mita@gmail.com> wrote:

> The TSL2563 driver provides three iio channels, two of which are raw ADC
> channels (channel 0 and channel 1) in the device and the remaining one
> is calculated by the two.  The ADC channel 0 only supports programmable
> interrupt with threshold settings and this driver supports the event but
> the generated event code does not contain the corresponding iio channel
> type.
> 
> Cc: Jonathan Cameron <jic23@kernel.org>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Hmm. Patch is clearly correct, but this has been broken for a
long time.  I worry slightly that we may have userspace
code depending on the broken format.

If any of that does turn up, we may have to emit both the
write event code and the wrong one.  Guess we'll wait and see
what happens.

Applied to the fixes-togreg branch of iio.git and marked for stable.

Thanks,

Jonathan
> ---
>  drivers/iio/light/tsl2563.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/light/tsl2563.c b/drivers/iio/light/tsl2563.c
> index e7d4ea7..7599693 100644
> --- a/drivers/iio/light/tsl2563.c
> +++ b/drivers/iio/light/tsl2563.c
> @@ -626,7 +626,7 @@ static irqreturn_t tsl2563_event_handler(int irq, void *private)
>  	struct tsl2563_chip *chip = iio_priv(dev_info);
>  
>  	iio_push_event(dev_info,
> -		       IIO_UNMOD_EVENT_CODE(IIO_LIGHT,
> +		       IIO_UNMOD_EVENT_CODE(IIO_INTENSITY,
>  					    0,
>  					    IIO_EV_TYPE_THRESH,
>  					    IIO_EV_DIR_EITHER),


      reply	other threads:[~2017-06-21 19:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-20 16:46 [PATCH] iio: light: tsl2563: use correct event code Akinobu Mita
2017-06-21 19:50 ` 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=20170621205039.5872f8c3@kernel.org \
    --to=jic23@kernel.org \
    --cc=akinobu.mita@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    /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).