Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b5ca741 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'hwmon-for-linus-v4.1' of...

Merge tag 'hwmon-for-linus-v4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon updates from Guenter Roeck:
 "Support for new chips:

   - add support for IT8620E, IT8781F, IT8786E, and IT8790E to it87
     driver

   - add driver for NCT7904

  Functional improvements:

   - support for new devicetree structure in ibmpowernv driver

   - register pwm-fan and gpio-fan drivers as thermal cooling devices

   - various minor cleanup and improvements to it87, nct6775, jc42,
     ibmpex, and coretemp drivers"

* tag 'hwmon-for-linus-v4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (43 commits)
  hwmon: (pwm-fan) Update the duty cycle inorder to control the pwm-fan
  hwmon: (it87) Use feature macros on sio_data
  hwmon: (ibmpowernv) Fix build error seen for some configurations
  hwmon: (gpio-fan) Move the thermal registration after registration is complete
  hwmon: (ibmpowernv) pretty print labels
  hwmon: (ibmpowernv) add a label attribute
  hwmon: (ibmpowernv) add support for the new device tree
  hwmon: (ibmpowernv) add a helper routine create_hwmon_attr
  hwmon: (it87) Add support for 6th fan of IT8620E
  hwmon: (it87) Add support for IT8620E
  hwmon: (it87) Add support for IT8790E
  hwmon: (it87) Introduce feature flag to reflect internal in7 sensor
  hwmon: (it87) Introduce configuration field for chip suffix
  hwmon: (it87) Fix PWM frequency display for chips with newer PWM control
  hwmon: (it87) Fix pwm sysfs attribute removal
  hwmon: (ibmpowernv) do not use the OPAL index for hwmon attribute names
  hwmon: (ibmpowernv) change create_hwmon_attr_name() prototype
  hwmon: (ibmpowernv) add a convert_opal_attr_name() routine
  hwmon: (ibmpowernv) add a get_sensor_type() routine
  hwmon: (ibmpowernv) replace AMBIENT_TEMP by TEMP
  ...
parents cb0fc55d f354169e
Loading
Loading
Loading
Loading
+17 −2
Original line number Original line Diff line number Diff line
@@ -2,15 +2,20 @@ Bindings for fan connected to GPIO lines


Required properties:
Required properties:
- compatible : "gpio-fan"
- compatible : "gpio-fan"

Optional properties:
- gpios: Specifies the pins that map to bits in the control value,
- gpios: Specifies the pins that map to bits in the control value,
  ordered MSB-->LSB.
  ordered MSB-->LSB.
- gpio-fan,speed-map: A mapping of possible fan RPM speeds and the
- gpio-fan,speed-map: A mapping of possible fan RPM speeds and the
  control value that should be set to achieve them. This array
  control value that should be set to achieve them. This array
  must have the RPM values in ascending order.
  must have the RPM values in ascending order.

Optional properties:
- alarm-gpios: This pin going active indicates something is wrong with
- alarm-gpios: This pin going active indicates something is wrong with
  the fan, and a udev event will be fired.
  the fan, and a udev event will be fired.
- cooling-cells: If used as a cooling device, must be <2>
  Also see: Documentation/devicetree/bindings/thermal/thermal.txt
  min and max states are derived from the speed-map of the fan.

Note: At least one the "gpios" or "alarm-gpios" properties must be set.


Examples:
Examples:


@@ -23,3 +28,13 @@ Examples:
				      6000 2>;
				      6000 2>;
		alarm-gpios = <&gpio1 15 1>;
		alarm-gpios = <&gpio1 15 1>;
	};
	};
	gpio_fan_cool: gpio_fan {
		compatible = "gpio-fan";
		gpios = <&gpio2 14 1
			 &gpio2 13 1>;
		gpio-fan,speed-map =	<0    0>,
					<3000 1>,
					<6000 2>;
		alarm-gpios = <&gpio2 15 1>;
		#cooling-cells = <2>; /* min followed by max */
	};
+35 −13
Original line number Original line Diff line number Diff line
@@ -6,6 +6,10 @@ Supported chips:
    Prefix: 'it8603'
    Prefix: 'it8603'
    Addresses scanned: from Super I/O config space (8 I/O ports)
    Addresses scanned: from Super I/O config space (8 I/O ports)
    Datasheet: Not publicly available
    Datasheet: Not publicly available
  * IT8620E
    Prefix: 'it8620'
    Addresses scanned: from Super I/O config space (8 I/O ports)
    Datasheet: Not publicly available
  * IT8705F
  * IT8705F
    Prefix: 'it87'
    Prefix: 'it87'
    Addresses scanned: from Super I/O config space (8 I/O ports)
    Addresses scanned: from Super I/O config space (8 I/O ports)
@@ -42,6 +46,10 @@ Supported chips:
    Prefix: 'it8772'
    Prefix: 'it8772'
    Addresses scanned: from Super I/O config space (8 I/O ports)
    Addresses scanned: from Super I/O config space (8 I/O ports)
    Datasheet: Not publicly available
    Datasheet: Not publicly available
  * IT8781F
    Prefix: 'it8781'
    Addresses scanned: from Super I/O config space (8 I/O ports)
    Datasheet: Not publicly available
  * IT8782F
  * IT8782F
    Prefix: 'it8782'
    Prefix: 'it8782'
    Addresses scanned: from Super I/O config space (8 I/O ports)
    Addresses scanned: from Super I/O config space (8 I/O ports)
@@ -50,6 +58,14 @@ Supported chips:
    Prefix: 'it8783'
    Prefix: 'it8783'
    Addresses scanned: from Super I/O config space (8 I/O ports)
    Addresses scanned: from Super I/O config space (8 I/O ports)
    Datasheet: Not publicly available
    Datasheet: Not publicly available
  * IT8786E
    Prefix: 'it8786'
    Addresses scanned: from Super I/O config space (8 I/O ports)
    Datasheet: Not publicly available
  * IT8790E
    Prefix: 'it8790'
    Addresses scanned: from Super I/O config space (8 I/O ports)
    Datasheet: Not publicly available
  * SiS950   [clone of IT8705F]
  * SiS950   [clone of IT8705F]
    Prefix: 'it87'
    Prefix: 'it87'
    Addresses scanned: from Super I/O config space (8 I/O ports)
    Addresses scanned: from Super I/O config space (8 I/O ports)
@@ -94,9 +110,10 @@ motherboard models.
Description
Description
-----------
-----------


This driver implements support for the IT8603E, IT8623E, IT8705F, IT8712F,
This driver implements support for the IT8603E, IT8620E, IT8623E, IT8705F,
IT8716F, IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E, IT8771E,
IT8712F, IT8716F, IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E,
IT8772E, IT8782F, IT8783E/F, and SiS950 chips.
IT8771E, IT8772E, IT8781F, IT8782F, IT8783E/F, IT8786E, IT8790E, and SiS950
chips.


These chips are 'Super I/O chips', supporting floppy disks, infrared ports,
These chips are 'Super I/O chips', supporting floppy disks, infrared ports,
joysticks and other miscellaneous stuff. For hardware monitoring, they
joysticks and other miscellaneous stuff. For hardware monitoring, they
@@ -120,11 +137,11 @@ The IT8716F, IT8718F, IT8720F, IT8721F/IT8758E and later IT8712F revisions
have support for 2 additional fans. The additional fans are supported by the
have support for 2 additional fans. The additional fans are supported by the
driver.
driver.


The IT8716F, IT8718F, IT8720F, IT8721F/IT8758E, IT8782F, IT8783E/F, and late
The IT8716F, IT8718F, IT8720F, IT8721F/IT8758E, IT8781F, IT8782F, IT8783E/F,
IT8712F and IT8705F also have optional 16-bit tachometer counters for fans 1 to
and late IT8712F and IT8705F also have optional 16-bit tachometer counters
3. This is better (no more fan clock divider mess) but not compatible with the
for fans 1 to 3. This is better (no more fan clock divider mess) but not
older chips and revisions. The 16-bit tachometer mode is enabled by the driver
compatible with the older chips and revisions. The 16-bit tachometer mode
when one of the above chips is detected.
is enabled by the driver when one of the above chips is detected.


The IT8726F is just bit enhanced IT8716F with additional hardware
The IT8726F is just bit enhanced IT8716F with additional hardware
for AMD power sequencing. Therefore the chip will appear as IT8716F
for AMD power sequencing. Therefore the chip will appear as IT8716F
@@ -134,8 +151,13 @@ The IT8728F, IT8771E, and IT8772E are considered compatible with the IT8721F,
until a datasheet becomes available (hopefully.)
until a datasheet becomes available (hopefully.)


The IT8603E/IT8623E is a custom design, hardware monitoring part is similar to
The IT8603E/IT8623E is a custom design, hardware monitoring part is similar to
IT8728F. It only supports 16-bit fan mode, the full speed mode of the
IT8728F. It only supports 3 fans, 16-bit fan mode, and the full speed mode
fan is not supported (value 0 of pwmX_enable).
of the fan is not supported (value 0 of pwmX_enable).

The IT8620E is another custom design, hardware monitoring part is similar to
IT8728F. It only supports 16-bit fan mode.

The IT8790E supports up to 3 fans. 16-bit fan mode is always enabled.


Temperatures are measured in degrees Celsius. An alarm is triggered once
Temperatures are measured in degrees Celsius. An alarm is triggered once
when the Overtemperature Shutdown limit is crossed.
when the Overtemperature Shutdown limit is crossed.
@@ -156,10 +178,10 @@ inputs can measure voltages between 0 and 4.08 volts, with a resolution of
0.016 volt (except IT8603E, IT8721F/IT8758E and IT8728F: 0.012 volt.) The
0.016 volt (except IT8603E, IT8721F/IT8758E and IT8728F: 0.012 volt.) The
battery voltage in8 does not have limit registers.
battery voltage in8 does not have limit registers.


On the IT8603E, IT8721F/IT8758E, IT8782F, and IT8783E/F, some voltage inputs
On the IT8603E, IT8721F/IT8758E, IT8781F, IT8782F, and IT8783E/F, some
are internal and scaled inside the chip:
voltage inputs are internal and scaled inside the chip:
* in3 (optional)
* in3 (optional)
* in7 (optional for IT8782F and IT8783E/F)
* in7 (optional for IT8781F, IT8782F, and IT8783E/F)
* in8 (always)
* in8 (always)
* in9 (relevant for IT8603E only)
* in9 (relevant for IT8603E only)
The driver handles this transparently so user-space doesn't have to care.
The driver handles this transparently so user-space doesn't have to care.
+3 −5
Original line number Original line Diff line number Diff line
@@ -11,12 +11,10 @@ Supported chips:
	http://www.atmel.com/Images/doc8711.pdf
	http://www.atmel.com/Images/doc8711.pdf
	http://www.atmel.com/Images/Atmel-8852-SEEPROM-AT30TSE002A-Datasheet.pdf
	http://www.atmel.com/Images/Atmel-8852-SEEPROM-AT30TSE002A-Datasheet.pdf
	http://www.atmel.com/Images/Atmel-8868-DTS-AT30TSE004A-Datasheet.pdf
	http://www.atmel.com/Images/Atmel-8868-DTS-AT30TSE004A-Datasheet.pdf
  * IDT TSE2002B3, TSE2002GB2, TS3000B3, TS3000GB2
  * IDT TSE2002B3, TSE2002GB2, TSE2004GB2, TS3000B3, TS3000GB0, TS3000GB2,
	TS3001GB2
    Datasheets:
    Datasheets:
	http://www.idt.com/sites/default/files/documents/IDT_TSE2002B3C_DST_20100512_120303152056.pdf
	Available from IDT web site
	http://www.idt.com/sites/default/files/documents/IDT_TSE2002GB2A1_DST_20111107_120303145914.pdf
	http://www.idt.com/sites/default/files/documents/IDT_TS3000B3A_DST_20101129_120303152013.pdf
	http://www.idt.com/sites/default/files/documents/IDT_TS3000GB2A1_DST_20111104_120303151012.pdf
  * Maxim MAX6604
  * Maxim MAX6604
    Datasheets:
    Datasheets:
	http://datasheets.maxim-ic.com/en/ds/MAX6604.pdf
	http://datasheets.maxim-ic.com/en/ds/MAX6604.pdf
+60 −0
Original line number Original line Diff line number Diff line
Kernel driver nct7904
====================

Supported chip:
  * Nuvoton NCT7904D
    Prefix: nct7904
    Addresses: I2C 0x2d, 0x2e
    Datasheet: Publicly available at Nuvoton website
	http://www.nuvoton.com/

Author: Vadim V. Vlasov <vvlasov@dev.rtsoft.ru>


Description
-----------

The NCT7904D is a hardware monitor supporting up to 20 voltage sensors,
internal temperature sensor, Intel PECI and AMD SB-TSI CPU temperature
interface, up to 12 fan tachometer inputs, up to 4 fan control channels
with SmartFan.


Sysfs entries
-------------

Currently, the driver supports only the following features:

in[1-20]_input		Input voltage measurements (mV)

fan[1-12]_input		Fan tachometer measurements (rpm)

temp1_input		Local temperature (1/1000 degree,
			0.125 degree resolution)

temp[2-9]_input		CPU temperatures (1/1000 degree,
			0.125 degree resolution)

fan[1-4]_mode		R/W, 0/1 for manual or SmartFan mode
			Setting SmartFan mode is supported only if it has been
			previously configured by BIOS (or configuration EEPROM)

fan[1-4]_pwm		R/O in SmartFan mode, R/W in manual control mode

The driver checks sensor control registers and does not export the sensors
that are not enabled. Anyway, a sensor that is enabled may actually be not
connected and thus provide zero readings.


Limitations
-----------

The following features are not supported in current version:

 - SmartFan control
 - Watchdog
 - GPIO
 - external temperature sensors
 - SMI
 - min/max values
 - many other...
+15 −3
Original line number Original line Diff line number Diff line
@@ -510,6 +510,7 @@ config SENSORS_G762
config SENSORS_GPIO_FAN
config SENSORS_GPIO_FAN
	tristate "GPIO fan"
	tristate "GPIO fan"
	depends on GPIOLIB
	depends on GPIOLIB
	depends on THERMAL || THERMAL=n
	help
	help
	  If you say yes here you get support for fans connected to GPIO lines.
	  If you say yes here you get support for fans connected to GPIO lines.


@@ -599,8 +600,8 @@ config SENSORS_IT87
	help
	help
	  If you say yes here you get support for ITE IT8705F, IT8712F,
	  If you say yes here you get support for ITE IT8705F, IT8712F,
	  IT8716F, IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E,
	  IT8716F, IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E,
	  IT8771E, IT8772E, IT8782F, IT8783E/F and IT8603E sensor chips,
	  IT8771E, IT8772E, IT8781F, IT8782F, IT8783E/F, IT8786E, IT8790E,
	  and the SiS950 clone.
	  IT8603E, IT8620E, and IT8623E sensor chips, and the SiS950 clone.


	  This driver can also be built as a module.  If so, the module
	  This driver can also be built as a module.  If so, the module
	  will be called it87.
	  will be called it87.
@@ -624,7 +625,7 @@ config SENSORS_JC42
	  mobile devices and servers.  Support will include, but not be limited
	  mobile devices and servers.  Support will include, but not be limited
	  to, ADT7408, AT30TS00, CAT34TS02, CAT6095, MAX6604, MCP9804, MCP9805,
	  to, ADT7408, AT30TS00, CAT34TS02, CAT6095, MAX6604, MCP9804, MCP9805,
	  MCP98242, MCP98243, MCP98244, MCP9843, SE97, SE98, STTS424(E),
	  MCP98242, MCP98243, MCP98244, MCP9843, SE97, SE98, STTS424(E),
	  STTS2002, STTS3000, TSE2002B3, TSE2002GB2, TS3000B3, and TS3000GB2.
	  STTS2002, STTS3000, TSE2002, TSE2004, TS3000, and TS3001.


	  This driver can also be built as a module.  If so, the module
	  This driver can also be built as a module.  If so, the module
	  will be called jc42.
	  will be called jc42.
@@ -1145,6 +1146,16 @@ config SENSORS_NCT7802
	  This driver can also be built as a module.  If so, the module
	  This driver can also be built as a module.  If so, the module
	  will be called nct7802.
	  will be called nct7802.


config SENSORS_NCT7904
	tristate "Nuvoton NCT7904"
	depends on I2C
	help
	  If you say yes here you get support for the Nuvoton NCT7904
	  hardware monitoring chip, including manual fan speed control.

	  This driver can also be built as a module.  If so, the module
	  will be called nct7904.

config SENSORS_PCF8591
config SENSORS_PCF8591
	tristate "Philips PCF8591 ADC/DAC"
	tristate "Philips PCF8591 ADC/DAC"
	depends on I2C
	depends on I2C
@@ -1164,6 +1175,7 @@ source drivers/hwmon/pmbus/Kconfig
config SENSORS_PWM_FAN
config SENSORS_PWM_FAN
	tristate "PWM fan"
	tristate "PWM fan"
	depends on (PWM && OF) || COMPILE_TEST
	depends on (PWM && OF) || COMPILE_TEST
	depends on THERMAL || THERMAL=n
	help
	help
	  If you say yes here you get support for fans connected to PWM lines.
	  If you say yes here you get support for fans connected to PWM lines.
	  The driver uses the generic PWM interface, thus it will work on a
	  The driver uses the generic PWM interface, thus it will work on a
Loading