Re: [PATCH v3 1/5] iio: st_sensors: add register mask for status register

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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

> > On Wed, Aug 30, 2017 at 1:50 PM, Lorenzo Bianconi
> > <lorenzo.bianconi83@xxxxxxxxx> 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@xxxxxx>  
> >
> > Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> >
> > 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  
> 
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux