You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon update from Guenter Roeck: - New drivers for NCT6775, NCT6776, NCT6779, and LM95234. - Added support for LTC2974, LTC3883, LM25056, TMP431, TMP432, ADT7310, and ADT7320 to existing drivers. - Various code cleanups and minor improvements. * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (54 commits) hwmon: (nct6775) Fix coding style problems hwmon: (nct6775) Constify strings hwmon: (tmp401) Add support for TMP432 hwmon: (tmp401) Add support for update_interval attribute hwmon: (tmp401) Reset valid flag when resetting temperature history hwmon: (tmp401) Simplification and cleanup hwmon: (tmp401) Use sysfs_create_group / sysfs_remove_group hwmon: (tmp401) Drop unused defines, use BIT for bit masks hwmon: (nct6775) Use ARRAY_SIZE for loops where possible documentation: hwmon: Fix typo in documentation/hwmon hwmon: (nct6775) Enable both AUXTIN and VIN3 on NCT6776 hwmon: (ad7314) use spi_get_drvdata() and spi_set_drvdata() MAINTAINERS: Add myself as maintainer for the NCT6775 driver hwmon: (nct6775) Expand scope of supported chips hwmon: (gpio-fan) Use is_visible to determine if attributes should be created hwmon: (tmp401) Fix device detection for TMP411B and TMP411C hwmon: Add driver for LM95234 hwmon: (tmp401) Add support for TMP431 hwmon: (pmbus/lm25066) Add support for LM25056 hwmon: (pmbus/lm25066) Refactor device specific coefficients ...
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
NTC Thermistor hwmon sensors
|
||||
-------------------------------
|
||||
|
||||
Requires node properties:
|
||||
- "compatible" value : one of
|
||||
"ntc,ncp15wb473"
|
||||
"ntc,ncp18wb473"
|
||||
"ntc,ncp21wb473"
|
||||
"ntc,ncp03wb473"
|
||||
"ntc,ncp15wl333"
|
||||
- "pullup-uv" Pull up voltage in micro volts
|
||||
- "pullup-ohm" Pull up resistor value in ohms
|
||||
- "pulldown-ohm" Pull down resistor value in ohms
|
||||
- "connected-positive" Always ON, If not specified.
|
||||
Status change is possible.
|
||||
- "io-channels" Channel node of ADC to be used for
|
||||
conversion.
|
||||
|
||||
Read more about iio bindings at
|
||||
Documentation/devicetree/bindings/iio/iio-bindings.txt
|
||||
|
||||
Example:
|
||||
ncp15wb473@0 {
|
||||
compatible = "ntc,ncp15wb473";
|
||||
pullup-uv = <1800000>;
|
||||
pullup-ohm = <47000>;
|
||||
pulldown-ohm = <0>;
|
||||
io-channels = <&adc 3>;
|
||||
};
|
||||
+29
-16
@@ -12,29 +12,42 @@ Supported chips:
|
||||
Addresses scanned: None
|
||||
Datasheet: Publicly available at the Analog Devices website
|
||||
http://www.analog.com/static/imported-files/data_sheets/ADT7420.pdf
|
||||
* Analog Devices ADT7310
|
||||
Prefix: 'adt7310'
|
||||
Addresses scanned: None
|
||||
Datasheet: Publicly available at the Analog Devices website
|
||||
http://www.analog.com/static/imported-files/data_sheets/ADT7310.pdf
|
||||
* Analog Devices ADT7320
|
||||
Prefix: 'adt7320'
|
||||
Addresses scanned: None
|
||||
Datasheet: Publicly available at the Analog Devices website
|
||||
http://www.analog.com/static/imported-files/data_sheets/ADT7320.pdf
|
||||
|
||||
Author: Hartmut Knaack <knaack.h@gmx.de>
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
The ADT7410 is a temperature sensor with rated temperature range of -55°C to
|
||||
+150°C. It has a high accuracy of +/-0.5°C and can be operated at a resolution
|
||||
of 13 bits (0.0625°C) or 16 bits (0.0078°C). The sensor provides an INT pin to
|
||||
indicate that a minimum or maximum temperature set point has been exceeded, as
|
||||
well as a critical temperature (CT) pin to indicate that the critical
|
||||
temperature set point has been exceeded. Both pins can be set up with a common
|
||||
hysteresis of 0°C - 15°C and a fault queue, ranging from 1 to 4 events. Both
|
||||
pins can individually set to be active-low or active-high, while the whole
|
||||
device can either run in comparator mode or interrupt mode. The ADT7410
|
||||
supports continous temperature sampling, as well as sampling one temperature
|
||||
value per second or even justget one sample on demand for power saving.
|
||||
Besides, it can completely power down its ADC, if power management is
|
||||
required.
|
||||
The ADT7310/ADT7410 is a temperature sensor with rated temperature range of
|
||||
-55°C to +150°C. It has a high accuracy of +/-0.5°C and can be operated at a
|
||||
resolution of 13 bits (0.0625°C) or 16 bits (0.0078°C). The sensor provides an
|
||||
INT pin to indicate that a minimum or maximum temperature set point has been
|
||||
exceeded, as well as a critical temperature (CT) pin to indicate that the
|
||||
critical temperature set point has been exceeded. Both pins can be set up with a
|
||||
common hysteresis of 0°C - 15°C and a fault queue, ranging from 1 to 4 events.
|
||||
Both pins can individually set to be active-low or active-high, while the whole
|
||||
device can either run in comparator mode or interrupt mode. The ADT7410 supports
|
||||
continuous temperature sampling, as well as sampling one temperature value per
|
||||
second or even just get one sample on demand for power saving. Besides, it can
|
||||
completely power down its ADC, if power management is required.
|
||||
|
||||
The ADT7420 is register compatible, the only differences being the package,
|
||||
a slightly narrower operating temperature range (-40°C to +150°C), and a
|
||||
better accuracy (0.25°C instead of 0.50°C.)
|
||||
The ADT7320/ADT7420 is register compatible, the only differences being the
|
||||
package, a slightly narrower operating temperature range (-40°C to +150°C), and
|
||||
a better accuracy (0.25°C instead of 0.50°C.)
|
||||
|
||||
The difference between the ADT7310/ADT7320 and ADT7410/ADT7420 is the control
|
||||
interface, the ADT7310 and ADT7320 use SPI while the ADT7410 and ADT7420 use
|
||||
I2C.
|
||||
|
||||
Configuration Notes
|
||||
-------------------
|
||||
|
||||
+22
-10
@@ -1,7 +1,13 @@
|
||||
Kernel driver max8688
|
||||
Kernel driver lm25066
|
||||
=====================
|
||||
|
||||
Supported chips:
|
||||
* TI LM25056
|
||||
Prefix: 'lm25056'
|
||||
Addresses scanned: -
|
||||
Datasheets:
|
||||
http://www.ti.com/lit/gpn/lm25056
|
||||
http://www.ti.com/lit/gpn/lm25056a
|
||||
* National Semiconductor LM25066
|
||||
Prefix: 'lm25066'
|
||||
Addresses scanned: -
|
||||
@@ -25,8 +31,9 @@ Author: Guenter Roeck <linux@roeck-us.net>
|
||||
Description
|
||||
-----------
|
||||
|
||||
This driver supports hardware montoring for National Semiconductor LM25066,
|
||||
LM5064, and LM5064 Power Management, Monitoring, Control, and Protection ICs.
|
||||
This driver supports hardware montoring for National Semiconductor / TI LM25056,
|
||||
LM25066, LM5064, and LM5064 Power Management, Monitoring, Control, and
|
||||
Protection ICs.
|
||||
|
||||
The driver is a client driver to the core PMBus driver. Please see
|
||||
Documentation/hwmon/pmbus for details on PMBus client drivers.
|
||||
@@ -60,14 +67,19 @@ in1_max Maximum input voltage.
|
||||
in1_min_alarm Input voltage low alarm.
|
||||
in1_max_alarm Input voltage high alarm.
|
||||
|
||||
in2_label "vout1"
|
||||
in2_input Measured output voltage.
|
||||
in2_average Average measured output voltage.
|
||||
in2_min Minimum output voltage.
|
||||
in2_min_alarm Output voltage low alarm.
|
||||
in2_label "vmon"
|
||||
in2_input Measured voltage on VAUX pin
|
||||
in2_min Minimum VAUX voltage (LM25056 only).
|
||||
in2_max Maximum VAUX voltage (LM25056 only).
|
||||
in2_min_alarm VAUX voltage low alarm (LM25056 only).
|
||||
in2_max_alarm VAUX voltage high alarm (LM25056 only).
|
||||
|
||||
in3_label "vout2"
|
||||
in3_input Measured voltage on vaux pin
|
||||
in3_label "vout1"
|
||||
Not supported on LM25056.
|
||||
in3_input Measured output voltage.
|
||||
in3_average Average measured output voltage.
|
||||
in3_min Minimum output voltage.
|
||||
in3_min_alarm Output voltage low alarm.
|
||||
|
||||
curr1_label "iin"
|
||||
curr1_input Measured input current.
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
Kernel driver lm95234
|
||||
=====================
|
||||
|
||||
Supported chips:
|
||||
* National Semiconductor / Texas Instruments LM95234
|
||||
Addresses scanned: I2C 0x18, 0x4d, 0x4e
|
||||
Datasheet: Publicly available at the Texas Instruments website
|
||||
http://www.ti.com/product/lm95234
|
||||
|
||||
|
||||
Author: Guenter Roeck <linux@roeck-us.net>
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
LM95234 is an 11-bit digital temperature sensor with a 2-wire System Management
|
||||
Bus (SMBus) interface and TrueTherm technology that can very accurately monitor
|
||||
the temperature of four remote diodes as well as its own temperature.
|
||||
The four remote diodes can be external devices such as microprocessors,
|
||||
graphics processors or diode-connected 2N3904s. The LM95234's TruTherm
|
||||
beta compensation technology allows sensing of 90 nm or 65 nm process
|
||||
thermal diodes accurately.
|
||||
|
||||
All temperature values are given in millidegrees Celsius. Temperature
|
||||
is provided within a range of -127 to +255 degrees (+127.875 degrees for
|
||||
the internal sensor). Resolution depends on temperature input and range.
|
||||
|
||||
Each sensor has its own maximum limit, but the hysteresis is common to all
|
||||
channels. The hysteresis is configurable with the tem1_max_hyst attribute and
|
||||
affects the hysteresis on all channels. The first two external sensors also
|
||||
have a critical limit.
|
||||
|
||||
The lm95234 driver can change its update interval to a fixed set of values.
|
||||
It will round up to the next selectable interval. See the datasheet for exact
|
||||
values. Reading sensor values more often will do no harm, but will return
|
||||
'old' values.
|
||||
+84
-49
@@ -2,6 +2,10 @@ Kernel driver ltc2978
|
||||
=====================
|
||||
|
||||
Supported chips:
|
||||
* Linear Technology LTC2974
|
||||
Prefix: 'ltc2974'
|
||||
Addresses scanned: -
|
||||
Datasheet: http://www.linear.com/product/ltc2974
|
||||
* Linear Technology LTC2978
|
||||
Prefix: 'ltc2978'
|
||||
Addresses scanned: -
|
||||
@@ -10,6 +14,10 @@ Supported chips:
|
||||
Prefix: 'ltc3880'
|
||||
Addresses scanned: -
|
||||
Datasheet: http://www.linear.com/product/ltc3880
|
||||
* Linear Technology LTC3883
|
||||
Prefix: 'ltc3883'
|
||||
Addresses scanned: -
|
||||
Datasheet: http://www.linear.com/product/ltc3883
|
||||
|
||||
Author: Guenter Roeck <linux@roeck-us.net>
|
||||
|
||||
@@ -17,9 +25,9 @@ Author: Guenter Roeck <linux@roeck-us.net>
|
||||
Description
|
||||
-----------
|
||||
|
||||
The LTC2978 is an octal power supply monitor, supervisor, sequencer and
|
||||
margin controller. The LTC3880 is a dual, PolyPhase DC/DC synchronous
|
||||
step-down switching regulator controller.
|
||||
LTC2974 is a quad digital power supply manager. LTC2978 is an octal power supply
|
||||
monitor. LTC3880 is a dual output poly-phase step-down DC/DC controller. LTC3883
|
||||
is a single phase step-down DC/DC controller.
|
||||
|
||||
|
||||
Usage Notes
|
||||
@@ -41,63 +49,90 @@ Sysfs attributes
|
||||
in1_label "vin"
|
||||
in1_input Measured input voltage.
|
||||
in1_min Minimum input voltage.
|
||||
in1_max Maximum input voltage.
|
||||
in1_lcrit Critical minimum input voltage.
|
||||
in1_max Maximum input voltage. LTC2974 and LTC2978 only.
|
||||
in1_lcrit Critical minimum input voltage. LTC2974 and LTC2978
|
||||
only.
|
||||
in1_crit Critical maximum input voltage.
|
||||
in1_min_alarm Input voltage low alarm.
|
||||
in1_max_alarm Input voltage high alarm.
|
||||
in1_lcrit_alarm Input voltage critical low alarm.
|
||||
in1_max_alarm Input voltage high alarm. LTC2974 and LTC2978 only.
|
||||
in1_lcrit_alarm Input voltage critical low alarm. LTC2974 and LTC2978
|
||||
only.
|
||||
in1_crit_alarm Input voltage critical high alarm.
|
||||
in1_lowest Lowest input voltage. LTC2978 only.
|
||||
in1_lowest Lowest input voltage. LTC2974 and LTC2978 only.
|
||||
in1_highest Highest input voltage.
|
||||
in1_reset_history Reset history. Writing into this attribute will reset
|
||||
history for all attributes.
|
||||
in1_reset_history Reset input voltage history.
|
||||
|
||||
in[2-9]_label "vout[1-8]". Channels 3 to 9 on LTC2978 only.
|
||||
in[2-9]_input Measured output voltage.
|
||||
in[2-9]_min Minimum output voltage.
|
||||
in[2-9]_max Maximum output voltage.
|
||||
in[2-9]_lcrit Critical minimum output voltage.
|
||||
in[2-9]_crit Critical maximum output voltage.
|
||||
in[2-9]_min_alarm Output voltage low alarm.
|
||||
in[2-9]_max_alarm Output voltage high alarm.
|
||||
in[2-9]_lcrit_alarm Output voltage critical low alarm.
|
||||
in[2-9]_crit_alarm Output voltage critical high alarm.
|
||||
in[2-9]_lowest Lowest output voltage. LTC2978 only.
|
||||
in[2-9]_highest Lowest output voltage.
|
||||
in[2-9]_reset_history Reset history. Writing into this attribute will reset
|
||||
history for all attributes.
|
||||
in[N]_label "vout[1-8]".
|
||||
LTC2974: N=2-5
|
||||
LTC2978: N=2-9
|
||||
LTC3880: N=2-3
|
||||
LTC3883: N=2
|
||||
in[N]_input Measured output voltage.
|
||||
in[N]_min Minimum output voltage.
|
||||
in[N]_max Maximum output voltage.
|
||||
in[N]_lcrit Critical minimum output voltage.
|
||||
in[N]_crit Critical maximum output voltage.
|
||||
in[N]_min_alarm Output voltage low alarm.
|
||||
in[N]_max_alarm Output voltage high alarm.
|
||||
in[N]_lcrit_alarm Output voltage critical low alarm.
|
||||
in[N]_crit_alarm Output voltage critical high alarm.
|
||||
in[N]_lowest Lowest output voltage. LTC2974 and LTC2978 only.
|
||||
in[N]_highest Highest output voltage.
|
||||
in[N]_reset_history Reset output voltage history.
|
||||
|
||||
temp[1-3]_input Measured temperature.
|
||||
temp[N]_input Measured temperature.
|
||||
On LTC2974, temp[1-4] report external temperatures,
|
||||
and temp5 reports the chip temperature.
|
||||
On LTC2978, only one temperature measurement is
|
||||
supported and reflects the internal temperature.
|
||||
supported and reports the chip temperature.
|
||||
On LTC3880, temp1 and temp2 report external
|
||||
temperatures, and temp3 reports the internal
|
||||
temperature.
|
||||
temp[1-3]_min Mimimum temperature.
|
||||
temp[1-3]_max Maximum temperature.
|
||||
temp[1-3]_lcrit Critical low temperature.
|
||||
temp[1-3]_crit Critical high temperature.
|
||||
temp[1-3]_min_alarm Chip temperature low alarm.
|
||||
temp[1-3]_max_alarm Chip temperature high alarm.
|
||||
temp[1-3]_lcrit_alarm Chip temperature critical low alarm.
|
||||
temp[1-3]_crit_alarm Chip temperature critical high alarm.
|
||||
temp[1-3]_lowest Lowest measured temperature. LTC2978 only.
|
||||
temp[1-3]_highest Highest measured temperature.
|
||||
temp[1-3]_reset_history Reset history. Writing into this attribute will reset
|
||||
history for all attributes.
|
||||
temperatures, and temp3 reports the chip temperature.
|
||||
On LTC3883, temp1 reports an external temperature,
|
||||
and temp2 reports the chip temperature.
|
||||
temp[N]_min Mimimum temperature. LTC2974 and LTC2978 only.
|
||||
temp[N]_max Maximum temperature.
|
||||
temp[N]_lcrit Critical low temperature.
|
||||
temp[N]_crit Critical high temperature.
|
||||
temp[N]_min_alarm Temperature low alarm. LTC2974 and LTC2978 only.
|
||||
temp[N]_max_alarm Temperature high alarm.
|
||||
temp[N]_lcrit_alarm Temperature critical low alarm.
|
||||
temp[N]_crit_alarm Temperature critical high alarm.
|
||||
temp[N]_lowest Lowest measured temperature. LTC2974 and LTC2978 only.
|
||||
Not supported for chip temperature sensor on LTC2974.
|
||||
temp[N]_highest Highest measured temperature. Not supported for chip
|
||||
temperature sensor on LTC2974.
|
||||
temp[N]_reset_history Reset temperature history. Not supported for chip
|
||||
temperature sensor on LTC2974.
|
||||
|
||||
power[1-2]_label "pout[1-2]". LTC3880 only.
|
||||
power[1-2]_input Measured power.
|
||||
power1_label "pin". LTC3883 only.
|
||||
power1_input Measured input power.
|
||||
|
||||
curr1_label "iin". LTC3880 only.
|
||||
power[N]_label "pout[1-4]".
|
||||
LTC2974: N=1-4
|
||||
LTC2978: Not supported
|
||||
LTC3880: N=1-2
|
||||
LTC3883: N=2
|
||||
power[N]_input Measured output power.
|
||||
|
||||
curr1_label "iin". LTC3880 and LTC3883 only.
|
||||
curr1_input Measured input current.
|
||||
curr1_max Maximum input current.
|
||||
curr1_max_alarm Input current high alarm.
|
||||
curr1_highest Highest input current. LTC3883 only.
|
||||
curr1_reset_history Reset input current history. LTC3883 only.
|
||||
|
||||
curr[2-3]_label "iout[1-2]". LTC3880 only.
|
||||
curr[2-3]_input Measured input current.
|
||||
curr[2-3]_max Maximum input current.
|
||||
curr[2-3]_crit Critical input current.
|
||||
curr[2-3]_max_alarm Input current high alarm.
|
||||
curr[2-3]_crit_alarm Input current critical high alarm.
|
||||
curr[N]_label "iout[1-4]".
|
||||
LTC2974: N=1-4
|
||||
LTC2978: not supported
|
||||
LTC3880: N=2-3
|
||||
LTC3883: N=2
|
||||
curr[N]_input Measured output current.
|
||||
curr[N]_max Maximum output current.
|
||||
curr[N]_crit Critical high output current.
|
||||
curr[N]_lcrit Critical low output current. LTC2974 only.
|
||||
curr[N]_max_alarm Output current high alarm.
|
||||
curr[N]_crit_alarm Output current critical high alarm.
|
||||
curr[N]_lcrit_alarm Output current critical low alarm. LTC2974 only.
|
||||
curr[N]_lowest Lowest output current. LTC2974 only.
|
||||
curr[N]_highest Highest output current.
|
||||
curr[N]_reset_history Reset output current history.
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
Note
|
||||
====
|
||||
|
||||
This driver supersedes the NCT6775F and NCT6776F support in the W83627EHF
|
||||
driver.
|
||||
|
||||
Kernel driver NCT6775
|
||||
=====================
|
||||
|
||||
Supported chips:
|
||||
* Nuvoton NCT5572D/NCT6771F/NCT6772F/NCT6775F/W83677HG-I
|
||||
Prefix: 'nct6775'
|
||||
Addresses scanned: ISA address retrieved from Super I/O registers
|
||||
Datasheet: Available from Nuvoton upon request
|
||||
* Nuvoton NCT5577D/NCT6776D/NCT6776F
|
||||
Prefix: 'nct6776'
|
||||
Addresses scanned: ISA address retrieved from Super I/O registers
|
||||
Datasheet: Available from Nuvoton upon request
|
||||
* Nuvoton NCT5532D/NCT6779D
|
||||
Prefix: 'nct6779'
|
||||
Addresses scanned: ISA address retrieved from Super I/O registers
|
||||
Datasheet: Available from Nuvoton upon request
|
||||
|
||||
Authors:
|
||||
Guenter Roeck <linux@roeck-us.net>
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
This driver implements support for the Nuvoton NCT6775F, NCT6776F, and NCT6779D
|
||||
and compatible super I/O chips.
|
||||
|
||||
The chips support up to 25 temperature monitoring sources. Up to 6 of those are
|
||||
direct temperature sensor inputs, the others are special sources such as PECI,
|
||||
PCH, and SMBUS. Depending on the chip type, 2 to 6 of the temperature sources
|
||||
can be monitored and compared against minimum, maximum, and critical
|
||||
temperatures. The driver reports up to 10 of the temperatures to the user.
|
||||
There are 4 to 5 fan rotation speed sensors, 8 to 15 analog voltage sensors,
|
||||
one VID, alarms with beep warnings (control unimplemented), and some automatic
|
||||
fan regulation strategies (plus manual fan control mode).
|
||||
|
||||
The temperature sensor sources on all chips are configurable. The configured
|
||||
source for each of the temperature sensors is provided in tempX_label.
|
||||
|
||||
Temperatures are measured in degrees Celsius and measurement resolution is
|
||||
either 1 degC or 0.5 degC, depending on the temperature source and
|
||||
configuration. An alarm is triggered when the temperature gets higher than
|
||||
the high limit; it stays on until the temperature falls below the hysteresis
|
||||
value. Alarms are only supported for temp1 to temp6, depending on the chip type.
|
||||
|
||||
Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
|
||||
triggered if the rotation speed has dropped below a programmable limit. On
|
||||
NCT6775F, fan readings can be divided by a programmable divider (1, 2, 4, 8,
|
||||
16, 32, 64 or 128) to give the readings more range or accuracy; the other chips
|
||||
do not have a fan speed divider. The driver sets the most suitable fan divisor
|
||||
itself; specifically, it increases the divider value each time a fan speed
|
||||
reading returns an invalid value, and it reduces it if the fan speed reading
|
||||
is lower than optimal. Some fans might not be present because they share pins
|
||||
with other functions.
|
||||
|
||||
Voltage sensors (also known as IN sensors) report their values in millivolts.
|
||||
An alarm is triggered if the voltage has crossed a programmable minimum
|
||||
or maximum limit.
|
||||
|
||||
The driver supports automatic fan control mode known as Thermal Cruise.
|
||||
In this mode, the chip attempts to keep the measured temperature in a
|
||||
predefined temperature range. If the temperature goes out of range, fan
|
||||
is driven slower/faster to reach the predefined range again.
|
||||
|
||||
The mode works for fan1-fan5.
|
||||
|
||||
sysfs attributes
|
||||
----------------
|
||||
|
||||
pwm[1-5] - this file stores PWM duty cycle or DC value (fan speed) in range:
|
||||
0 (lowest speed) to 255 (full)
|
||||
|
||||
pwm[1-5]_enable - this file controls mode of fan/temperature control:
|
||||
* 0 Fan control disabled (fans set to maximum speed)
|
||||
* 1 Manual mode, write to pwm[0-5] any value 0-255
|
||||
* 2 "Thermal Cruise" mode
|
||||
* 3 "Fan Speed Cruise" mode
|
||||
* 4 "Smart Fan III" mode (NCT6775F only)
|
||||
* 5 "Smart Fan IV" mode
|
||||
|
||||
pwm[1-5]_mode - controls if output is PWM or DC level
|
||||
* 0 DC output
|
||||
* 1 PWM output
|
||||
|
||||
Common fan control attributes
|
||||
-----------------------------
|
||||
|
||||
pwm[1-5]_temp_sel Temperature source. Value is temperature sensor index.
|
||||
For example, select '1' for temp1_input.
|
||||
pwm[1-5]_weight_temp_sel
|
||||
Secondary temperature source. Value is temperature
|
||||
sensor index. For example, select '1' for temp1_input.
|
||||
Set to 0 to disable secondary temperature control.
|
||||
|
||||
If secondary temperature functionality is enabled, it is controlled with the
|
||||
following attributes.
|
||||
|
||||
pwm[1-5]_weight_duty_step
|
||||
Duty step size.
|
||||
pwm[1-5]_weight_temp_step
|
||||
Temperature step size. With each step over
|
||||
temp_step_base, the value of weight_duty_step is added
|
||||
to the current pwm value.
|
||||
pwm[1-5]_weight_temp_step_base
|
||||
Temperature at which secondary temperature control kicks
|
||||
in.
|
||||
pwm[1-5]_weight_temp_step_tol
|
||||
Temperature step tolerance.
|
||||
|
||||
Thermal Cruise mode (2)
|
||||
-----------------------
|
||||
|
||||
If the temperature is in the range defined by:
|
||||
|
||||
pwm[1-5]_target_temp Target temperature, unit millidegree Celsius
|
||||
(range 0 - 127000)
|
||||
pwm[1-5]_temp_tolerance
|
||||
Target temperature tolerance, unit millidegree Celsius
|
||||
|
||||
there are no changes to fan speed. Once the temperature leaves the interval, fan
|
||||
speed increases (if temperature is higher that desired) or decreases (if
|
||||
temperature is lower than desired), using the following limits and time
|
||||
intervals.
|
||||
|
||||
pwm[1-5]_start fan pwm start value (range 1 - 255), to start fan
|
||||
when the temperature is above defined range.
|
||||
pwm[1-5]_floor lowest fan pwm (range 0 - 255) if temperature is below
|
||||
the defined range. If set to 0, the fan is expected to
|
||||
stop if the temperature is below the defined range.
|
||||
pwm[1-5]_step_up_time milliseconds before fan speed is increased
|
||||
pwm[1-5]_step_down_time milliseconds before fan speed is decreased
|
||||
pwm[1-5]_stop_time how many milliseconds must elapse to switch
|
||||
corresponding fan off (when the temperature was below
|
||||
defined range).
|
||||
|
||||
Speed Cruise mode (3)
|
||||
---------------------
|
||||
|
||||
This modes tries to keep the fan speed constant.
|
||||
|
||||
fan[1-5]_target Target fan speed
|
||||
fan[1-5]_tolerance
|
||||
Target speed tolerance
|
||||
|
||||
|
||||
Untested; use at your own risk.
|
||||
|
||||
Smart Fan IV mode (5)
|
||||
---------------------
|
||||
|
||||
This mode offers multiple slopes to control the fan speed. The slopes can be
|
||||
controlled by setting the pwm and temperature attributes. When the temperature
|
||||
rises, the chip will calculate the DC/PWM output based on the current slope.
|
||||
There are up to seven data points depending on the chip type. Subsequent data
|
||||
points should be set to higher temperatures and higher pwm values to achieve
|
||||
higher fan speeds with increasing temperature. The last data point reflects
|
||||
critical temperature mode, in which the fans should run at full speed.
|
||||
|
||||
pwm[1-5]_auto_point[1-7]_pwm
|
||||
pwm value to be set if temperature reaches matching
|
||||
temperature range.
|
||||
pwm[1-5]_auto_point[1-7]_temp
|
||||
Temperature over which the matching pwm is enabled.
|
||||
pwm[1-5]_temp_tolerance
|
||||
Temperature tolerance, unit millidegree Celsius
|
||||
pwm[1-5]_crit_temp_tolerance
|
||||
Temperature tolerance for critical temperature,
|
||||
unit millidegree Celsius
|
||||
|
||||
pwm[1-5]_step_up_time milliseconds before fan speed is increased
|
||||
pwm[1-5]_step_down_time milliseconds before fan speed is decreased
|
||||
|
||||
Usage Notes
|
||||
-----------
|
||||
|
||||
On various ASUS boards with NCT6776F, it appears that CPUTIN is not really
|
||||
connected to anything and floats, or that it is connected to some non-standard
|
||||
temperature measurement device. As a result, the temperature reported on CPUTIN
|
||||
will not reflect a usable value. It often reports unreasonably high
|
||||
temperatures, and in some cases the reported temperature declines if the actual
|
||||
temperature increases (similar to the raw PECI temperature value - see PECI
|
||||
specification for details). CPUTIN should therefore be be ignored on ASUS
|
||||
boards. The CPU temperature on ASUS boards is reported from PECI 0.
|
||||
@@ -40,7 +40,7 @@ bits for humidity, or 12 bits for temperature and 8 bits for humidity.
|
||||
The humidity calibration coefficients are programmed into an OTP memory on the
|
||||
chip. These coefficients are used to internally calibrate the signals from the
|
||||
sensors. Disabling the reload of those coefficients allows saving 10ms for each
|
||||
measurement and decrease power consumption, while loosing on precision.
|
||||
measurement and decrease power consumption, while losing on precision.
|
||||
|
||||
Some options may be set directly in the sht15_platform_data structure
|
||||
or via sysfs attributes.
|
||||
|
||||
@@ -8,8 +8,16 @@ Supported chips:
|
||||
Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp401.html
|
||||
* Texas Instruments TMP411
|
||||
Prefix: 'tmp411'
|
||||
Addresses scanned: I2C 0x4c
|
||||
Addresses scanned: I2C 0x4c, 0x4d, 0x4e
|
||||
Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp411.html
|
||||
* Texas Instruments TMP431
|
||||
Prefix: 'tmp431'
|
||||
Addresses scanned: I2C 0x4c, 0x4d
|
||||
Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp431.html
|
||||
* Texas Instruments TMP432
|
||||
Prefix: 'tmp432'
|
||||
Addresses scanned: I2C 0x4c, 0x4d
|
||||
Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp432.html
|
||||
|
||||
Authors:
|
||||
Hans de Goede <hdegoede@redhat.com>
|
||||
@@ -18,19 +26,19 @@ Authors:
|
||||
Description
|
||||
-----------
|
||||
|
||||
This driver implements support for Texas Instruments TMP401 and
|
||||
TMP411 chips. These chips implements one remote and one local
|
||||
temperature sensor. Temperature is measured in degrees
|
||||
This driver implements support for Texas Instruments TMP401, TMP411,
|
||||
TMP431, and TMP432 chips. These chips implement one or two remote and
|
||||
one local temperature sensors. Temperature is measured in degrees
|
||||
Celsius. Resolution of the remote sensor is 0.0625 degree. Local
|
||||
sensor resolution can be set to 0.5, 0.25, 0.125 or 0.0625 degree (not
|
||||
supported by the driver so far, so using the default resolution of 0.5
|
||||
degree).
|
||||
|
||||
The driver provides the common sysfs-interface for temperatures (see
|
||||
/Documentation/hwmon/sysfs-interface under Temperatures).
|
||||
Documentation/hwmon/sysfs-interface under Temperatures).
|
||||
|
||||
The TMP411 chip is compatible with TMP401. It provides some additional
|
||||
features.
|
||||
The TMP411 and TMP431 chips are compatible with TMP401. TMP411 provides
|
||||
some additional features.
|
||||
|
||||
* Minimum and Maximum temperature measured since power-on, chip-reset
|
||||
|
||||
@@ -40,3 +48,6 @@ features.
|
||||
|
||||
Exported via sysfs attribute temp_reset_history. Writing 1 to this
|
||||
file triggers a reset.
|
||||
|
||||
TMP432 is compatible with TMP401 and TMP431. It supports two external
|
||||
temperature sensors.
|
||||
|
||||
@@ -125,7 +125,7 @@ in2_label "vmon"
|
||||
in2_input Measured voltage on VMON (ZL2004) or VDRV (ZL9101M,
|
||||
ZL9117M) pin. Reported voltage is 16x the voltage on the
|
||||
pin (adjusted internally by the chip).
|
||||
in2_lcrit Critical minumum VMON/VDRV Voltage.
|
||||
in2_lcrit Critical minimum VMON/VDRV Voltage.
|
||||
in2_crit Critical maximum VMON/VDRV voltage.
|
||||
in2_lcrit_alarm VMON/VDRV voltage critical low alarm.
|
||||
in2_crit_alarm VMON/VDRV voltage critical high alarm.
|
||||
|
||||
@@ -5412,6 +5412,13 @@ L: linux-scsi@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/scsi/NCR_D700.*
|
||||
|
||||
NCT6775 HARDWARE MONITOR DRIVER
|
||||
M: Guenter Roeck <linux@roeck-us.net>
|
||||
L: lm-sensors@lm-sensors.org
|
||||
S: Maintained
|
||||
F: Documentation/hwmon/nct6775
|
||||
F: drivers/hwmon/nct6775.c
|
||||
|
||||
NETEFFECT IWARP RNIC DRIVER (IW_NES)
|
||||
M: Faisal Latif <faisal.latif@intel.com>
|
||||
L: linux-rdma@vger.kernel.org
|
||||
|
||||
+46
-2
@@ -179,9 +179,29 @@ config SENSORS_ADM9240
|
||||
This driver can also be built as a module. If so, the module
|
||||
will be called adm9240.
|
||||
|
||||
config SENSORS_ADT7X10
|
||||
tristate
|
||||
help
|
||||
This module contains common code shared by the ADT7310/ADT7320 and
|
||||
ADT7410/ADT7420 temperature monitoring chip drivers.
|
||||
|
||||
If build as a module, the module will be called adt7x10.
|
||||
|
||||
config SENSORS_ADT7310
|
||||
tristate "Analog Devices ADT7310/ADT7320"
|
||||
depends on SPI_MASTER
|
||||
select SENSORS_ADT7X10
|
||||
help
|
||||
If you say yes here you get support for the Analog Devices
|
||||
ADT7310 and ADT7320 temperature monitoring chips.
|
||||
|
||||
This driver can also be built as a module. If so, the module
|
||||
will be called adt7310.
|
||||
|
||||
config SENSORS_ADT7410
|
||||
tristate "Analog Devices ADT7410/ADT7420"
|
||||
depends on I2C
|
||||
select SENSORS_ADT7X10
|
||||
help
|
||||
If you say yes here you get support for the Analog Devices
|
||||
ADT7410 and ADT7420 temperature monitoring chips.
|
||||
@@ -751,6 +771,16 @@ config SENSORS_LTC4261
|
||||
This driver can also be built as a module. If so, the module will
|
||||
be called ltc4261.
|
||||
|
||||
config SENSORS_LM95234
|
||||
tristate "National Semiconductor LM95234"
|
||||
depends on I2C
|
||||
help
|
||||
If you say yes here you get support for the LM95234 temperature
|
||||
sensor.
|
||||
|
||||
This driver can also be built as a module. If so, the module
|
||||
will be called lm95234.
|
||||
|
||||
config SENSORS_LM95241
|
||||
tristate "National Semiconductor LM95241 and compatibles"
|
||||
depends on I2C
|
||||
@@ -877,8 +907,22 @@ config SENSORS_MCP3021
|
||||
This driver can also be built as a module. If so, the module
|
||||
will be called mcp3021.
|
||||
|
||||
config SENSORS_NCT6775
|
||||
tristate "Nuvoton NCT6775F and compatibles"
|
||||
depends on !PPC
|
||||
select HWMON_VID
|
||||
help
|
||||
If you say yes here you get support for the hardware monitoring
|
||||
functionality of the Nuvoton NCT6775F, NCT6776F, NCT6779D
|
||||
and compatible Super-I/O chips. This driver replaces the
|
||||
w83627ehf driver for NCT6775F and NCT6776F.
|
||||
|
||||
This driver can also be built as a module. If so, the module
|
||||
will be called nct6775.
|
||||
|
||||
config SENSORS_NTC_THERMISTOR
|
||||
tristate "NTC thermistor support"
|
||||
depends on (!OF && !IIO) || (OF && IIO)
|
||||
help
|
||||
This driver supports NTC thermistors sensor reading and its
|
||||
interpretation. The driver can also monitor the temperature and
|
||||
@@ -1204,8 +1248,8 @@ config SENSORS_TMP401
|
||||
tristate "Texas Instruments TMP401 and compatibles"
|
||||
depends on I2C
|
||||
help
|
||||
If you say yes here you get support for Texas Instruments TMP401 and
|
||||
TMP411 temperature sensor chips.
|
||||
If you say yes here you get support for Texas Instruments TMP401,
|
||||
TMP411, TMP431, and TMP432 temperature sensor chips.
|
||||
|
||||
This driver can also be built as a module. If so, the module
|
||||
will be called tmp401.
|
||||
|
||||
@@ -34,6 +34,8 @@ obj-$(CONFIG_SENSORS_ADM9240) += adm9240.o
|
||||
obj-$(CONFIG_SENSORS_ADS1015) += ads1015.o
|
||||
obj-$(CONFIG_SENSORS_ADS7828) += ads7828.o
|
||||
obj-$(CONFIG_SENSORS_ADS7871) += ads7871.o
|
||||
obj-$(CONFIG_SENSORS_ADT7X10) += adt7x10.o
|
||||
obj-$(CONFIG_SENSORS_ADT7310) += adt7310.o
|
||||
obj-$(CONFIG_SENSORS_ADT7410) += adt7410.o
|
||||
obj-$(CONFIG_SENSORS_ADT7411) += adt7411.o
|
||||
obj-$(CONFIG_SENSORS_ADT7462) += adt7462.o
|
||||
@@ -86,6 +88,7 @@ obj-$(CONFIG_SENSORS_LM87) += lm87.o
|
||||
obj-$(CONFIG_SENSORS_LM90) += lm90.o
|
||||
obj-$(CONFIG_SENSORS_LM92) += lm92.o
|
||||
obj-$(CONFIG_SENSORS_LM93) += lm93.o
|
||||
obj-$(CONFIG_SENSORS_LM95234) += lm95234.o
|
||||
obj-$(CONFIG_SENSORS_LM95241) += lm95241.o
|
||||
obj-$(CONFIG_SENSORS_LM95245) += lm95245.o
|
||||
obj-$(CONFIG_SENSORS_LTC4151) += ltc4151.o
|
||||
@@ -103,6 +106,7 @@ obj-$(CONFIG_SENSORS_MAX6650) += max6650.o
|
||||
obj-$(CONFIG_SENSORS_MAX6697) += max6697.o
|
||||
obj-$(CONFIG_SENSORS_MC13783_ADC)+= mc13783-adc.o
|
||||
obj-$(CONFIG_SENSORS_MCP3021) += mcp3021.o
|
||||
obj-$(CONFIG_SENSORS_NCT6775) += nct6775.o
|
||||
obj-$(CONFIG_SENSORS_NTC_THERMISTOR) += ntc_thermistor.o
|
||||
obj-$(CONFIG_SENSORS_PC87360) += pc87360.o
|
||||
obj-$(CONFIG_SENSORS_PC87427) += pc87427.o
|
||||
|
||||
@@ -96,9 +96,12 @@
|
||||
#define ABIT_UGURU_MAX_TIMEOUTS 2
|
||||
/* utility macros */
|
||||
#define ABIT_UGURU_NAME "abituguru"
|
||||
#define ABIT_UGURU_DEBUG(level, format, arg...) \
|
||||
if (level <= verbose) \
|
||||
printk(KERN_DEBUG ABIT_UGURU_NAME ": " format , ## arg)
|
||||
#define ABIT_UGURU_DEBUG(level, format, arg...) \
|
||||
do { \
|
||||
if (level <= verbose) \
|
||||
pr_debug(format , ## arg); \
|
||||
} while (0)
|
||||
|
||||
/* Macros to help calculate the sysfs_names array length */
|
||||
/*
|
||||
* sum of strlen of: in??_input\0, in??_{min,max}\0, in??_{min,max}_alarm\0,
|
||||
@@ -1533,7 +1536,7 @@ static int abituguru_resume(struct device *dev)
|
||||
}
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(abituguru_pm, abituguru_suspend, abituguru_resume);
|
||||
#define ABIT_UGURU_PM &abituguru_pm
|
||||
#define ABIT_UGURU_PM (&abituguru_pm)
|
||||
#else
|
||||
#define ABIT_UGURU_PM NULL
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
@@ -76,9 +76,11 @@
|
||||
#define ABIT_UGURU3_SYNCHRONIZE_TIMEOUT 5
|
||||
/* utility macros */
|
||||
#define ABIT_UGURU3_NAME "abituguru3"
|
||||
#define ABIT_UGURU3_DEBUG(format, arg...) \
|
||||
if (verbose) \
|
||||
printk(KERN_DEBUG ABIT_UGURU3_NAME ": " format , ## arg)
|
||||
#define ABIT_UGURU3_DEBUG(format, arg...) \
|
||||
do { \
|
||||
if (verbose) \
|
||||
pr_debug(format , ## arg); \
|
||||
} while (0)
|
||||
|
||||
/* Macros to help calculate the sysfs_names array length */
|
||||
#define ABIT_UGURU3_MAX_NO_SENSORS 26
|
||||
@@ -1159,7 +1161,7 @@ static int abituguru3_resume(struct device *dev)
|
||||
}
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(abituguru3_pm, abituguru3_suspend, abituguru3_resume);
|
||||
#define ABIT_UGURU3_PM &abituguru3_pm
|
||||
#define ABIT_UGURU3_PM (&abituguru3_pm)
|
||||
#else
|
||||
#define ABIT_UGURU3_PM NULL
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
@@ -116,7 +116,7 @@ static int ad7314_probe(struct spi_device *spi_dev)
|
||||
if (chip == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
dev_set_drvdata(&spi_dev->dev, chip);
|
||||
spi_set_drvdata(spi_dev, chip);
|
||||
|
||||
ret = sysfs_create_group(&spi_dev->dev.kobj, &ad7314_group);
|
||||
if (ret < 0)
|
||||
@@ -137,7 +137,7 @@ error_remove_group:
|
||||
|
||||
static int ad7314_remove(struct spi_device *spi_dev)
|
||||
{
|
||||
struct ad7314_data *chip = dev_get_drvdata(&spi_dev->dev);
|
||||
struct ad7314_data *chip = spi_get_drvdata(spi_dev);
|
||||
|
||||
hwmon_device_unregister(chip->hwmon_dev);
|
||||
sysfs_remove_group(&spi_dev->dev.kobj, &ad7314_group);
|
||||
@@ -166,6 +166,5 @@ static struct spi_driver ad7314_driver = {
|
||||
module_spi_driver(ad7314_driver);
|
||||
|
||||
MODULE_AUTHOR("Sonic Zhang <sonic.zhang@analog.com>");
|
||||
MODULE_DESCRIPTION("Analog Devices AD7314, ADT7301 and ADT7302 digital"
|
||||
" temperature sensor driver");
|
||||
MODULE_DESCRIPTION("Analog Devices AD7314, ADT7301 and ADT7302 digital temperature sensor driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
||||
@@ -312,8 +312,7 @@ static int adm1021_detect(struct i2c_client *client,
|
||||
int conv_rate, status, config, man_id, dev_id;
|
||||
|
||||
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) {
|
||||
pr_debug("adm1021: detect failed, "
|
||||
"smbus byte data not supported!\n");
|
||||
pr_debug("detect failed, smbus byte data not supported!\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@@ -324,7 +323,7 @@ static int adm1021_detect(struct i2c_client *client,
|
||||
|
||||
/* Check unused bits */
|
||||
if ((status & 0x03) || (config & 0x3F) || (conv_rate & 0xF8)) {
|
||||
pr_debug("adm1021: detect failed, chip not detected!\n");
|
||||
pr_debug("detect failed, chip not detected!\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@@ -353,7 +352,7 @@ static int adm1021_detect(struct i2c_client *client,
|
||||
else
|
||||
type_name = "max1617";
|
||||
|
||||
pr_debug("adm1021: Detected chip %s at adapter %d, address 0x%02x.\n",
|
||||
pr_debug("Detected chip %s at adapter %d, address 0x%02x.\n",
|
||||
type_name, i2c_adapter_id(adapter), client->addr);
|
||||
strlcpy(info->type, type_name, I2C_NAME_SIZE);
|
||||
|
||||
@@ -368,10 +367,8 @@ static int adm1021_probe(struct i2c_client *client,
|
||||
|
||||
data = devm_kzalloc(&client->dev, sizeof(struct adm1021_data),
|
||||
GFP_KERNEL);
|
||||
if (!data) {
|
||||
pr_debug("adm1021: detect failed, devm_kzalloc failed!\n");
|
||||
if (!data)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
i2c_set_clientdata(client, data);
|
||||
data->type = id->driver_data;
|
||||
|
||||
+27
-26
@@ -49,14 +49,14 @@ static int gpio_fan[8] = { -1, -1, -1, -1, -1, -1, -1, -1 };
|
||||
module_param_array(gpio_input, int, NULL, 0);
|
||||
MODULE_PARM_DESC(gpio_input, "List of GPIO pins (0-16) to program as inputs");
|
||||
module_param_array(gpio_output, int, NULL, 0);
|
||||
MODULE_PARM_DESC(gpio_output, "List of GPIO pins (0-16) to program as "
|
||||
"outputs");
|
||||
MODULE_PARM_DESC(gpio_output,
|
||||
"List of GPIO pins (0-16) to program as outputs");
|
||||
module_param_array(gpio_inverted, int, NULL, 0);
|
||||
MODULE_PARM_DESC(gpio_inverted, "List of GPIO pins (0-16) to program as "
|
||||
"inverted");
|
||||
MODULE_PARM_DESC(gpio_inverted,
|
||||
"List of GPIO pins (0-16) to program as inverted");
|
||||
module_param_array(gpio_normal, int, NULL, 0);
|
||||
MODULE_PARM_DESC(gpio_normal, "List of GPIO pins (0-16) to program as "
|
||||
"normal/non-inverted");
|
||||
MODULE_PARM_DESC(gpio_normal,
|
||||
"List of GPIO pins (0-16) to program as normal/non-inverted");
|
||||
module_param_array(gpio_fan, int, NULL, 0);
|
||||
MODULE_PARM_DESC(gpio_fan, "List of GPIO pins (0-7) to program as fan tachs");
|
||||
|
||||
@@ -372,31 +372,31 @@ static void adm1026_init_client(struct i2c_client *client)
|
||||
dev_dbg(&client->dev, "ADM1026_REG_CONFIG1 is: 0x%02x\n",
|
||||
data->config1);
|
||||
if ((data->config1 & CFG1_MONITOR) == 0) {
|
||||
dev_dbg(&client->dev, "Monitoring not currently "
|
||||
"enabled.\n");
|
||||
dev_dbg(&client->dev,
|
||||
"Monitoring not currently enabled.\n");
|
||||
}
|
||||
if (data->config1 & CFG1_INT_ENABLE) {
|
||||
dev_dbg(&client->dev, "SMBALERT interrupts are "
|
||||
"enabled.\n");
|
||||
dev_dbg(&client->dev,
|
||||
"SMBALERT interrupts are enabled.\n");
|
||||
}
|
||||
if (data->config1 & CFG1_AIN8_9) {
|
||||
dev_dbg(&client->dev, "in8 and in9 enabled. "
|
||||
"temp3 disabled.\n");
|
||||
dev_dbg(&client->dev,
|
||||
"in8 and in9 enabled. temp3 disabled.\n");
|
||||
} else {
|
||||
dev_dbg(&client->dev, "temp3 enabled. in8 and "
|
||||
"in9 disabled.\n");
|
||||
dev_dbg(&client->dev,
|
||||
"temp3 enabled. in8 and in9 disabled.\n");
|
||||
}
|
||||
if (data->config1 & CFG1_THERM_HOT) {
|
||||
dev_dbg(&client->dev, "Automatic THERM, PWM, "
|
||||
"and temp limits enabled.\n");
|
||||
dev_dbg(&client->dev,
|
||||
"Automatic THERM, PWM, and temp limits enabled.\n");
|
||||
}
|
||||
|
||||
if (data->config3 & CFG3_GPIO16_ENABLE) {
|
||||
dev_dbg(&client->dev, "GPIO16 enabled. THERM "
|
||||
"pin disabled.\n");
|
||||
dev_dbg(&client->dev,
|
||||
"GPIO16 enabled. THERM pin disabled.\n");
|
||||
} else {
|
||||
dev_dbg(&client->dev, "THERM pin enabled. "
|
||||
"GPIO16 disabled.\n");
|
||||
dev_dbg(&client->dev,
|
||||
"THERM pin enabled. GPIO16 disabled.\n");
|
||||
}
|
||||
if (data->config3 & CFG3_VREF_250)
|
||||
dev_dbg(&client->dev, "Vref is 2.50 Volts.\n");
|
||||
@@ -1798,8 +1798,8 @@ static int adm1026_detect(struct i2c_client *client,
|
||||
company = adm1026_read_value(client, ADM1026_REG_COMPANY);
|
||||
verstep = adm1026_read_value(client, ADM1026_REG_VERSTEP);
|
||||
|
||||
dev_dbg(&adapter->dev, "Detecting device at %d,0x%02x with"
|
||||
" COMPANY: 0x%02x and VERSTEP: 0x%02x\n",
|
||||
dev_dbg(&adapter->dev,
|
||||
"Detecting device at %d,0x%02x with COMPANY: 0x%02x and VERSTEP: 0x%02x\n",
|
||||
i2c_adapter_id(client->adapter), client->addr,
|
||||
company, verstep);
|
||||
|
||||
@@ -1811,11 +1811,12 @@ static int adm1026_detect(struct i2c_client *client,
|
||||
/* Analog Devices ADM1026 */
|
||||
} else if (company == ADM1026_COMPANY_ANALOG_DEV
|
||||
&& (verstep & 0xf0) == ADM1026_VERSTEP_GENERIC) {
|
||||
dev_err(&adapter->dev, "Unrecognized stepping "
|
||||
"0x%02x. Defaulting to ADM1026.\n", verstep);
|
||||
dev_err(&adapter->dev,
|
||||
"Unrecognized stepping 0x%02x. Defaulting to ADM1026.\n",
|
||||
verstep);
|
||||
} else if ((verstep & 0xf0) == ADM1026_VERSTEP_GENERIC) {
|
||||
dev_err(&adapter->dev, "Found version/stepping "
|
||||
"0x%02x. Assuming generic ADM1026.\n",
|
||||
dev_err(&adapter->dev,
|
||||
"Found version/stepping 0x%02x. Assuming generic ADM1026.\n",
|
||||
verstep);
|
||||
} else {
|
||||
dev_dbg(&adapter->dev, "Autodetection failed\n");
|
||||
|
||||
@@ -224,8 +224,9 @@ static ssize_t set_fan_div(struct device *dev,
|
||||
break;
|
||||
default:
|
||||
mutex_unlock(&data->update_lock);
|
||||
dev_err(&client->dev, "fan_div value %ld not "
|
||||
"supported. Choose one of 1, 2 or 4!\n", val);
|
||||
dev_err(&client->dev,
|
||||
"fan_div value %ld not supported. Choose one of 1, 2 or 4!\n",
|
||||
val);
|
||||
return -EINVAL;
|
||||
}
|
||||
/* Update the value */
|
||||
@@ -326,8 +327,8 @@ static int adm1029_detect(struct i2c_client *client,
|
||||
* There are no "official" CHIP ID, so actually
|
||||
* we use Major/Minor revision for that
|
||||
*/
|
||||
pr_info("adm1029: Unknown major revision %x, "
|
||||
"please let us know\n", chip_id);
|
||||
pr_info("Unknown major revision %x, please let us know\n",
|
||||
chip_id);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
||||
@@ -351,8 +351,9 @@ static void adm9240_write_fan_div(struct i2c_client *client, int nr,
|
||||
reg &= ~(3 << shift);
|
||||
reg |= (fan_div << shift);
|
||||
i2c_smbus_write_byte_data(client, ADM9240_REG_VID_FAN_DIV, reg);
|
||||
dev_dbg(&client->dev, "fan%d clock divider changed from %u "
|
||||
"to %u\n", nr + 1, 1 << old, 1 << fan_div);
|
||||
dev_dbg(&client->dev,
|
||||
"fan%d clock divider changed from %u to %u\n",
|
||||
nr + 1, 1 << old, 1 << fan_div);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -699,8 +700,8 @@ static void adm9240_init_client(struct i2c_client *client)
|
||||
/* start measurement cycle */
|
||||
i2c_smbus_write_byte_data(client, ADM9240_REG_CONFIG, 1);
|
||||
|
||||
dev_info(&client->dev, "cold start: config was 0x%02x "
|
||||
"mode %u\n", conf, mode);
|
||||
dev_info(&client->dev,
|
||||
"cold start: config was 0x%02x mode %u\n", conf, mode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+21
-21
@@ -40,25 +40,25 @@
|
||||
* the instruction byte
|
||||
*/
|
||||
/*Instruction Bit masks*/
|
||||
#define INST_MODE_bm (1<<7)
|
||||
#define INST_READ_bm (1<<6)
|
||||
#define INST_16BIT_bm (1<<5)
|
||||
#define INST_MODE_BM (1 << 7)
|
||||
#define INST_READ_BM (1 << 6)
|
||||
#define INST_16BIT_BM (1 << 5)
|
||||
|
||||
/*From figure 18 in the datasheet*/
|
||||
/*bit masks for Rev/Oscillator Control Register*/
|
||||
#define MUX_CNV_bv 7
|
||||
#define MUX_CNV_bm (1<<MUX_CNV_bv)
|
||||
#define MUX_M3_bm (1<<3) /*M3 selects single ended*/
|
||||
#define MUX_G_bv 4 /*allows for reg = (gain << MUX_G_bv) | ...*/
|
||||
#define MUX_CNV_BV 7
|
||||
#define MUX_CNV_BM (1 << MUX_CNV_BV)
|
||||
#define MUX_M3_BM (1 << 3) /*M3 selects single ended*/
|
||||
#define MUX_G_BV 4 /*allows for reg = (gain << MUX_G_BV) | ...*/
|
||||
|
||||
/*From figure 18 in the datasheet*/
|
||||
/*bit masks for Rev/Oscillator Control Register*/
|
||||
#define OSC_OSCR_bm (1<<5)
|
||||
#define OSC_OSCE_bm (1<<4)
|
||||
#define OSC_REFE_bm (1<<3)
|
||||
#define OSC_BUFE_bm (1<<2)
|
||||
#define OSC_R2V_bm (1<<1)
|
||||
#define OSC_RBG_bm (1<<0)
|
||||
#define OSC_OSCR_BM (1 << 5)
|
||||
#define OSC_OSCE_BM (1 << 4)
|
||||
#define OSC_REFE_BM (1 << 3)
|
||||
#define OSC_BUFE_BM (1 << 2)
|
||||
#define OSC_R2V_BM (1 << 1)
|
||||
#define OSC_RBG_BM (1 << 0)
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
@@ -79,7 +79,7 @@ struct ads7871_data {
|
||||
static int ads7871_read_reg8(struct spi_device *spi, int reg)
|
||||
{
|
||||
int ret;
|
||||
reg = reg | INST_READ_bm;
|
||||
reg = reg | INST_READ_BM;
|
||||
ret = spi_w8r8(spi, reg);
|
||||
return ret;
|
||||
}
|
||||
@@ -87,7 +87,7 @@ static int ads7871_read_reg8(struct spi_device *spi, int reg)
|
||||
static int ads7871_read_reg16(struct spi_device *spi, int reg)
|
||||
{
|
||||
int ret;
|
||||
reg = reg | INST_READ_bm | INST_16BIT_bm;
|
||||
reg = reg | INST_READ_BM | INST_16BIT_BM;
|
||||
ret = spi_w8r16(spi, reg);
|
||||
return ret;
|
||||
}
|
||||
@@ -111,13 +111,13 @@ static ssize_t show_voltage(struct device *dev,
|
||||
* TODO: add support for conversions
|
||||
* other than single ended with a gain of 1
|
||||
*/
|
||||
/*MUX_M3_bm forces single ended*/
|
||||
/*MUX_M3_BM forces single ended*/
|
||||
/*This is also where the gain of the PGA would be set*/
|
||||
ads7871_write_reg8(spi, REG_GAIN_MUX,
|
||||
(MUX_CNV_bm | MUX_M3_bm | channel));
|
||||
(MUX_CNV_BM | MUX_M3_BM | channel));
|
||||
|
||||
ret = ads7871_read_reg8(spi, REG_GAIN_MUX);
|
||||
mux_cnv = ((ret & MUX_CNV_bm)>>MUX_CNV_bv);
|
||||
mux_cnv = ((ret & MUX_CNV_BM) >> MUX_CNV_BV);
|
||||
/*
|
||||
* on 400MHz arm9 platform the conversion
|
||||
* is already done when we do this test
|
||||
@@ -125,14 +125,14 @@ static ssize_t show_voltage(struct device *dev,
|
||||
while ((i < 2) && mux_cnv) {
|
||||
i++;
|
||||
ret = ads7871_read_reg8(spi, REG_GAIN_MUX);
|
||||
mux_cnv = ((ret & MUX_CNV_bm)>>MUX_CNV_bv);
|
||||
mux_cnv = ((ret & MUX_CNV_BM) >> MUX_CNV_BV);
|
||||
msleep_interruptible(1);
|
||||
}
|
||||
|
||||
if (mux_cnv == 0) {
|
||||
val = ads7871_read_reg16(spi, REG_LS_BYTE);
|
||||
/*result in volts*10000 = (val/8192)*2.5*10000*/
|
||||
val = ((val>>2) * 25000) / 8192;
|
||||
val = ((val >> 2) * 25000) / 8192;
|
||||
return sprintf(buf, "%d\n", val);
|
||||
} else {
|
||||
return -1;
|
||||
@@ -189,7 +189,7 @@ static int ads7871_probe(struct spi_device *spi)
|
||||
ads7871_write_reg8(spi, REG_SER_CONTROL, 0);
|
||||
ads7871_write_reg8(spi, REG_AD_CONTROL, 0);
|
||||
|
||||
val = (OSC_OSCR_bm | OSC_OSCE_bm | OSC_REFE_bm | OSC_BUFE_bm);
|
||||
val = (OSC_OSCR_BM | OSC_OSCE_BM | OSC_REFE_BM | OSC_BUFE_BM);
|
||||
ads7871_write_reg8(spi, REG_OSC_CONTROL, val);
|
||||
ret = ads7871_read_reg8(spi, REG_OSC_CONTROL);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user