lkml.org 
[lkml]   [2023]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/3] hwmon: max31827: Add PEC support
From
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


\
 
 \ /
  Last update: 2023-12-18 17:28    [W:0.074 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site