hwmon: (nct6775) Fix IN scaling factors for 6798/6799
authorAhmad Khalifa <ahmad@khalifa.ws>
Wed, 19 Jul 2023 19:28:48 +0000 (20:28 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 19 Jul 2023 19:56:12 +0000 (12:56 -0700)
commit13558a2e6341d1ba6dff9f8e2febf97877067885
tree8613064402cae99642cc2c97b96a52cc99ec151f
parent957961b6dcc813e6222a4f7e8e3626fcd1f1e098
hwmon: (nct6775) Fix IN scaling factors for 6798/6799

Scaling for VTT/VIN5/VIN6 registers were based on prior chips
* Split scaling factors for 6798/6799 and assign at probe()
* Pass them through driver data to sysfs functions

Tested on nct6799 with old/new input/min/max

Fixes: 0599682b826f ("hwmon: (nct6775) Add support for NCT6798D")
Signed-off-by: Ahmad Khalifa <ahmad@khalifa.ws>
Link: https://lore.kernel.org/r/20230719192848.337508-1-ahmad@khalifa.ws
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/nct6775-core.c
drivers/hwmon/nct6775.h