Pull hwmon updates from Guenter Roeck:
"New drivers:
- driver for Sophgo SG2042 external hardware monitor
- thermal sensor driver for Surface Aggregator Module
Added support to existing drivers:
- oxp-sensors: Support for multiple new devices.
- nct6775: Added G15CF to ASUS WMI monitoring list
Modernizations:
- driver cleanup and update to use with_info API: ina2xx, lm92,
lm95234, max1619, max1668, and max6697.
API updates:
- removed unused devm_hwmon_device_unregister() API function
Other notable changes
- implement and use generic bus access delay for pmbus drivers
- use with scoped for each OF child loop in several drivers
- module unloading fixes for gsc-hwmon and ntc_thermistor drivers
- converted various drivers to use multi-byte regmap operations
- adt7475: Improved devicetree based configuration
- ltc2947: Move to firmware agnostic API
- ltc2978: Converted devicetree description to yaml
- max16065: Addressed overflows when writing limit attributes
Various other minor cleanups, fixes and improvements"
* tag 'hwmon-for-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (96 commits)
hwmon: Remove devm_hwmon_device_unregister() API function
hwmon: (sch5636) Print unknown ID in error string via %*pE
hwmon: (sht21) Use %*ph to print small buffer
hwmon: (pmbus/mpq7932) Constify struct regulator_desc
hwmon: pmbus: pli12096bc: Add write delay
hwmon: pmbus: zl6100: Use generic code
hwmon: pmbus: ucd9000: Use generic code
hwmon: pmbus: max15301: Use generic code
hwmon: pmbus: Implement generic bus access delay
hwmon: (ina2xx) Use shunt voltage to calculate current
hwmon: (ina2xx) Add support for current limits
hwmon: (ina2xx) Pass register to alert limit write functions
hwmon: (ina2xx) Convert to use with_info hwmon API
hwmon: (ina2xx) Move ina2xx_get_value()
hwmon: (ina2xx) Set alert latch
hwmon: (ina2xx) Consolidate chip initialization code
hwmon: (ina2xx) Fix various overflow issues
hwmon: (ina2xx) Re-initialize chip using regmap functions
hwmon: (ina2xx) Use local regmap pointer if used more than once
hwmon: (ina2xx) Mark regmap_config as const
...
#include <linux/of.h>
#include <linux/util_macros.h>
+ #include <dt-bindings/pwm/pwm.h>
+
/* Indexes for the sysfs hooks */
-
-#define INPUT 0
-#define MIN 1
-#define MAX 2
-#define CONTROL 3
-#define OFFSET 3
-#define AUTOMIN 4
-#define THERM 5
-#define HYSTERSIS 6
-
+enum adt_sysfs_id {
+ INPUT = 0,
+ MIN = 1,
+ MAX = 2,
+ CONTROL = 3,
+ OFFSET = 3, // Dup
+ AUTOMIN = 4,
+ THERM = 5,
+ HYSTERSIS = 6,
/*
* These are unique identifiers for the sysfs functions - unlike the
* numbers above, these are not also indexes into an array