[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <16fc3ac8-5040-57dc-2651-39613899e308@metafoo.de>
Date: Fri, 5 Aug 2016 11:35:37 +0200
From: Lars-Peter Clausen <lars@...afoo.de>
To: Alison Schofield <amsfield22@...il.com>,
Matt Ranostay <mranostay@...il.com>
Cc: Peter Meerwald-Stadler <pmeerw@...erw.net>,
Jonathan Cameron <jic23@...nel.org>,
Hartmut Knaack <knaack.h@....de>,
"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] iio: humidity: hdc100x: use i2c_master_recv to read
sensor data
On 08/05/2016 01:37 AM, Alison Schofield wrote:
[...]
>
> No, that's not what this bug & patch is about.
>
> This patch is about the fact that we are reading the temp &
> humid data registers incorrectly in the current driver and
> we are exposing incorrect numbers via sysfs raw reads.
>
> I have tried by testing and inspection each read protocol.
> It NAKs all of them - except for read_byte. Problem with
> read_byte is that we are always getting the MSB. We do 2
> consecutive read_bytes, expecting MSB,LSB, but get MSB,MSB.
>
> I have been doing msmts w this driver for quite awhile, and
> to my human eye they looked reasonable in integer format.
> But, once I started looking at the byte level, to test moving
> those bytes into buffers, I saw the unmistakable pattern:
> MSB == LSB always.
>
> Sorry to be the bearer of bad news. I still hold out hope that
> we can fix this with some smbus magic and not 'kill backward
> compatibility'.
If the part is not SMBUS compatible I don't see a reason to try to force it.
It's also not affecting backwards compatibility, the driver never worked
correctly in the first place with SMBUS only, so there is no regression.
After the patch it sill does not work.
Powered by blists - more mailing lists