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) Use fixed attributes for SYSTIN, CPUTIN, and AUXTIN on NCT6775/NCT6776

So far the code used dynamic temperature attributes for SYSTIN, CPUTIN, and
AUXTIN on NCT6775/NCT6776. That has the disadvantage that the mapping of
tempX_type and tempX_offset does not necessarily match reality, and code
complexity is increased.

To avoid mapping problems and simplify the code, use fixed mapping instead, and
use temp[4-9] for additional temperature sources.

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: Driver for Nuvoton NCT6775F, NCT6776F, and NCT6779D

This driver will replace the w83627ehf driver for NCT6775F and NCT6776F,
and provides support for NCT6779D.

This patch provides support for voltage monitor attributes.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (nct6775) Add case open detection

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

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (nct6775) Add support for fan speed attributes

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

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (nct6775) Add support for fan debounce module parameter

If set, fan debounce is enabled when loading the driver.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (nct6775) Add power management support

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (nct6775) Add support for pwm, pwm_mode, and pwm_enable

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (nct6775) Add support for automatic fan control

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (nct6775) Add support for weighted fan control

The NCT677X series support weighted fan control. In this mode, a secondary
temperature source is used in addition to the primary temperature source to
control fan speed. Add support for this feature.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (nct6775) Detect and report additional temperature sources

Scan all temperature sources used for fan control and report if additional
monitoring registers are available.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
hwmon: (nct6775) Only report VID if supported and enabled

VID is not always enabled (NCT6775, NCT6776) or supported (NCT6779).

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: (pmbus/ltc2978) Fix temperature reporting

On LTC2978, only READ_TEMPERATURE is supported. It reports
the internal junction temperature. This register is unpaged.

On LTC3880, READ_TEMPERATURE and READ_TEMPERATURE2 are supported.
READ_TEMPERATURE is paged and reports external temperatures.
READ_TEMPERATURE2 is unpaged and reports the internal junction
temperature.

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