hwmon: (i5k_amb) Convert to use devm_ functions

Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (ibmaem) Convert to use devm_ functions

Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (w83627ehf) Detect current and voltage mode for thermal diodes

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (w83627ehf) Add support for SmartFanIV mode on W83667HG-B

SmartFan IV mode is supported on W83667HG-B, but configured differently than
on other chips and not detected. As a result, changing the fan control mode
was impossible if SmartFan IV mode is selected.

Detect SmartFan IV mode and make it configurable if was configured at system
startup.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (coretemp) Rename temp_data to core_data

We are going to use the data structure for power data as well.

Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (coretemp) Report power and energy consumption

Supported by SandyBridge and newer CPUs.

Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (it87) Use is_visible for voltage sensors

Simplify code and reduce object size by more than 300 bytes on x86_64.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (it87) Use is_visible for temperature sensors

Simplify code and reduce object size by more than 200 bytes on x86_64.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (it87) Use is_visible for fan attributes

Simplify code and reduce object size by almost 500 bytes on x86_64.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (it87) Use is_visible for pwm attributes

Simplify code and reduce object size by about 250 bytes on x86_64.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (it87) Use single group for miscellaneous attributes

Use is_visible to determine if attributes should be generated or not.
This simplifies the code and reduces object size by about 120 bytes
on x86_64.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (tmp401) Simplification and cleanup

Use two-dimensional array pointing to registers
Merge temperature and limit access function into a single function
Return eror codes from I2C accesses
Use DIV_ROUND_CLOSEST for rounding operations

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (tmp401) Add support for update_interval attribute

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (tmp401) Add support for TMP432

TMP432 is sililar to TMP431 with a second external temperature sensor.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (nct6775) Allocate attributes dynamically from templates

Static attribute allocation is large and very repetitive.
Allocate attributes and attribute groups dynamically instead.
This reduces the size of the driver source by more than 600 lines,
and object size by more than 20k (more than 30%).

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (nct6775) Support two SuperIO chips in the same system

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (nct6775) Add support for NCT6102D/6106D

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (nct6775) Add support for critical low/high temperature limits on NCT6106

Signed-off-by: Guenter Roeck <linux@roeck-us.net>