Skip to content

Commit

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

Pull hwmon updates from Guenter Roeck:
 "Notable changes:

   - Heiko Schocher provided a driver for TI TMP103.
   - Kamil Debski provided a driver for pwm-controlled fans.
   - Neelesh Gupta provided a driver for power, fan rpm, voltage and
     temperature reporting on powerpc/powernv systems.
   - Scott Kanowitz provided a driver supporting Lattice's POWR1220
     power manager IC.
   - Richard Zhu provided a pmbus front-end driver for TPS40422.
   - Frans Klaver added support for TMP112 to the lm75 driver.
   - Johannes Pointner added support for EPCOS B57330V2103 to the
     ntc_thermistor driver.
   - Guenter Roeck added support for TMP441 and TMP442 to the tmp421
     driver.
   - Axel Lin converted several drivers to the new hwmon API (36 of
     them, if I counted correctly), and cleaned up many of the drivers
     along the way.

  There are also a number of patches fixing bugs discovered while
  testing Axel's changes"

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (88 commits)
  hwmon: (g762) Use of_property_read_u32 at appropriate place
  hwmon: (sis5595) Prevent overflow problem when writing large limits
  hwmon: (gpio-fan) Prevent overflow problem when writing large limits
  hwmon: (ibmpowernv) Use of_property_read_u32 at appropriate place
  hwmon: (lm85) Convert to devm_hwmon_device_register_with_groups
  hwmon: (lm85) Avoid forward declaration
  hwmon: (lm78) Convert to devm_hwmon_device_register_with_groups
  hwmon: (max6697) Use of_property_read_bool at appropriate places
  hwmon: (pwm-fan) Make SENSORS_PWM_FAN depend on OF
  hwmon: (pwm-fan) Remove duplicate dev_set_drvdata call
  hwmon: (nct6775) Remove num_attr_groups from struct nct6775_data
  hwmon: (nct6775) Update module description and Kconfig for NCT6106D and NCT6791D
  hwmon: (adt7411) Convert to devm_hwmon_device_register_with_groups
  hwmon: (g762) Convert to hwmon_device_register_with_groups
  hwmon: (emc2103) Convert to devm_hwmon_device_register_with_groups
  hwmon: (smsc47m1) Avoid forward declaration
  hwmon: (smsc47m192) Convert to devm_hwmon_device_register_with_groups
  hwmon: (smsc47m192) Avoid forward declaration
  hwmon: (max1668) Make max1668_addr_list array const
  hwmon: (max6639) Make normal_i2c array const
  ...
  • Loading branch information
Linus Torvalds committed Aug 5, 2014
2 parents c489d98 + fce9626 commit 161d2e0
Show file tree
Hide file tree
Showing 81 changed files with 4,258 additions and 3,885 deletions.
23 changes: 23 additions & 0 deletions Documentation/devicetree/bindings/hwmon/ibmpowernv.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
IBM POWERNV platform sensors
----------------------------

Required node properties:
- compatible: must be one of
"ibm,opal-sensor-cooling-fan"
"ibm,opal-sensor-amb-temp"
"ibm,opal-sensor-power-supply"
"ibm,opal-sensor-power"
- sensor-id: an opaque id provided by the firmware to the kernel, identifies a
given sensor and its attribute data

Example sensors node:

cooling-fan#8-data {
sensor-id = <0x7052107>;
compatible = "ibm,opal-sensor-cooling-fan";
};

amb-temp#1-thrs {
sensor-id = <0x5096000>;
compatible = "ibm,opal-sensor-amb-temp";
};
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ NTC Thermistor hwmon sensors

Requires node properties:
- "compatible" value : one of
"epcos,b57330v2103"
"murata,ncp15wb473"
"murata,ncp18wb473"
"murata,ncp21wb473"
Expand Down
12 changes: 12 additions & 0 deletions Documentation/devicetree/bindings/hwmon/pwm-fan.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Bindings for a fan connected to the PWM lines

Required properties:
- compatible : "pwm-fan"
- pwms : the PWM that is used to control the PWM fan

Example:
pwm-fan {
compatible = "pwm-fan";
status = "okay";
pwms = <&pwm 0 10000 0>;
};
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/i2c/trivial-devices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,6 @@ stm,m41t80 M41T80 - SERIAL ACCESS RTC WITH ALARMS
taos,tsl2550 Ambient Light Sensor with SMBUS/Two Wire Serial Interface
ti,tsc2003 I2C Touch-Screen Controller
ti,tmp102 Low Power Digital Temperature Sensor with SMBUS/Two Wire Serial Interface
ti,tmp103 Low Power Digital Temperature Sensor with SMBUS/Two Wire Serial Interface
ti,tmp275 Digital Temperature Sensor
winbond,wpct301 i2c trusted platform module (TPM)
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/vendor-prefixes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ dmo Data Modul AG
ebv EBV Elektronik
edt Emerging Display Technologies
emmicro EM Microelectronic
epcos EPCOS AG
epfl Ecole Polytechnique Fédérale de Lausanne
epson Seiko Epson Corp.
est ESTeem Wireless Modems
Expand Down
41 changes: 41 additions & 0 deletions Documentation/hwmon/ibmpowernv
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Kernel Driver IBMPOWERNV
========================

Supported systems:
* Any recent IBM P servers based on POWERNV platform

Author: Neelesh Gupta

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

This driver implements reading the platform sensors data like temperature/fan/
voltage/power for 'POWERNV' platform.

The driver uses the platform device infrastructure. It probes the device tree
for sensor devices during the __init phase and registers them with the 'hwmon'.
'hwmon' populates the 'sysfs' tree having attribute files, each for a given
sensor type and its attribute data.

All the nodes in the DT appear under "/ibm,opal/sensors" and each valid node in
the DT maps to an attribute file in 'sysfs'. The node exports unique 'sensor-id'
which the driver uses to make an OPAL call to the firmware.

Usage notes
-----------
The driver is built statically with the kernel by enabling the config
CONFIG_SENSORS_IBMPOWERNV. It can also be built as module 'ibmpowernv'.

Sysfs attributes
----------------

fanX_input Measured RPM value.
fanX_min Threshold RPM for alert generation.
fanX_fault 0: No fail condition
1: Failing fan
tempX_input Measured ambient temperature.
tempX_max Threshold ambient temperature for alert generation.
inX_input Measured power supply voltage
inX_fault 0: No fail condition.
1: Failing power supply.
power1_input System power consumption (microWatt)
5 changes: 3 additions & 2 deletions Documentation/hwmon/lm75
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ Supported chips:
Addresses scanned: none
Datasheet: Publicly available at the ST website
http://www.st.com/internet/analog/product/121769.jsp
* Texas Instruments TMP100, TMP101, TMP105, TMP75, TMP175, TMP275
Prefixes: 'tmp100', 'tmp101', 'tmp105', 'tmp175', 'tmp75', 'tmp275'
* Texas Instruments TMP100, TMP101, TMP105, TMP112, TMP75, TMP175, TMP275
Prefixes: 'tmp100', 'tmp101', 'tmp105', 'tmp112', 'tmp175', 'tmp75', 'tmp275'
Addresses scanned: none
Datasheet: Publicly available at the Texas Instruments website
http://www.ti.com/product/tmp100
http://www.ti.com/product/tmp101
http://www.ti.com/product/tmp105
http://www.ti.com/product/tmp112
http://www.ti.com/product/tmp75
http://www.ti.com/product/tmp175
http://www.ti.com/product/tmp275
Expand Down
5 changes: 5 additions & 0 deletions Documentation/hwmon/ntc_thermistor
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ Supported thermistors from Murata:
Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473', 'ncp15wl333'
Datasheet: Publicly available at Murata

Supported thermistors from EPCOS:
* EPCOS NTC Thermistors B57330V2103
Prefixes: b57330v2103
Datasheet: Publicly available at EPCOS

Other NTC thermistors can be supported simply by adding compensation
tables; e.g., NCP15WL333 support is added by the table ncpXXwl333.

Expand Down
5 changes: 2 additions & 3 deletions Documentation/hwmon/pmbus
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ Supported chips:
http://www.lineagepower.com/oem/pdf/PDT012A0X.pdf
http://www.lineagepower.com/oem/pdf/UDT020A0X.pdf
http://www.lineagepower.com/oem/pdf/MDT040A0X.pdf
* Texas Instruments TPS40400, TPS40422
Prefixes: 'tps40400', 'tps40422'
* Texas Instruments TPS40400
Prefixes: 'tps40400'
Addresses scanned: -
Datasheets:
http://www.ti.com/lit/gpn/tps40400
http://www.ti.com/lit/gpn/tps40422
* Generic PMBus devices
Prefix: 'pmbus'
Addresses scanned: -
Expand Down
45 changes: 45 additions & 0 deletions Documentation/hwmon/powr1220
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Kernel driver powr1220
==================

Supported chips:
* Lattice POWR1220AT8
Prefix: 'powr1220'
Addresses scanned: none
Datasheet: Publicly available at the Lattice website
http://www.latticesemi.com/

Author: Scott Kanowitz <scott.kanowitz@gmail.com>

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

This driver supports the Lattice POWR1220AT8 chip. The POWR1220
includes voltage monitoring for 14 inputs as well as trim settings
for output voltages and GPIOs. This driver implements the voltage
monitoring portion of the chip.

Voltages are sampled by a 12-bit ADC with a step size of 2 mV.
An in-line attenuator allows measurements from 0 to 6 V. The
attenuator is enabled or disabled depending on the setting of the
input's max value. The driver will enable the attenuator for any
value over the low measurement range maximum of 2 V.

The input naming convention is as follows:

driver name pin name
in0 VMON1
in1 VMON2
in2 VMON3
in2 VMON4
in4 VMON5
in5 VMON6
in6 VMON7
in7 VMON8
in8 VMON9
in9 VMON10
in10 VMON11
in11 VMON12
in12 VCCA
in13 VCCINP

The ADC readings are updated on request with a minimum period of 1s.
17 changes: 17 additions & 0 deletions Documentation/hwmon/pwm-fan
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Kernel driver pwm-fan
=====================

This driver enables the use of a PWM module to drive a fan. It uses the
generic PWM interface thus it is hardware independent. It can be used on
many SoCs, as long as the SoC supplies a PWM line driver that exposes
the generic PWM API.

Author: Kamil Debski <k.debski@samsung.com>

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

The driver implements a simple interface for driving a fan connected to
a PWM output. It uses the generic PWM interface, thus it can be used with
a range of SoCs. The driver exposes the fan to the user space through
the hwmon's sysfs interface.
28 changes: 28 additions & 0 deletions Documentation/hwmon/tmp103
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Kernel driver tmp103
====================

Supported chips:
* Texas Instruments TMP103
Prefix: 'tmp103'
Addresses scanned: none
Product info and datasheet: http://www.ti.com/product/tmp103

Author:
Heiko Schocher <hs@denx.de>

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

The TMP103 is a digital output temperature sensor in a four-ball
wafer chip-scale package (WCSP). The TMP103 is capable of reading
temperatures to a resolution of 1°C. The TMP103 is specified for
operation over a temperature range of –40°C to +125°C.

Resolution: 8 Bits
Accuracy: ±1°C Typ (–10°C to +100°C)

The driver provides the common sysfs-interface for temperatures (see
Documentation/hwmon/sysfs-interface under Temperatures).

Please refer how to instantiate this driver:
Documentation/i2c/instantiating-devices
26 changes: 17 additions & 9 deletions Documentation/hwmon/tmp421
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,34 @@ Supported chips:
Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp421.html
* Texas Instruments TMP422
Prefix: 'tmp422'
Addresses scanned: I2C 0x2a, 0x4c, 0x4d, 0x4e and 0x4f
Addresses scanned: I2C 0x4c, 0x4d, 0x4e and 0x4f
Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp421.html
* Texas Instruments TMP423
Prefix: 'tmp423'
Addresses scanned: I2C 0x2a, 0x4c, 0x4d, 0x4e and 0x4f
Addresses scanned: I2C 0x4c and 0x4d
Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp421.html
* Texas Instruments TMP441
Prefix: 'tmp441'
Addresses scanned: I2C 0x2a, 0x4c, 0x4d, 0x4e and 0x4f
Datasheet: http://www.ti.com/product/tmp441
* Texas Instruments TMP442
Prefix: 'tmp442'
Addresses scanned: I2C 0x4c and 0x4d
Datasheet: http://www.ti.com/product/tmp442

Authors:
Andre Prendel <andre.prendel@gmx.de>

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

This driver implements support for Texas Instruments TMP421, TMP422
and TMP423 temperature sensor chips. These chips implement one local
and up to one (TMP421), up to two (TMP422) or up to three (TMP423)
remote sensors. Temperature is measured in degrees Celsius. The chips
are wired over I2C/SMBus and specified over a temperature range of -40
to +125 degrees Celsius. Resolution for both the local and remote
channels is 0.0625 degree C.
This driver implements support for Texas Instruments TMP421, TMP422,
TMP423, TMP441, and TMP442 temperature sensor chips. These chips
implement one local and up to one (TMP421, TMP441), up to two (TMP422,
TMP442) or up to three (TMP423) remote sensors. Temperature is measured
in degrees Celsius. The chips are wired over I2C/SMBus and specified
over a temperature range of -40 to +125 degrees Celsius. Resolution
for both the local and remote channels is 0.0625 degree C.

The chips support only temperature measurement. The driver exports
the temperature values via the following sysfs files:
Expand Down
64 changes: 64 additions & 0 deletions Documentation/hwmon/tps40422
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
Kernel driver tps40422
======================

Supported chips:
* TI TPS40422
Prefix: 'tps40422'
Addresses scanned: -
Datasheet: http://www.ti.com/lit/gpn/tps40422

Author: Zhu Laiwen <richard.zhu@nsn.com>


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

This driver supports TI TPS40422 Dual-Output or Two-Phase Synchronous Buck
Controller with PMBus

The driver is a client driver to the core PMBus driver.
Please see Documentation/hwmon/pmbus for details on PMBus client drivers.


Usage Notes
-----------

This driver does not auto-detect devices. You will have to instantiate the
devices explicitly. Please see Documentation/i2c/instantiating-devices for
details.


Platform data support
---------------------

The driver supports standard PMBus driver platform data.


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

The following attributes are supported.

in[1-2]_label "vout[1-2]"
in[1-2]_input Measured voltage. From READ_VOUT register.
in[1-2]_alarm voltage alarm.

curr[1-2]_input Measured current. From READ_IOUT register.
curr[1-2]_label "iout[1-2]"
curr1_max Maximum current. From IOUT_OC_WARN_LIMIT register.
curr1_crit Critical maximum current. From IOUT_OC_FAULT_LIMIT register.
curr1_max_alarm Current high alarm. From IOUT_OC_WARN_LIMIT status.
curr1_crit_alarm Current critical high alarm. From IOUT_OC_FAULT status.
curr2_alarm Current high alarm. From IOUT_OC_WARNING status.

temp1_input Measured temperature. From READ_TEMPERATURE_2 register on page 0.
temp1_max Maximum temperature. From OT_WARN_LIMIT register.
temp1_crit Critical high temperature. From OT_FAULT_LIMIT register.
temp1_max_alarm Chip temperature high alarm. Set by comparing
READ_TEMPERATURE_2 on page 0 with OT_WARN_LIMIT if TEMP_OT_WARNING
status is set.
temp1_crit_alarm Chip temperature critical high alarm. Set by comparing
READ_TEMPERATURE_2 on page 0 with OT_FAULT_LIMIT if TEMP_OT_FAULT
status is set.
temp2_input Measured temperature. From READ_TEMPERATURE_2 register on page 1.
temp2_alarm Chip temperature alarm on page 1.
Loading

0 comments on commit 161d2e0

Please sign in to comment.