All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	Lorenzo Bianconi <lorenzo.bianconi@st.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH v3 1/5] iio: st_sensors: add register mask for status register
Date: Mon, 9 Oct 2017 21:03:26 +0100	[thread overview]
Message-ID: <20171009210326.3d03a858@archlinux> (raw)
In-Reply-To: <CAA2SeN+0rjAB-84tZi81wu8AGRWOShwLGbW1OffO3GZ92-QOzQ@mail.gmail.com>

On Thu, 21 Sep 2017 17:36:10 +0200
Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> wrote:

> > On Wed, Aug 30, 2017 at 1:50 PM, Lorenzo Bianconi
> > <lorenzo.bianconi83@gmail.com> wrote:
> >  
> >> Introduce register mask for data-ready status register since
> >> pressure sensors (e.g. LPS22HB) export just two channels
> >> (BIT(0) and BIT(1)) and BIT(2) is marked reserved while in
> >> st_sensors_new_samples_available() value read from status register
> >> is masked using 0x7.
> >> Moreover do not mask status register using active_scan_mask since
> >> now status value is properly masked and if the result is not zero the
> >> interrupt has to be consumed by the driver. This fix an issue on LPS25H
> >> and LPS331AP where channel definition is swapped respect to status
> >> register.
> >> Furthermore that change allows to properly support new devices
> >> (e.g LIS2DW12) that report just ZYXDA (data-ready) field in status register
> >> to figure out if the interrupt has been generated by the device.
> >>
> >> Fixes: 97865fe41322 (iio: st_sensors: verify interrupt event to status)
> >> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>  
> >
> > Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> >
> > I'm a bit worried that we would need to use this on some of the
> > older sensors too, mainly because of mine and others' ignorance.
> > Have you looked over everything or just pressure sensors?  
> 
> I double-checked ds for all supported devices and just pressure
> sensors have 0x3 as status mask.

Ideally this patch would have gone via the fixes tree but we have
far too many patches queued up behind it for me to want to do that now.
Hence applied to the togreg branch of iio.git and pushed out
as testing for the autobuilders to play with it.

Thanks,

Jonathan

> 
> Regards,
> Lorenzo
> 
> >
> > Yours,
> > Linus Walleij  
> 
> 
> 


WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Lorenzo Bianconi
	<lorenzo.bianconi83-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Linus Walleij
	<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Lorenzo Bianconi <lorenzo.bianconi-qxv4g6HH51o@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v3 1/5] iio: st_sensors: add register mask for status register
Date: Mon, 9 Oct 2017 21:03:26 +0100	[thread overview]
Message-ID: <20171009210326.3d03a858@archlinux> (raw)
In-Reply-To: <CAA2SeN+0rjAB-84tZi81wu8AGRWOShwLGbW1OffO3GZ92-QOzQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Thu, 21 Sep 2017 17:36:10 +0200
Lorenzo Bianconi <lorenzo.bianconi83-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> > On Wed, Aug 30, 2017 at 1:50 PM, Lorenzo Bianconi
> > <lorenzo.bianconi83-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >  
> >> Introduce register mask for data-ready status register since
> >> pressure sensors (e.g. LPS22HB) export just two channels
> >> (BIT(0) and BIT(1)) and BIT(2) is marked reserved while in
> >> st_sensors_new_samples_available() value read from status register
> >> is masked using 0x7.
> >> Moreover do not mask status register using active_scan_mask since
> >> now status value is properly masked and if the result is not zero the
> >> interrupt has to be consumed by the driver. This fix an issue on LPS25H
> >> and LPS331AP where channel definition is swapped respect to status
> >> register.
> >> Furthermore that change allows to properly support new devices
> >> (e.g LIS2DW12) that report just ZYXDA (data-ready) field in status register
> >> to figure out if the interrupt has been generated by the device.
> >>
> >> Fixes: 97865fe41322 (iio: st_sensors: verify interrupt event to status)
> >> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi-qxv4g6HH51o@public.gmane.org>  
> >
> > Reviewed-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> >
> > I'm a bit worried that we would need to use this on some of the
> > older sensors too, mainly because of mine and others' ignorance.
> > Have you looked over everything or just pressure sensors?  
> 
> I double-checked ds for all supported devices and just pressure
> sensors have 0x3 as status mask.

Ideally this patch would have gone via the fixes tree but we have
far too many patches queued up behind it for me to want to do that now.
Hence applied to the togreg branch of iio.git and pushed out
as testing for the autobuilders to play with it.

Thanks,

Jonathan

> 
> Regards,
> Lorenzo
> 
> >
> > Yours,
> > Linus Walleij  
> 
> 
> 

  reply	other threads:[~2017-10-09 20:58 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-30 11:50 [PATCH v3 0/5] Add support to LIS2DW12 accel sensor Lorenzo Bianconi
2017-08-30 11:50 ` Lorenzo Bianconi
2017-08-30 11:50 ` [PATCH v3 1/5] iio: st_sensors: add register mask for status register Lorenzo Bianconi
2017-08-30 11:50   ` Lorenzo Bianconi
2017-09-21 11:13   ` Linus Walleij
2017-09-21 11:13     ` Linus Walleij
2017-09-21 15:36     ` Lorenzo Bianconi
2017-09-21 15:36       ` Lorenzo Bianconi
2017-10-09 20:03       ` Jonathan Cameron [this message]
2017-10-09 20:03         ` Jonathan Cameron
2017-08-30 11:50 ` [PATCH v3 2/5] iio: st_sensors: decouple irq1 configuration parameters from the irq2 ones Lorenzo Bianconi
2017-08-30 11:50   ` Lorenzo Bianconi
2017-09-21 11:14   ` Linus Walleij
2017-09-21 11:14     ` Linus Walleij
2017-09-21 15:38     ` Lorenzo Bianconi
2017-09-21 15:38       ` Lorenzo Bianconi
2017-10-09 20:05       ` Jonathan Cameron
2017-10-09 20:05         ` Jonathan Cameron
2017-08-30 11:50 ` [PATCH v3 3/5] iio: st_sensors: do not always write enable_axis register Lorenzo Bianconi
2017-08-30 11:50   ` Lorenzo Bianconi
2017-09-21 11:15   ` Linus Walleij
2017-09-21 11:15     ` Linus Walleij
2017-10-09 20:59     ` Jonathan Cameron
2017-10-09 20:59       ` Jonathan Cameron
2017-08-30 11:50 ` [PATCH v3 4/5] iio: accel: add support to LIS2DW12 Lorenzo Bianconi
2017-08-30 11:50   ` Lorenzo Bianconi
2017-09-21 11:17   ` Linus Walleij
2017-09-21 11:17     ` Linus Walleij
2017-10-09 21:00     ` Jonathan Cameron
2017-10-09 21:00       ` Jonathan Cameron
2017-08-30 11:50 ` [PATCH v3 5/5] dt-bindings: iio: accel: add LIS2DW12 sensor device binding Lorenzo Bianconi
2017-08-30 11:50   ` Lorenzo Bianconi
2017-09-21 11:18   ` Linus Walleij
2017-09-21 11:18     ` Linus Walleij
2017-10-09 21:02     ` Jonathan Cameron
2017-10-09 21:02       ` Jonathan Cameron
2017-09-03 16:52 ` [PATCH v3 0/5] Add support to LIS2DW12 accel sensor Jonathan Cameron
2017-09-03 16:52   ` Jonathan Cameron
2017-10-01 13:15   ` Lorenzo Bianconi
2017-10-01 13:15     ` Lorenzo Bianconi
2017-10-02 10:33     ` Jonathan Cameron
2017-10-02 10:33       ` Jonathan Cameron
2017-10-02 10:37       ` Lorenzo Bianconi
2017-10-02 10:37         ` Lorenzo Bianconi

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=20171009210326.3d03a858@archlinux \
    --to=jic23@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=lorenzo.bianconi83@gmail.com \
    --cc=lorenzo.bianconi@st.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.