devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo.bianconi83-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+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: Thu, 21 Sep 2017 17:36:10 +0200	[thread overview]
Message-ID: <CAA2SeN+0rjAB-84tZi81wu8AGRWOShwLGbW1OffO3GZ92-QOzQ@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdaT-G_fRYVjhwiQiYuhjVHG7f_D1R=GHZVUpH7_6j7OHw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

> 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.

Regards,
Lorenzo

>
> Yours,
> Linus Walleij



-- 
UNIX is Sexy: who | grep -i blonde | talk; cd ~; wine; talk; touch;
unzip; touch; strip; gasp; finger; gasp; mount; fsck; more; yes; gasp;
umount; make clean; sleep

  parent reply	other threads:[~2017-09-21 15:36 UTC|newest]

Thread overview: 22+ 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
     [not found] ` <20170830115043.3738-1-lorenzo.bianconi-qxv4g6HH51o@public.gmane.org>
2017-08-30 11:50   ` [PATCH v3 1/5] iio: st_sensors: add register mask for status register Lorenzo Bianconi
     [not found]     ` <20170830115043.3738-2-lorenzo.bianconi-qxv4g6HH51o@public.gmane.org>
2017-09-21 11:13       ` Linus Walleij
     [not found]         ` <CACRpkdaT-G_fRYVjhwiQiYuhjVHG7f_D1R=GHZVUpH7_6j7OHw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-21 15:36           ` Lorenzo Bianconi [this message]
     [not found]             ` <CAA2SeN+0rjAB-84tZi81wu8AGRWOShwLGbW1OffO3GZ92-QOzQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
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
     [not found]     ` <20170830115043.3738-3-lorenzo.bianconi-qxv4g6HH51o@public.gmane.org>
2017-09-21 11:14       ` Linus Walleij
     [not found]         ` <CACRpkdY-xgQ_Eu_Zf1EH-AnSo1pxTq8Pfg37UorMKCk_N7_TEg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-21 15:38           ` Lorenzo Bianconi
     [not found]             ` <CAA2SeNJ8cq+hdEQP4d9Ped9SBQnwCgmSydbShtOexuSEwRGzeA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
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
     [not found]     ` <20170830115043.3738-4-lorenzo.bianconi-qxv4g6HH51o@public.gmane.org>
2017-09-21 11:15       ` Linus Walleij
     [not found]         ` <CACRpkdbFvAr26d_ExN-PuazsA_ZbPoOFuCKn-k-s3uwVvd64jg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-09 20:59           ` Jonathan Cameron
2017-08-30 11:50   ` [PATCH v3 4/5] iio: accel: add support to LIS2DW12 Lorenzo Bianconi
     [not found]     ` <20170830115043.3738-5-lorenzo.bianconi-qxv4g6HH51o@public.gmane.org>
2017-09-21 11:17       ` Linus Walleij
     [not found]         ` <CACRpkdZE_67Qq8=E+Hs1kSH5cjUv_EOMiogZ+ss_wd_KNmzLfw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
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
     [not found]     ` <20170830115043.3738-6-lorenzo.bianconi-qxv4g6HH51o@public.gmane.org>
2017-09-21 11:18       ` Linus Walleij
     [not found]         ` <CACRpkdbKkctx3t3J36HBwkaYRq_CTadDed-ZkfL8ynXYBKVytg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
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-10-01 13:15     ` Lorenzo Bianconi
     [not found]       ` <CAA2SeNKaUhLvLV6iUoirotMtz+nitW5LzLS0una3=BH9v7=0qA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-02 10:33         ` Jonathan Cameron
     [not found]           ` <20171002113312.00000064-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
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=CAA2SeN+0rjAB-84tZi81wu8AGRWOShwLGbW1OffO3GZ92-QOzQ@mail.gmail.com \
    --to=lorenzo.bianconi83-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lorenzo.bianconi-qxv4g6HH51o@public.gmane.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).