On 12/18/23 01:12, Matyas, Daniel wrote:
-----Original Message-----
From: Guenter Roeck <groeck7@xxxxxxxxx> On Behalf Of Guenter Roeck
Sent: Saturday, December 16, 2023 3:33 AM
To: Matyas, Daniel <Daniel.Matyas@xxxxxxxxxx>
Cc: Jean Delvare <jdelvare@xxxxxxxx>; Rob Herring
<robh+dt@xxxxxxxxxx>; Krzysztof Kozlowski
<krzysztof.kozlowski+dt@xxxxxxxxxx>; Conor Dooley
<conor+dt@xxxxxxxxxx>; Jonathan Corbet <corbet@xxxxxxx>; linux-
hwmon@xxxxxxxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx; linux-
kernel@xxxxxxxxxxxxxxx; linux-doc@xxxxxxxxxxxxxxx
Subject: Re: [PATCH 1/3] hwmon: max31827: Add PEC support
[External]
On 12/15/23 12:28, Matyas, Daniel wrote:
-----Original Message-----
From: Guenter Roeck <groeck7@xxxxxxxxx> On Behalf Of Guenter
Roeck
Sent: Thursday, December 14, 2023 6:10 PM
To: Matyas, Daniel <Daniel.Matyas@xxxxxxxxxx>
Cc: Jean Delvare <jdelvare@xxxxxxxx>; Rob Herring
<robh+dt@xxxxxxxxxx>; Krzysztof Kozlowski
<krzysztof.kozlowski+dt@xxxxxxxxxx>; Conor Dooley
<conor+dt@xxxxxxxxxx>; Jonathan Corbet <corbet@xxxxxxx>; linux-
hwmon@xxxxxxxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx; linux-
kernel@xxxxxxxxxxxxxxx; linux-doc@xxxxxxxxxxxxxxx
Subject: Re: [PATCH 1/3] hwmon: max31827: Add PEC support
[External]
On 12/14/23 06:36, Daniel Matyas wrote:
Removed regmap and used my functions to read, write and update
bits.
In these functions i2c_smbus_ helper functions are used. These check
if there were any PEC errors during read. In the write function, if
PEC is enabled, I check for PEC Error bit, to see if there were any
errors.
Signed-off-by: Daniel Matyas <daniel.matyas@xxxxxxxxxx>
The "PEC" attribute needs to be attached to the I2C device.
See lm90.c or pmbus_core.c for examples.
I added pec_show() and pec_store() functions and created the pec file
within the max31827_groups.
I did not set the flags, because I want them to be set only in pec_store.
By default the PEC flag should not be set.
That is not the point. Again,
>> The "PEC" attribute needs to be attached to the I2C device.
>> See lm90.c or pmbus_core.c for examples.
That is not about regmap, it is about the location of the "pec" attribute.
I understand that this is not about regmap. Still, I would argue, that when I am registering the device with groups, the "pec" attribute is attached.
Sure. To the hwmon device. I asked you to attach it to the i2c device, as
implemented all other hwmon drivers supporting this attribute. I am not
inclined to make an exception for this driver, and I do not see a reason
to do so.
Guenter