hwmon: (nct6775) Additional TEMP registers for nct6799
authorAhmad Khalifa <ahmad@khalifa.ws>
Wed, 2 Aug 2023 18:58:21 +0000 (19:58 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 21 Aug 2023 13:04:30 +0000 (06:04 -0700)
commitb7f1f7b2523a6a4382f12fe953380b847b80e09d
treef8f4d268d405b817085480a5b838ec0efff005cc
parent43fbe66dc2164c03e7a58dfcf0ab737b2f12cc79
hwmon: (nct6775) Additional TEMP registers for nct6799

Additional TEMP registers for nct6798d, nct6799d-r and nct6796d-s
This allows the max/max_hyst/crit attributes to be shown/stored

* Increase NUM_TEMP from 10 to 12
* Separate TEMP/MON_TEMP/OVER/HYST/CRIT registers
* Rename "PECI Calibration" to include "TSI" too
* Update ALARM/BEEP bits for temps for 6799
* For 6799, keep temp_fixed_num at 6, but increase
  num_temp_alarms/num_temp_beeps to 7/8

Tested with NCT6799D-R showing additional sysfs attributes:
* temp3-temp8: max/max_hyst/beep/alarm
* temp3-temp6: crit/offset

Signed-off-by: Ahmad Khalifa <ahmad@khalifa.ws>
Link: https://lore.kernel.org/r/20230802185820.3642399-1-ahmad@khalifa.ws
[groeck: Addressed cosmetic checkpatch complaints]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/nct6775-core.c
drivers/hwmon/nct6775.h