Re: [PATCH v4 09/11] hwmon: (amc6821) Convert to use regmap

From: Guenter Roeck
Date: Mon Jul 08 2024 - 10:43:34 EST


Hi Quentin.On 7/8/24 03:58, Quentin Schulz wrote:

+    regval = BIT(5) >> FIELD_GET(AMC6821_TEMP_SLOPE_MASK, regval);

BIT(5) doesn't have real meaning in the datasheet, what is in the datasheet though is that the slope is 32 / L-SLP[2:0] (well, you can more easily guess it from the datasheet than 0x20 or BIT(5) IMO).


Good point, though it is 32 >> L-SLP[2:0]. I'll make it 32 and add a comment,
but I won't send another version.

+        ret = amc6821_get_auto_point_temps(data->regmap, 1 - nr, otemps);

I would have been more comfortable with
nr ? 0 : 1


No, because that is a conditional and 1 - nr isn't.

Only nitpicks, so:

Reviewed-by: Quentin Schulz <quentin.schulz@xxxxxxxxx>


Thanks for the detailed reviews!

Guenter