Skip to content

Commit

Permalink
Merge tag 'hwmon-for-linus-v4.11' of git://git.kernel.org/pub/scm/lin…
Browse files Browse the repository at this point in the history
…ux/kernel/git/groeck/linux-staging

Pull hwmon updates from Guenter Roeck:

 - new driver for stts751

 - it87: Added support for IT8622E and IT8792E; improved support for
   other chips

 - lm70: Added support for TMP122/124

 - use permission-specific DEVICE_ATTR variants where possible

 - fixed overflows in various drivers

 - minor improvements in various drivers

* tag 'hwmon-for-linus-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (95 commits)
  hwmon: (sht15) Add device tree support
  devicetree: add lm90 thermal_zone sensor support
  hwmon: (it87) Add support for IT8792E
  hwmon: (it87) Do not overwrite bit 2..6 of pwm control registers
  hwmon: (it87) Fix pwm4 detection for IT8620 and IT8628
  hwmon: (it87) Ensure that pwm control cache is current before updating values
  hwmon: (it87) Improve IT8622 support
  hwmon: (it87) Add support for IT8622E
  hwmon: (it87) Add feature flag indicating that VIN3 is connected to 5V
  DT: add binding documentation for STTS751
  hwmon: new driver for ST stts751 thermal sensor
  hwmon: Register thermal zone only if 'dev' parameter was provided
  hwmon: Relax name attribute validation for new APIs
  hwmon: Update documentation to clarify rules for the 'name' attribute
  hwmon: Make name attribute mandatory for new APIs
  hwmon: (lm70) Add support for TI TMP122/124
  hwmon: (lm70) Utilize dev_warn instead of pr_warn
  hwmon: (ltc4151) Export OF device ID table as module aliases
  hwmon: (adc128d818) Preserve operation mode
  hwmon: (adc128d818) Support operation modes 1-3
  ...
  • Loading branch information
torvalds committed Feb 20, 2017
2 parents ce1bf97 + 2f1736f commit 507b500
Show file tree
Hide file tree
Showing 86 changed files with 2,434 additions and 913 deletions.
38 changes: 38 additions & 0 deletions Documentation/devicetree/bindings/hwmon/adc128d818.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
TI ADC128D818 ADC System Monitor With Temperature Sensor
--------------------------------------------------------

Operation modes:

- Mode 0: 7 single-ended voltage readings (IN0-IN6),
1 temperature reading (internal)
- Mode 1: 8 single-ended voltage readings (IN0-IN7),
no temperature
- Mode 2: 4 pseudo-differential voltage readings
(IN0-IN1, IN3-IN2, IN4-IN5, IN7-IN6),
1 temperature reading (internal)
- Mode 3: 4 single-ended voltage readings (IN0-IN3),
2 pseudo-differential voltage readings
(IN4-IN5, IN7-IN6),
1 temperature reading (internal)

If no operation mode is configured via device tree, the driver keeps the
currently active chip operation mode (default is mode 0).


Required node properties:

- compatible: must be set to "ti,adc128d818"
- reg: I2C address of the device

Optional node properties:

- ti,mode: Operation mode (see above).


Example (operation mode 2):

adc128d818@1d {
compatible = "ti,adc128d818";
reg = <0x1d>;
ti,mode = <2>;
};
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/hwmon/lm70.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Required properties:
- compatible: one of
"ti,lm70"
"ti,tmp121"
"ti,tmp122"
"ti,lm71"
"ti,lm74"

Expand Down
6 changes: 6 additions & 0 deletions Documentation/devicetree/bindings/hwmon/lm90.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ Optional properties:
LM90 "-ALERT" pin output.
See interrupt-controller/interrupts.txt for the format.

- #thermal-sensor-cells: should be set to 1. See thermal/thermal.txt for
details. See <include/dt-bindings/thermal/lm90.h> for the
definition of the local, remote and 2nd remote sensor index
constants.

Example LM90 node:

temp-sensor {
Expand All @@ -41,4 +46,5 @@ temp-sensor {
vcc-supply = <&palmas_ldo6_reg>;
interrupt-parent = <&gpio>;
interrupts = <TEGRA_GPIO(O, 4) IRQ_TYPE_LEVEL_LOW>;
#thermal-sensor-cells = <1>;
}
19 changes: 19 additions & 0 deletions Documentation/devicetree/bindings/hwmon/sht15.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Sensirion SHT15 Humidity and Temperature Sensor

Required properties:

- "compatible": must be "sensirion,sht15".
- "data-gpios": GPIO connected to the data line.
- "clk-gpios": GPIO connected to the clock line.
- "vcc-supply": regulator that drives the VCC pin.

Example:

sensor {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sensor>;
compatible = "sensirion,sht15";
clk-gpios = <&gpio4 12 0>;
data-gpios = <&gpio4 13 0>;
vcc-supply = <&reg_sht15>;
};
15 changes: 15 additions & 0 deletions Documentation/devicetree/bindings/hwmon/stts751.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
* STTS751 thermometer.

Required node properties:
- compatible: "stts751"
- reg: I2C bus address of the device

Optional properties:
- smbus-timeout-disable: when set, the smbus timeout function will be disabled

Example stts751 node:

temp-sensor {
compatible = "stts751";
reg = <0x48>;
}
4 changes: 4 additions & 0 deletions Documentation/hwmon/hwmon-kernel-api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ the call to devm_hwmon_device_register_with_groups or
hwmon_device_register_with_info and if the automatic (device managed)
removal would be too late.

All supported hwmon device registration functions only accept valid device
names. Device names including invalid characters (whitespace, '*', or '-')
will be rejected. The 'name' parameter is mandatory.

Using devm_hwmon_device_register_with_info()
--------------------------------------------

Expand Down
8 changes: 6 additions & 2 deletions Documentation/hwmon/lm70
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Supported chips:
Datasheet: http://www.national.com/pf/LM/LM70.html
* Texas Instruments TMP121/TMP123
Information: http://focus.ti.com/docs/prod/folders/print/tmp121.html
* Texas Instruments TMP122/TMP124
Information: http://www.ti.com/product/tmp122
* National Semiconductor LM71
Datasheet: http://www.ti.com/product/LM71
* National Semiconductor LM74
Expand Down Expand Up @@ -35,8 +37,10 @@ As a real (in-tree) example of this "SPI protocol driver" interfacing
with a "SPI master controller driver", see drivers/spi/spi_lm70llp.c
and its associated documentation.

The LM74 and TMP121/TMP123 are very similar; main difference is 13-bit
temperature data (0.0625 degrees celsius resolution).
The LM74 and TMP121/TMP122/TMP123/TMP124 are very similar; main difference is
13-bit temperature data (0.0625 degrees celsius resolution).

The TMP122/TMP124 also feature configurable temperature thresholds.

The LM71 is also very similar; main difference is 14-bit temperature
data (0.03125 degrees celsius resolution).
Expand Down
5 changes: 3 additions & 2 deletions Documentation/hwmon/sht21
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ sysfs-Interface

temp1_input - temperature input
humidity1_input - humidity input
eic - Electronic Identification Code

Notes
-----
Expand All @@ -45,5 +46,5 @@ humidity and 66 ms for temperature. To keep self heating below 0.1 degree
Celsius, the device should not be active for more than 10% of the time,
e.g. maximum two measurements per second at the given resolution.

Different resolutions, the on-chip heater, using the CRC checksum and reading
the serial number are not supported yet.
Different resolutions, the on-chip heater, and using the CRC checksum
are not supported yet.
5 changes: 3 additions & 2 deletions Documentation/hwmon/sysfs-interface
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ given driver if the chip has the feature.

name The chip name.
This should be a short, lowercase string, not containing
spaces nor dashes, representing the chip name. This is
the only mandatory attribute.
whitespace, dashes, or the wildcard character '*'.
This attribute represents the chip name. It is the only
mandatory attribute.
I2C devices get this attribute created automatically.
RO

Expand Down
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -7534,6 +7534,7 @@ S: Maintained
F: Documentation/hwmon/lm90
F: Documentation/devicetree/bindings/hwmon/lm90.txt
F: drivers/hwmon/lm90.c
F: include/dt-bindings/thermal/lm90.h

LM95234 HARDWARE MONITOR DRIVER
M: Guenter Roeck <linux@roeck-us.net>
Expand Down
10 changes: 10 additions & 0 deletions drivers/hwmon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1459,6 +1459,16 @@ config SENSORS_SCH5636
This driver can also be built as a module. If so, the module
will be called sch5636.

config SENSORS_STTS751
tristate "ST Microelectronics STTS751"
depends on I2C
help
If you say yes here you get support for STTS751
temperature sensor chips.

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

config SENSORS_SMM665
tristate "Summit Microelectronics SMM665"
depends on I2C
Expand Down
1 change: 1 addition & 0 deletions drivers/hwmon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ obj-$(CONFIG_SENSORS_SMM665) += smm665.o
obj-$(CONFIG_SENSORS_SMSC47B397)+= smsc47b397.o
obj-$(CONFIG_SENSORS_SMSC47M1) += smsc47m1.o
obj-$(CONFIG_SENSORS_SMSC47M192)+= smsc47m192.o
obj-$(CONFIG_SENSORS_STTS751) += stts751.o
obj-$(CONFIG_SENSORS_AMC6821) += amc6821.o
obj-$(CONFIG_SENSORS_TC74) += tc74.o
obj-$(CONFIG_SENSORS_THMC50) += thmc50.o
Expand Down
Loading

0 comments on commit 507b500

Please sign in to comment.