Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Gwendal Grignou <gwendal@chromium.org>
Cc: jongpil19.jung@samsung.com, lars@metafoo.de,
	andy.shevchenko@gmail.com, linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio: sx9360: enable push iio event
Date: Sat, 22 Jan 2022 17:29:40 +0000	[thread overview]
Message-ID: <20220122172940.125d8033@jic23-huawei> (raw)
In-Reply-To: <20220118212504.832429-1-gwendal@chromium.org>

On Tue, 18 Jan 2022 13:25:04 -0800
Gwendal Grignou <gwendal@chromium.org> wrote:

> From: Jongpil Jung <jongpil19.jung@samsung.com>

Hi, 

Patch title is not really clear. It suggests this is enabling
a new feature rather than fixing anything.  Please rephrase.

> 
> Fixes: f75095753 ("iio:proximity:sx9360: Add sx9360 support")
This is part of the tag block so should appear.
> 
> To convert SX9360 status register ["REG_STAT"], into a channel
> index, we need to right shift by |stat_offset|, not left shift.
> Also the PROXSTAT bit (3) is for channel 1 (PHM, PHase Measured), not (PHR,
> PHase Reference, channel 0), so the offset is 2 instead of 3.
> 
Phase 

fixes tag should be here.
> Signed-off-by: Jongpil Jung <jongpil19.jung@samsung.com>
> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>

Thanks,

Jonathan

> ---
>  drivers/iio/proximity/sx9360.c    | 2 +-
>  drivers/iio/proximity/sx_common.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/proximity/sx9360.c b/drivers/iio/proximity/sx9360.c
> index 6fd6561bb6f5b8..3ebb30c8a4f61d 100644
> --- a/drivers/iio/proximity/sx9360.c
> +++ b/drivers/iio/proximity/sx9360.c
> @@ -775,7 +775,7 @@ static const struct sx_common_chip_info sx9360_chip_info = {
>  	.reg_reset = SX9360_REG_RESET,
>  
>  	.mask_enable_chan = SX9360_REG_GNRL_CTRL0_PHEN_MASK,
> -	.stat_offset = 3,
> +	.stat_offset = 2,
>  	.num_channels = SX9360_NUM_CHANNELS,
>  	.num_default_regs = ARRAY_SIZE(sx9360_default_regs),
>  
> diff --git a/drivers/iio/proximity/sx_common.c b/drivers/iio/proximity/sx_common.c
> index ac8fd5920481cb..a7c07316a0a91e 100644
> --- a/drivers/iio/proximity/sx_common.c
> +++ b/drivers/iio/proximity/sx_common.c
> @@ -87,7 +87,7 @@ static void sx_common_push_events(struct iio_dev *indio_dev)
>  		return;
>  	}
>  
> -	val <<= data->chip_info->stat_offset;
> +	val >>= data->chip_info->stat_offset;
>  
>  	/*
>  	 * Only iterate over channels with changes on proximity status that have


  reply	other threads:[~2022-01-22 17:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18 21:25 [PATCH] iio: sx9360: enable push iio event Gwendal Grignou
2022-01-22 17:29 ` Jonathan Cameron [this message]
2022-01-22 18:15   ` Andy Shevchenko
2022-01-22 19:14     ` Jonathan Cameron
2022-01-22 19:14       ` Jonathan Cameron
2022-01-24  6:00       ` Gwendal Grignou

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=20220122172940.125d8033@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=gwendal@chromium.org \
    --cc=jongpil19.jung@samsung.com \
    --cc=lars@metafoo.de \
    --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