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: (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: (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: (coretemp) Use PCI host bridge ID to identify CPU if necessary

Atom S12x0 CPUs are identified by the CPU host bridge ID. Add an override
table based on PCI IDs as well as code to detect it.

Added note: S1260 CPU ID string is known to be 'Intel Intel(R) Atom(TM) CPU
S1260 @ 2.00GHz'. Wait with pushing this code upstream until we know for sure
that there is no better means to identify this class of CPUs.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (coretemp) Add PCI device ID for CE41x0 CPUs

Since we now have to use PCI IDs to detect CPU types anyway, use this mechanism
to detect CE41x0 CPUs. Advantage is that it only requires a single entry and
covers all variants of CE41x0, including those unknown to us.

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