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

Commit bef82f81 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

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

Pull hwmon updates from Guenter Roeck:

 - asus_atk0110 driver modified to use new API

 - k10temp supports new CPUs and reports both Tctl and Tdie

 - minor fixes in gpio-fan, ltc2990, fschmd, and mc13783 drivers

* tag 'hwmon-for-linus-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (asus_atk0110) Make use of device managed memory
  hwmon: (asus_atk0110) Replace deprecated device register call
  hwmon: (k10temp) Make function get_raw_temp static
  hwmon: (gpio-fan) Fix "#cooling-cells" property name in bindings
  MAINTAINERS: hwmon: Add Documentation/devicetree/bindings/hwmon
  hwmon: (ltc2990) support all measurement modes
  hwmon: (ltc2990) add devicetree binding
  hwmon: (ltc2990) Fix incorrect conversion of negative temperatures
  hwmon: (core) check parent dev != NULL when chip != NULL
  hwmon: (fschmd) fix typo 'can by' to 'can be'
  hwmon: (k10temp) Display both Tctl and Tdie
  hwmon: (k10temp) Add support for Stoney Ridge and Bristol Ridge CPUs
  hwmon: MC13783: Add uid and die temperature sensor inputs
parents e5a59464 c9bdf291
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ Optional properties:
  must have the RPM values in ascending order.
- alarm-gpios: This pin going active indicates something is wrong with
  the fan, and a udev event will be fired.
- cooling-cells: If used as a cooling device, must be <2>
- #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.

+36 −0
Original line number Diff line number Diff line
ltc2990: Linear Technology LTC2990 power monitor

Required properties:
- compatible: Must be "lltc,ltc2990"
- reg: I2C slave address
- lltc,meas-mode:
	An array of two integers for configuring the chip measurement mode.

	The first integer defines the bits 2..0 in the control register. In all
	cases the internal temperature and supply voltage are measured. In
	addition the following input measurements are enabled per mode:

		0: V1, V2, TR2
		1: V1-V2, TR2
		2: V1-V2, V3, V4
		3: TR1, V3, V4
		4: TR1, V3-V4
		5: TR1, TR2
		6: V1-V2, V3-V4
		7: V1, V2, V3, V4

	The second integer defines the bits 4..3 in the control register. This
	allows a subset of the measurements to be enabled:

		0: Internal temperature and supply voltage only
		1: TR1, V1 or V1-V2 only per mode
		2: TR2, V3 or V3-V4 only per mode
		3: All measurements per mode

Example:

ltc2990@4c {
	compatible = "lltc,ltc2990";
	reg = <0x4c>;
	lltc,meas-mode = <7 3>;	/* V1, V2, V3, V4 */
};
+2 −1
Original line number Diff line number Diff line
@@ -71,7 +71,8 @@ hwmon_device_register_with_info is the most comprehensive and preferred means
to register a hardware monitoring device. It creates the standard sysfs
attributes in the hardware monitoring core, letting the driver focus on reading
from and writing to the chip instead of having to bother with sysfs attributes.
Its parameters are described in more detail below.
The parent device parameter cannot be NULL with non-NULL chip info. Its
parameters are described in more detail below.

devm_hwmon_device_register_with_info is similar to
hwmon_device_register_with_info. However, it is device managed, meaning the
+15 −9
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ Supported chips:
    Datasheet: http://www.linear.com/product/ltc2990

Author: Mike Looijmans <mike.looijmans@topic.nl>
        Tom Levens <tom.levens@cern.ch>


Description
@@ -16,10 +17,8 @@ Description
LTC2990 is a Quad I2C Voltage, Current and Temperature Monitor.
The chip's inputs can measure 4 voltages, or two inputs together (1+2 and 3+4)
can be combined to measure a differential voltage, which is typically used to
measure current through a series resistor, or a temperature.

This driver currently uses the 2x differential mode only. In order to support
other modes, the driver will need to be expanded.
measure current through a series resistor, or a temperature with an external
diode.


Usage Notes
@@ -32,12 +31,19 @@ devices explicitly.
Sysfs attributes
----------------

in0_input     Voltage at Vcc pin in millivolt (range 2.5V to 5V)
temp1_input   Internal chip temperature in millidegrees Celcius

A subset of the following attributes are visible, depending on the measurement
mode of the chip.

in[1-4]_input Voltage at V[1-4] pin in millivolt
temp2_input   External temperature sensor TR1 in millidegrees Celcius
temp3_input   External temperature sensor TR2 in millidegrees Celcius
curr1_input   Current in mA across V1-V2 assuming a 1mOhm sense resistor
curr2_input   Current in mA across V3-V4 assuming a 1mOhm sense resistor

The "curr*_input" measurements actually report the voltage drop across the
input pins in microvolts. This is equivalent to the current through a 1mOhm
sense resistor. Divide the reported value by the actual sense resistor value
in mOhm to get the actual value.

in0_input     Voltage at Vcc pin in millivolt (range 2.5V to 5V)
temp1_input   Internal chip temperature in millidegrees Celcius
curr1_input   Current in mA across v1-v2 assuming a 1mOhm sense resistor.
curr2_input   Current in mA across v3-v4 assuming a 1mOhm sense resistor.
+1 −0
Original line number Diff line number Diff line
@@ -6219,6 +6219,7 @@ L: linux-hwmon@vger.kernel.org
W:	http://hwmon.wiki.kernel.org/
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git
S:	Maintained
F:	Documentation/devicetree/bindings/hwmon/
F:	Documentation/hwmon/
F:	drivers/hwmon/
F:	include/linux/hwmon*.h
Loading