[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5baa93fe-bd08-4f11-9c5c-42060e89930c@roeck-us.net>
Date: Mon, 18 Dec 2023 08:26:50 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: "Matyas, Daniel" <Daniel.Matyas@...log.com>
Cc: Jean Delvare <jdelvare@...e.com>, Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>, Jonathan Corbet <corbet@....net>,
"linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>
Subject: Re: [PATCH 1/3] hwmon: max31827: Add PEC support
On 12/18/23 06:55, Matyas, Daniel wrote:
[ ... ]
>> On top of that, it is not clear why regmap can't be used in the first place.
>> It seems that the major change is that one needs to read the configuration
>> register after a write to see if there was a PEC error. It is not immediately
>> obvious why that additional read (if indeed necessary) would require
>> regmap support to be dropped.
>>
>
> I tried out writing and and reading with regmap, but it is not working properly. Even if I modify the client flag, I still receive only 2 bytes of data (a word). I should be receiving 2+1 bytes = data + CRC-8.
>
> With i2c_smbus reads and writes, when I set the flag, I receive the 2+1 bytes, as expected.
>
The SMBus code in drivers/i2c/i2c-core-smbus.c is supposed to check
if the received PEC is correct for SMBus transfers. Are you saying
that this doesn't work, or that regmap doesn't use SMBus functions
to communicate with the chip ?
Thanks,
Guenter
Powered by blists - more mailing lists