code:
Kernel driver isl68137
======================

Supported chips:

  * Renesas ISL68137

    Prefix: 'isl68137'

    Addresses scanned: -

    Datasheet:

      Publicly available at the Renesas website
      https://www.renesas.com/us/en/www/doc/datasheet/isl68137.pdf

  * Renesas ISL68220

    Prefix: 'isl68220'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL68221

    Prefix: 'isl68221'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL68222

    Prefix: 'isl68222'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL68223

    Prefix: 'isl68223'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL68224

    Prefix: 'isl68224'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL68225

    Prefix: 'isl68225'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL68226

    Prefix: 'isl68226'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL68227

    Prefix: 'isl68227'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL68229

    Prefix: 'isl68229'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL68233

    Prefix: 'isl68233'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL68239

    Prefix: 'isl68239'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL69222

    Prefix: 'isl69222'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL69223

    Prefix: 'isl69223'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL69224

    Prefix: 'isl69224'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL69225

    Prefix: 'isl69225'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL69227

    Prefix: 'isl69227'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL69228

    Prefix: 'isl69228'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL69234

    Prefix: 'isl69234'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL69236

    Prefix: 'isl69236'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL69239

    Prefix: 'isl69239'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL69242

    Prefix: 'isl69242'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL69243

    Prefix: 'isl69243'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL69247

    Prefix: 'isl69247'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL69248

    Prefix: 'isl69248'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL69254

    Prefix: 'isl69254'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL69255

    Prefix: 'isl69255'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL69256

    Prefix: 'isl69256'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL69259

    Prefix: 'isl69259'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL69260

    Prefix: 'isl69260'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL69268

    Prefix: 'isl69268'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL69269

    Prefix: 'isl69269'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas ISL69298

    Prefix: 'isl69298'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas RAA228000

    Prefix: 'raa228000'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas RAA228004

    Prefix: 'raa228004'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas RAA228006

    Prefix: 'raa228006'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas RAA228228

    Prefix: 'raa228228'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas RAA229001

    Prefix: 'raa229001'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

  * Renesas RAA229004

    Prefix: 'raa229004'

    Addresses scanned: -

    Datasheet:

      Publicly available (after August 2020 launch) at the Renesas website

Authors:
      - Maxim Sloyko <maxims@google.com>
      - Robert Lippert <rlippert@google.com>
      - Patrick Venture <venture@google.com>
      - Grant Peltier <grant.peltier.jg@renesas.com>

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

This driver supports the Renesas ISL68137 and all 2nd generation Renesas
digital multiphase voltage regulators (raa_dmpvr2). The ISL68137 is a digital
output 7-phase configurable PWM controller with an AVSBus interface. 2nd
generation devices are grouped into 4 distinct configurations: '1rail' for
single-rail devices, '2rail' for dual-rail devices, '3rail' for 3-rail devices,
and 'hv' for high voltage single-rail devices. Consult the individual datasheets
for more information.

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

This driver does not probe for PMBus devices. You will have to instantiate
devices explicitly.

The ISL68137 AVS operation mode must be enabled/disabled at runtime.

Beyond the normal sysfs pmbus attributes, the driver exposes a control attribute
for the ISL68137.

For 2nd generation Renesas digital multiphase voltage regulators, only the
normal sysfs pmbus attributes are supported.

ISL68137 sysfs attributes
-------------------------

======================= ====================================
avs(0|1)_enable		Controls the AVS state of each rail.

curr1_label		"iin"
curr1_input		Measured input current
curr1_crit		Critical maximum current
curr1_crit_alarm	Current critical high alarm

curr[2-3]_label		"iout[1-2]"
curr[2-3]_input		Measured output current
curr[2-3]_crit		Critical maximum current
curr[2-3]_crit_alarm	Current critical high alarm

in1_label		"vin"
in1_input		Measured input voltage
in1_lcrit		Critical minimum input voltage
in1_lcrit_alarm		Input voltage critical low alarm
in1_crit		Critical maximum input voltage
in1_crit_alarm		Input voltage critical high alarm

in[2-3]_label		"vout[1-2]"
in[2-3]_input		Measured output voltage
in[2-3]_lcrit		Critical minimum output voltage
in[2-3]_lcrit_alarm	Output voltage critical low alarm
in[2-3]_crit		Critical maximum output voltage
in[2-3]_crit_alarm	Output voltage critical high alarm

power1_label		"pin"
power1_input		Measured input power
power1_alarm		Input power high alarm

power[2-3]_label	"pout[1-2]"
power[2-3]_input	Measured output power

temp[1-3]_input		Measured temperature
temp[1-3]_crit		Critical high temperature
temp[1-3]_crit_alarm	Chip temperature critical high alarm
temp[1-3]_max		Maximum temperature
temp[1-3]_max_alarm	Chip temperature high alarm
======================= ====================================

raa_dmpvr2_1rail/hv sysfs attributes
------------------------------------

======================= ==========================================
curr1_label		"iin"
curr1_input		Measured input current
curr1_crit		Critical maximum current
curr1_crit_alarm	Current critical high alarm

curr2_label		"iout"
curr2_input		Measured output current
curr2_crit		Critical maximum current
curr2_crit_alarm	Current critical high alarm

in1_label		"vin"
in1_input		Measured input voltage
in1_lcrit		Critical minimum input voltage
in1_lcrit_alarm		Input voltage critical low alarm
in1_crit		Critical maximum input voltage
in1_crit_alarm		Input voltage critical high alarm

in2_label		"vmon"
in2_input		Scaled VMON voltage read from the VMON pin

in3_label		"vout"
in3_input		Measured output voltage
in3_lcrit		Critical minimum output voltage
in3_lcrit_alarm         Output voltage critical low alarm
in3_crit		Critical maximum output voltage
in3_crit_alarm          Output voltage critical high alarm

power1_label		"pin"
power1_input		Measured input power
power1_alarm		Input power high alarm

power2_label	        "pout"
power2_input	        Measured output power

temp[1-3]_input		Measured temperature
temp[1-3]_crit		Critical high temperature
temp[1-3]_crit_alarm	Chip temperature critical high alarm
temp[1-3]_max		Maximum temperature
temp[1-3]_max_alarm	Chip temperature high alarm
======================= ==========================================

raa_dmpvr2_2rail sysfs attributes
---------------------------------

======================= ==========================================
curr[1-2]_label		"iin[1-2]"
curr[1-2]_input		Measured input current
curr[1-2]_crit		Critical maximum current
curr[1-2]_crit_alarm	Current critical high alarm

curr[3-4]_label		"iout[1-2]"
curr[3-4]_input		Measured output current
curr[3-4]_crit		Critical maximum current
curr[3-4]_crit_alarm	Current critical high alarm

in1_label		"vin"
in1_input		Measured input voltage
in1_lcrit		Critical minimum input voltage
in1_lcrit_alarm		Input voltage critical low alarm
in1_crit		Critical maximum input voltage
in1_crit_alarm		Input voltage critical high alarm

in2_label		"vmon"
in2_input		Scaled VMON voltage read from the VMON pin

in[3-4]_label		"vout[1-2]"
in[3-4]_input		Measured output voltage
in[3-4]_lcrit		Critical minimum output voltage
in[3-4]_lcrit_alarm	Output voltage critical low alarm
in[3-4]_crit		Critical maximum output voltage
in[3-4]_crit_alarm	Output voltage critical high alarm

power[1-2]_label	"pin[1-2]"
power[1-2]_input	Measured input power
power[1-2]_alarm	Input power high alarm

power[3-4]_label	"pout[1-2]"
power[3-4]_input	Measured output power

temp[1-5]_input		Measured temperature
temp[1-5]_crit		Critical high temperature
temp[1-5]_crit_alarm	Chip temperature critical high alarm
temp[1-5]_max		Maximum temperature
temp[1-5]_max_alarm	Chip temperature high alarm
======================= ==========================================

raa_dmpvr2_3rail sysfs attributes
---------------------------------

======================= ==========================================
curr[1-3]_label		"iin[1-3]"
curr[1-3]_input		Measured input current
curr[1-3]_crit		Critical maximum current
curr[1-3]_crit_alarm	Current critical high alarm

curr[4-6]_label		"iout[1-3]"
curr[4-6]_input		Measured output current
curr[4-6]_crit		Critical maximum current
curr[4-6]_crit_alarm	Current critical high alarm

in1_label		"vin"
in1_input		Measured input voltage
in1_lcrit		Critical minimum input voltage
in1_lcrit_alarm		Input voltage critical low alarm
in1_crit		Critical maximum input voltage
in1_crit_alarm		Input voltage critical high alarm

in2_label		"vmon"
in2_input		Scaled VMON voltage read from the VMON pin

in[3-5]_label		"vout[1-3]"
in[3-5]_input		Measured output voltage
in[3-5]_lcrit		Critical minimum output voltage
in[3-5]_lcrit_alarm	Output voltage critical low alarm
in[3-5]_crit		Critical maximum output voltage
in[3-5]_crit_alarm	Output voltage critical high alarm

power[1-3]_label	"pin[1-3]"
power[1-3]_input	Measured input power
power[1-3]_alarm	Input power high alarm

power[4-6]_label	"pout[1-3]"
power[4-6]_input	Measured output power

temp[1-7]_input		Measured temperature
temp[1-7]_crit		Critical high temperature
temp[1-7]_crit_alarm	Chip temperature critical high alarm
temp[1-7]_max		Maximum temperature
temp[1-7]_max_alarm	Chip temperature high alarm
======================= ==========================================


code:
Kernel driver it87
==================

Supported chips:

  * IT8603E/IT8623E

    Prefix: 'it8603'

    Addresses scanned: from Super I/O config space (8 I/O ports)

    Datasheet: Not publicly available

  * IT8620E

    Prefix: 'it8620'

    Addresses scanned: from Super I/O config space (8 I/O ports)

  * IT8628E

    Prefix: 'it8628'

    Addresses scanned: from Super I/O config space (8 I/O ports)

    Datasheet: Not publicly available

  * IT8705F

    Prefix: 'it87'

    Addresses scanned: from Super I/O config space (8 I/O ports)

    Datasheet: Once publicly available at the ITE website, but no longer

  * IT8712F

    Prefix: 'it8712'

    Addresses scanned: from Super I/O config space (8 I/O ports)

    Datasheet: Once publicly available at the ITE website, but no longer

  * IT8716F/IT8726F

    Prefix: 'it8716'

    Addresses scanned: from Super I/O config space (8 I/O ports)

    Datasheet: Once publicly available at the ITE website, but no longer

  * IT8718F

    Prefix: 'it8718'

    Addresses scanned: from Super I/O config space (8 I/O ports)

    Datasheet: Once publicly available at the ITE website, but no longer

  * IT8720F

    Prefix: 'it8720'

    Addresses scanned: from Super I/O config space (8 I/O ports)

    Datasheet: Not publicly available

  * IT8721F/IT8758E

    Prefix: 'it8721'

    Addresses scanned: from Super I/O config space (8 I/O ports)

    Datasheet: Not publicly available

  * IT8728F

    Prefix: 'it8728'

    Addresses scanned: from Super I/O config space (8 I/O ports)

    Datasheet: Not publicly available

  * IT8732F

    Prefix: 'it8732'

    Addresses scanned: from Super I/O config space (8 I/O ports)

    Datasheet: Not publicly available

  * IT8771E

    Prefix: 'it8771'

    Addresses scanned: from Super I/O config space (8 I/O ports)

    Datasheet: Not publicly available

  * IT8772E

    Prefix: 'it8772'

    Addresses scanned: from Super I/O config space (8 I/O ports)

    Datasheet: Not publicly available

  * IT8781F

    Prefix: 'it8781'

    Addresses scanned: from Super I/O config space (8 I/O ports)

    Datasheet: Not publicly available

  * IT8782F

    Prefix: 'it8782'

    Addresses scanned: from Super I/O config space (8 I/O ports)

    Datasheet: Not publicly available

  * IT8783E/F

    Prefix: 'it8783'

    Addresses scanned: from Super I/O config space (8 I/O ports)

    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]

    Prefix: 'it87'

    Addresses scanned: from Super I/O config space (8 I/O ports)

    Datasheet: No longer be available

Authors:
    - Christophe Gauthron
    - Jean Delvare <jdelvare@suse.de>

Module Parameters
-----------------

* update_vbat: int
    0 if vbat should report power on value, 1 if vbat should be updated after
    each read. Default is 0. On some boards the battery voltage is provided
    by either the battery or the onboard power supply. Only the first reading
    at power on will be the actual battery voltage (which the chip does
    automatically). On other boards the battery voltage is always fed to
    the chip so can be read at any time. Excessive reading may decrease
    battery life but no information is given in the datasheet.

* fix_pwm_polarity int
    Force PWM polarity to active high (DANGEROUS). Some chips are
    misconfigured by BIOS - PWM values would be inverted. This option tries
    to fix this. Please contact your BIOS manufacturer and ask him for fix.

Hardware Interfaces
-------------------

All the chips supported by this driver are LPC Super-I/O chips, accessed
through the LPC bus (ISA-like I/O ports). The IT8712F additionally has an
SMBus interface to the hardware monitoring functions. This driver no
longer supports this interface though, as it is slower and less reliable
than the ISA access, and was only available on a small number of
motherboard models.

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

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

These chips are 'Super I/O chips', supporting floppy disks, infrared ports,
joysticks and other miscellaneous stuff. For hardware monitoring, they
include an 'environment controller' with 3 temperature sensors, 3 fan
rotation speed sensors, 8 voltage sensors, associated alarms, and chassis
intrusion detection.

The IT8712F and IT8716F additionally feature VID inputs, used to report
the Vcore voltage of the processor. The early IT8712F have 5 VID pins,
the IT8716F and late IT8712F have 6. They are shared with other functions
though, so the functionality may not be available on a given system.

The IT8718F and IT8720F also features VID inputs (up to 8 pins) but the value
is stored in the Super-I/O configuration space. Due to technical limitations,
this value can currently only be read once at initialization time, so
the driver won't notice and report changes in the VID value. The two
upper VID bits share their pins with voltage inputs (in5 and in6) so you
can't have both on a given board.

The IT8716F, IT8718F, IT8720F, IT8721F/IT8758E and later IT8712F revisions
have support for 2 additional fans. The additional fans are supported by the
driver.

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

The IT8726F is just bit enhanced IT8716F with additional hardware
for AMD power sequencing. Therefore the chip will appear as IT8716F
to userspace applications.

The IT8728F, IT8771E, and IT8772E are considered compatible with the IT8721F,
until a datasheet becomes available (hopefully.)

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

The IT8620E and IT8628E are custom designs, hardware monitoring part is similar
to IT8728F. It only supports 16-bit fan mode. Both chips support up to 6 fans.

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

The IT8732F supports a closed-loop mode for fan control, but this is not
currently implemented by the driver.

Temperatures are measured in degrees Celsius. An alarm is triggered once
when the Overtemperature Shutdown limit is crossed.

Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
triggered if the rotation speed has dropped below a programmable limit. When
16-bit tachometer counters aren't used, fan readings can be divided by
a programmable divider (1, 2, 4 or 8) to give the readings more range or
accuracy. With a divider of 2, the lowest representable value is around
2600 RPM. Not all RPM values can accurately be represented, so some rounding
is done.

Voltage sensors (also known as IN sensors) report their values in volts. An
alarm is triggered if the voltage has crossed a programmable minimum or
maximum limit. Note that minimum in this case always means 'closest to
zero'; this is important for negative voltage measurements. On most chips, all
voltage inputs can measure voltages between 0 and 4.08 volts, with a resolution
of 0.016 volt.  IT8603E, IT8721F/IT8758E and IT8728F can measure between 0 and
3.06 volts, with a resolution of 0.012 volt.  IT8732F can measure between 0 and
2.8 volts with a resolution of 0.0109 volt.  The battery voltage in8 does not
have limit registers.

On the IT8603E, IT8620E, IT8628E, IT8721F/IT8758E, IT8732F, IT8781F, IT8782F,
and IT8783E/F, some voltage inputs are internal and scaled inside the chip:
* in3 (optional)
* in7 (optional for IT8781F, IT8782F, and IT8783E/F)
* in8 (always)
* in9 (relevant for IT8603E only)
The driver handles this transparently so user-space doesn't have to care.

The VID lines (IT8712F/IT8716F/IT8718F/IT8720F) encode the core voltage value:
the voltage level your processor should work with. This is hardcoded by
the mainboard and/or processor itself. It is a value in volts.

If an alarm triggers, it will remain triggered until the hardware register
is read at least once. This means that the cause for the alarm may already
have disappeared! Note that in the current implementation, all hardware
registers are read whenever any data is read (unless it is less than 1.5
seconds since the last update). This means that you can easily miss
once-only alarms.

Out-of-limit readings can also result in beeping, if the chip is properly
wired and configured. Beeping can be enabled or disabled per sensor type
(temperatures, voltages and fans.)

The IT87xx only updates its values each 1.5 seconds; reading it more often
will do no harm, but will return 'old' values.

To change sensor N to a thermistor, 'echo 4 > tempN_type' where N is 1, 2,
or 3. To change sensor N to a thermal diode, 'echo 3 > tempN_type'.
Give 0 for unused sensor. Any other value is invalid. To configure this at
startup, consult lm_sensors's /etc/sensors.conf. (4 = thermistor;
3 = thermal diode)

Fan speed control
-----------------

The fan speed control features are limited to manual PWM mode. Automatic
"Smart Guardian" mode control handling is only implemented for older chips
(see below.) However if you want to go for "manual mode" just write 1 to
pwmN_enable.

If you are only able to control the fan speed with very small PWM values,
try lowering the PWM base frequency (pwm1_freq). Depending on the fan,
it may give you a somewhat greater control range. The same frequency is
used to drive all fan outputs, which is why pwm2_freq and pwm3_freq are
read-only.

Automatic fan speed control (old interface)
-------------------------------------------

The driver supports the old interface to automatic fan speed control
which is implemented by IT8705F chips up to revision F and IT8712F
chips up to revision G.

This interface implements 4 temperature vs. PWM output trip points.
The PWM output of trip point 4 is always the maximum value (fan running
at full speed) while the PWM output of the other 3 trip points can be
freely chosen. The temperature of all 4 trip points can be freely chosen.
Additionally, trip point 1 has an hysteresis temperature attached, to
prevent fast switching between fan on and off.

The chip automatically computes the PWM output value based on the input
temperature, based on this simple rule: if the temperature value is
between trip point N and trip point N+1 then the PWM output value is
the one of trip point N. The automatic control mode is less flexible
than the manual control mode, but it reacts faster, is more robust and
doesn't use CPU cycles.

Trip points must be set properly before switching to automatic fan speed
control mode. The driver will perform basic integrity checks before
actually switching to automatic control mode.

Temperature offset attributes
-----------------------------

The driver supports temp[1-3]_offset sysfs attributes to adjust the reported
temperature for thermal diodes or diode-connected thermal transistors.
If a temperature sensor is configured for thermistors, the attribute values
are ignored. If the thermal sensor type is Intel PECI, the temperature offset
must be programmed to the critical CPU temperature.

repo_name: angery/linux


code:
Kernel driver jc42
==================

Supported chips:

  * Analog Devices ADT7408

    Datasheets:

	https://www.analog.com/static/imported-files/data_sheets/ADT7408.pdf

  * Atmel AT30TS00, AT30TS002A/B, AT30TSE004A

    Datasheets:

	http://www.atmel.com/Images/doc8585.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-8868-DTS-AT30TSE004A-Datasheet.pdf

  * IDT TSE2002B3, TSE2002GB2, TSE2004GB2, TS3000B3, TS3000GB0, TS3000GB2,

	TS3001GB2

    Datasheets:

	Available from IDT web site

  * Maxim MAX6604

    Datasheets:

	http://datasheets.maxim-ic.com/en/ds/MAX6604.pdf

  * Microchip MCP9804, MCP9805, MCP9808, MCP98242, MCP98243, MCP98244, MCP9843

    Datasheets:

	https://ww1.microchip.com/downloads/en/DeviceDoc/22203C.pdf

	https://ww1.microchip.com/downloads/en/DeviceDoc/21977b.pdf

	https://ww1.microchip.com/downloads/en/DeviceDoc/25095A.pdf

	https://ww1.microchip.com/downloads/en/DeviceDoc/21996a.pdf

	https://ww1.microchip.com/downloads/en/DeviceDoc/22153c.pdf

	https://ww1.microchip.com/downloads/en/DeviceDoc/22327A.pdf

  * NXP Semiconductors SE97, SE97B, SE98, SE98A

    Datasheets:

	https://www.nxp.com/documents/data_sheet/SE97.pdf

	https://www.nxp.com/documents/data_sheet/SE97B.pdf

	https://www.nxp.com/documents/data_sheet/SE98.pdf

	https://www.nxp.com/documents/data_sheet/SE98A.pdf

  * ON Semiconductor CAT34TS02, CAT6095

    Datasheet:

	https://www.onsemi.com/pub_link/Collateral/CAT34TS02-D.PDF

	https://www.onsemi.com/pub/Collateral/CAT6095-D.PDF

  * ST Microelectronics STTS424, STTS424E02, STTS2002, STTS2004, STTS3000

    Datasheets:

	http://www.st.com/web/en/resource/technical/document/datasheet/CD00157556.pdf

	http://www.st.com/web/en/resource/technical/document/datasheet/CD00157558.pdf

	http://www.st.com/web/en/resource/technical/document/datasheet/CD00266638.pdf

	http://www.st.com/web/en/resource/technical/document/datasheet/CD00225278.pdf

	http://www.st.com/web/en/resource/technical/document/datasheet/DM00076709.pdf

  * JEDEC JC 42.4 compliant temperature sensor chips

    Datasheet:

	http://www.jedec.org/sites/default/files/docs/4_01_04R19.pdf

  Common for all chips:

    Prefix: 'jc42'

    Addresses scanned: I2C 0x18 - 0x1f

Author:
	Guenter Roeck <linux@roeck-us.net>

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

This driver implements support for JEDEC JC 42.4 compliant temperature sensors,
which are used on many DDR3 memory modules for mobile devices and servers. Some
systems use the sensor to prevent memory overheating by automatically throttling
the memory controller.

The driver auto-detects the chips listed above, but can be manually instantiated
to support other JC 42.4 compliant chips.

Example: the following will load the driver for a generic JC 42.4 compliant
temperature sensor at address 0x18 on I2C bus #1::

	# modprobe jc42
	# echo jc42 0x18 > /sys/bus/i2c/devices/i2c-1/new_device

A JC 42.4 compliant chip supports a single temperature sensor. Minimum, maximum,
and critical temperature can be configured. There are alarms for high, low,
and critical thresholds.

There is also an hysteresis to control the thresholds for resetting alarms.
Per JC 42.4 specification, the hysteresis threshold can be configured to 0, 1.5,
3.0, and 6.0 degrees C. Configured hysteresis values will be rounded to those
limits. The chip supports only a single register to configure the hysteresis,
which applies to all limits. This register can be written by writing into
temp1_crit_hyst. Other hysteresis attributes are read-only.

If the BIOS has configured the sensor for automatic temperature management, it
is likely that it has locked the registers, i.e., that the temperature limits
cannot be changed.

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

======================= ===========================================
temp1_input		Temperature (RO)
temp1_min		Minimum temperature (RO or RW)
temp1_max		Maximum temperature (RO or RW)
temp1_crit		Critical high temperature (RO or RW)

temp1_crit_hyst		Critical hysteresis temperature (RO or RW)
temp1_max_hyst		Maximum hysteresis temperature (RO)

temp1_min_alarm		Temperature low alarm
temp1_max_alarm		Temperature high alarm
temp1_crit_alarm	Temperature critical alarm
======================= ===========================================


code:
Kernel driver k10temp
=====================

Supported chips:

* AMD Family 10h processors:

  Socket F: Quad-Core/Six-Core/Embedded Opteron (but see below)

  Socket AM2+: Quad-Core Opteron, Phenom (II) X3/X4, Athlon X2 (but see below)

  Socket AM3: Quad-Core Opteron, Athlon/Phenom II X2/X3/X4, Sempron II

  Socket S1G3: Athlon II, Sempron, Turion II

* AMD Family 11h processors:

  Socket S1G2: Athlon (X2), Sempron (X2), Turion X2 (Ultra)

* AMD Family 12h processors: "Llano" (E2/A4/A6/A8-Series)

* AMD Family 14h processors: "Brazos" (C/E/G/Z-Series)

* AMD Family 15h processors: "Bulldozer" (FX-Series), "Trinity", "Kaveri",
  "Carrizo", "Stoney Ridge", "Bristol Ridge"

* AMD Family 16h processors: "Kabini", "Mullins"

* AMD Family 17h processors: "Zen", "Zen 2"

* AMD Family 18h processors: "Hygon Dhyana"

* AMD Family 19h processors: "Zen 3"

  Prefix: 'k10temp'

  Addresses scanned: PCI space

  Datasheets:

  BIOS and Kernel Developer's Guide (BKDG) For AMD Family 10h Processors:

    http://support.amd.com/us/Processor_TechDocs/31116.pdf

  BIOS and Kernel Developer's Guide (BKDG) for AMD Family 11h Processors:

    http://support.amd.com/us/Processor_TechDocs/41256.pdf

  BIOS and Kernel Developer's Guide (BKDG) for AMD Family 12h Processors:

    http://support.amd.com/us/Processor_TechDocs/41131.pdf

  BIOS and Kernel Developer's Guide (BKDG) for AMD Family 14h Models 00h-0Fh Processors:

    http://support.amd.com/us/Processor_TechDocs/43170.pdf

  Revision Guide for AMD Family 10h Processors:

    http://support.amd.com/us/Processor_TechDocs/41322.pdf

  Revision Guide for AMD Family 11h Processors:

    http://support.amd.com/us/Processor_TechDocs/41788.pdf

  Revision Guide for AMD Family 12h Processors:

    http://support.amd.com/us/Processor_TechDocs/44739.pdf

  Revision Guide for AMD Family 14h Models 00h-0Fh Processors:

    http://support.amd.com/us/Processor_TechDocs/47534.pdf

  AMD Family 11h Processor Power and Thermal Data Sheet for Notebooks:

    http://support.amd.com/us/Processor_TechDocs/43373.pdf

  AMD Family 10h Server and Workstation Processor Power and Thermal Data Sheet:

    http://support.amd.com/us/Processor_TechDocs/43374.pdf

  AMD Family 10h Desktop Processor Power and Thermal Data Sheet:

    http://support.amd.com/us/Processor_TechDocs/43375.pdf

Author: Clemens Ladisch <clemens@ladisch.de>

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

This driver permits reading of the internal temperature sensor of AMD
Family 10h/11h/12h/14h/15h/16h processors.

All these processors have a sensor, but on those for Socket F or AM2+,
the sensor may return inconsistent values (erratum 319).  The driver
will refuse to load on these revisions unless you specify the "force=1"
module parameter.

Due to technical reasons, the driver can detect only the mainboard's
socket type, not the processor's actual capabilities.  Therefore, if you
are using an AM3 processor on an AM2+ mainboard, you can safely use the
"force=1" parameter.

For CPUs older than Family 17h, there is one temperature measurement value,
available as temp1_input in sysfs. It is measured in degrees Celsius with a
resolution of 1/8th degree.  Please note that it is defined as a relative
value; to quote the AMD manual::

  Tctl is the processor temperature control value, used by the platform to
  control cooling systems. Tctl is a non-physical temperature on an
  arbitrary scale measured in degrees. It does _not_ represent an actual
  physical temperature like die or case temperature. Instead, it specifies
  the processor temperature relative to the point at which the system must
  supply the maximum cooling for the processor's specified maximum case
  temperature and maximum thermal power dissipation.

The maximum value for Tctl is available in the file temp1_max.

If the BIOS has enabled hardware temperature control, the threshold at
which the processor will throttle itself to avoid damage is available in
temp1_crit and temp1_crit_hyst.

On some AMD CPUs, there is a difference between the die temperature (Tdie) and
the reported temperature (Tctl). Tdie is the real measured temperature, and
Tctl is used for fan control. While Tctl is always available as temp1_input,
the driver exports Tdie temperature as temp2_input for those CPUs which support
it.

Models from 17h family report relative temperature, the driver aims to
compensate and report the real temperature.

On Family 17h and Family 18h CPUs, additional temperature sensors may report
Core Complex Die (CCD) temperatures. Up to 8 such temperatures are reported
as temp{3..10}_input, labeled Tccd{1..8}. Actual support depends on the CPU
variant.


code:
Kernel driver k8temp
====================

Supported chips:

  * AMD Athlon64/FX or Opteron CPUs

    Prefix: 'k8temp'

    Addresses scanned: PCI space

    Datasheet: https://www.amd.com/system/files/TechDocs/32559.pdf

Author: Rudolf Marek

Contact: Rudolf Marek <r.marek@assembler.cz>

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

This driver permits reading temperature sensor(s) embedded inside AMD K8
family CPUs (Athlon64/FX, Opteron). Official documentation says that it works
from revision F of K8 core, but in fact it seems to be implemented for all
revisions of K8 except the first two revisions (SH-B0 and SH-B3).

Please note that you will need at least lm-sensors 2.10.1 for proper userspace
support.

There can be up to four temperature sensors inside single CPU. The driver
will auto-detect the sensors and will display only temperatures from
implemented sensors.

Mapping of /sys files is as follows:

============= ===================================
temp1_input   temperature of Core 0 and "place" 0
temp2_input   temperature of Core 0 and "place" 1
temp3_input   temperature of Core 1 and "place" 0
temp4_input   temperature of Core 1 and "place" 1
============= ===================================

Temperatures are measured in degrees Celsius and measurement resolution is
1 degree C. It is expected that future CPU will have better resolution. The
temperature is updated once a second. Valid temperatures are from -49 to
206 degrees C.

Temperature known as TCaseMax was specified for processors up to revision E.
This temperature is defined as temperature between heat-spreader and CPU
case, so the internal CPU temperature supplied by this driver can be higher.
There is no easy way how to measure the temperature which will correlate
with TCaseMax temperature.

For newer revisions of CPU (rev F, socket AM2) there is a mathematically
computed temperature called TControl, which must be lower than TControlMax.

The relationship is following:

	temp1_input - TjOffset*2 < TControlMax,

TjOffset is not yet exported by the driver, TControlMax is usually
70 degrees C. The rule of the thumb -> CPU temperature should not cross
60 degrees C too much.


code:
.. SPDX-License-Identifier: GPL-2.0

Kernel driver lan966x-hwmon
===========================

Supported chips:

  * Microchip LAN9668 (sensor in SoC)

    Prefix: 'lan9668-hwmon'

    Datasheet: https://microchip-ung.github.io/lan9668_reginfo

Authors:

	Michael Walle <michael@walle.cc>

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

This driver implements support for the Microchip LAN9668 on-chip
temperature sensor as well as its fan controller. It provides one
temperature sensor and one fan controller. The temperature range
of the sensor is specified from -40 to +125 degrees Celsius and
its accuracy is +/- 5 degrees Celsius. The fan controller has a
tacho input and a PWM output with a customizable PWM output
frequency ranging from ~20Hz to ~650kHz.

No alarms are supported by the SoC.

The driver exports temperature values, fan tacho input and PWM
settings via the following sysfs files:

**temp1_input**

**fan1_input**

**pwm1**

**pwm1_freq**


code:
Kernel driver lineage-pem
=========================

Supported devices:

  * Lineage Compact Power Line Power Entry Modules

    Prefix: 'lineage-pem'

    Addresses scanned: -

    Documentation:

	http://www.lineagepower.com/oem/pdf/CPLI2C.pdf

Author: Guenter Roeck <linux@roeck-us.net>

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

This driver supports various Lineage Compact Power Line DC/DC and AC/DC
converters such as CP1800, CP2000AC, CP2000DC, CP2100DC, and others.

Lineage CPL power entry modules are nominally PMBus compliant. However, most
standard PMBus commands are not supported. Specifically, all hardware monitoring
and status reporting commands are non-standard. For this reason, a standard
PMBus driver can not be used.

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

This driver does not probe for Lineage CPL devices, since there is no register
which can be safely used to identify the chip. You will have to instantiate
the devices explicitly.

Example: the following will load the driver for a Lineage PEM at address 0x40
on I2C bus #1::

	$ modprobe lineage-pem
	$ echo lineage-pem 0x40 > /sys/bus/i2c/devices/i2c-1/new_device

All Lineage CPL power entry modules have a built-in I2C bus master selector
(PCA9541). To ensure device access, this driver should only be used as client
driver to the pca9541 I2C master selector driver.

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

All Lineage CPL devices report output voltage and device temperature as well as
alarms for output voltage, temperature, input voltage, input current, input power,
and fan status.

Input voltage, input current, input power, and fan speed measurement is only
supported on newer devices. The driver detects if those attributes are supported,
and only creates respective sysfs entries if they are.

======================= ===============================
in1_input		Output voltage (mV)
in1_min_alarm		Output undervoltage alarm
in1_max_alarm		Output overvoltage alarm
in1_crit		Output voltage critical alarm

in2_input		Input voltage (mV, optional)
in2_alarm		Input voltage alarm

curr1_input		Input current (mA, optional)
curr1_alarm		Input overcurrent alarm

power1_input		Input power (uW, optional)
power1_alarm		Input power alarm

fan1_input		Fan 1 speed (rpm, optional)
fan2_input		Fan 2 speed (rpm, optional)
fan3_input		Fan 3 speed (rpm, optional)

temp1_input
temp1_max
temp1_crit
temp1_alarm
temp1_crit_alarm
temp1_fault
======================= ===============================


code:
Kernel driver lm25066
=====================

Supported chips:

  * TI LM25056

    Prefix: 'lm25056'

    Addresses scanned: -

    Datasheets:

	https://www.ti.com/lit/gpn/lm25056

	https://www.ti.com/lit/gpn/lm25056a

  * National Semiconductor LM25066

    Prefix: 'lm25066'

    Addresses scanned: -

    Datasheets:

	http://www.national.com/pf/LM/LM25066.html

	http://www.national.com/pf/LM/LM25066A.html

  * National Semiconductor LM5064

    Prefix: 'lm5064'

    Addresses scanned: -

    Datasheet:

	http://www.national.com/pf/LM/LM5064.html

  * National Semiconductor LM5066

    Prefix: 'lm5066'

    Addresses scanned: -

    Datasheet:

	http://www.national.com/pf/LM/LM5066.html

  * Texas Instruments LM5066I

    Prefix: 'lm5066i'

    Addresses scanned: -

	Datasheet:

    https://www.ti.com/product/LM5066I

Author: Guenter Roeck <linux@roeck-us.net>

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

This driver supports hardware monitoring for National Semiconductor / TI LM25056,
LM25066, LM5064, and LM5066/LM5066I Power Management, Monitoring,
Control, and Protection ICs.

The driver is a client driver to the core PMBus driver. Please see
Documentation/hwmon/pmbus.rst 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.rst for
details.

The shunt (sense) resistor value can be configured by a device tree property;
see Documentation/devicetree/bindings/hwmon/pmbus/ti,lm25066.yaml for details.

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

The driver supports standard PMBus driver platform data.

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

The following attributes are supported. Limits are read-write; all other
attributes are read-only.

======================= =======================================================
in1_label		"vin"
in1_input		Measured input voltage.
in1_average		Average measured input voltage.
in1_min			Minimum input voltage.
in1_max			Maximum input voltage.
in1_min_alarm		Input voltage low alarm.
in1_max_alarm		Input voltage high 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		"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.
curr1_average		Average measured input current.
curr1_max		Maximum input current.
curr1_max_alarm		Input current high alarm.

power1_label		"pin"
power1_input		Measured input power.
power1_average		Average measured input power.
power1_max		Maximum input power limit.
power1_alarm		Input power alarm
power1_input_highest	Historical maximum power.
power1_reset_history	Write any value to reset maximum power history.

temp1_input		Measured temperature.
temp1_max		Maximum temperature.
temp1_crit		Critical high temperature.
temp1_max_alarm		Chip temperature high alarm.
temp1_crit_alarm	Chip temperature critical high alarm.
======================= =======================================================


code:
Kernel driver lm63
==================

Supported chips:

  * National Semiconductor LM63

    Prefix: 'lm63'

    Addresses scanned: I2C 0x4c

    Datasheet: Publicly available at the National Semiconductor website

	       http://www.national.com/pf/LM/LM63.html

  * National Semiconductor LM64

    Prefix: 'lm64'

    Addresses scanned: I2C 0x18 and 0x4e

    Datasheet: Publicly available at the National Semiconductor website

	       http://www.national.com/pf/LM/LM64.html

  * National Semiconductor LM96163

    Prefix: 'lm96163'

    Addresses scanned: I2C 0x4c

    Datasheet: Publicly available at the National Semiconductor website

	       http://www.national.com/pf/LM/LM96163.html

Author: Jean Delvare <jdelvare@suse.de>

Thanks go to Tyan and especially Alex Buckingham for setting up a remote
access to their S4882 test platform for this driver.

  https://www.tyan.com/

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

The LM63 is a digital temperature sensor with integrated fan monitoring
and control.

The LM63 is basically an LM86 with fan speed monitoring and control
capabilities added. It misses some of the LM86 features though:

 - No low limit for local temperature.
 - No critical limit for local temperature.
 - Critical limit for remote temperature can be changed only once. We
   will consider that the critical limit is read-only.

The datasheet isn't very clear about what the tachometer reading is.

An explanation from National Semiconductor: The two lower bits of the read
value have to be masked out. The value is still 16 bit in width.

All temperature values are given in degrees Celsius. Resolution is 1.0
degree for the local temperature, 0.125 degree for the remote temperature.

The fan speed is measured using a tachometer. Contrary to most chips which
store the value in an 8-bit register and have a selectable clock divider
to make sure that the result will fit in the register, the LM63 uses 16-bit
value for measuring the speed of the fan. It can measure fan speeds down to
83 RPM, at least in theory.

Note that the pin used for fan monitoring is shared with an alert out
function. Depending on how the board designer wanted to use the chip, fan
speed monitoring will or will not be possible. The proper chip configuration
is left to the BIOS, and the driver will blindly trust it. Only the original
LM63 suffers from this limitation, the LM64 and LM96163 have separate pins
for fan monitoring and alert out. On the LM64, monitoring is always enabled;
on the LM96163 it can be disabled.

A PWM output can be used to control the speed of the fan. The LM63 has two
PWM modes: manual and automatic. Automatic mode is not fully implemented yet
(you cannot define your custom PWM/temperature curve), and mode change isn't
supported either.

The lm63 driver will not update its values more frequently than configured with
the update_interval sysfs attribute; reading them more often will do no harm,
but will return 'old' values. Values in the automatic fan control lookup table
(attributes pwm1_auto_*) have their own independent lifetime of 5 seconds.

The LM64 is effectively an LM63 with GPIO lines. The driver does not
support these GPIO lines at present.

The LM96163 is an enhanced version of LM63 with improved temperature accuracy
and better PWM resolution. For LM96163, the external temperature sensor type is
configurable as CPU embedded diode(1) or 3904 transistor(2).


code:
Kernel driver lm70
==================

Supported chips:

  * National Semiconductor LM70

    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: https://www.ti.com/product/tmp122

  * Texas Instruments TMP125

    Information: https://www.ti.com/product/tmp125

  * National Semiconductor LM71

    Datasheet: https://www.ti.com/product/LM71

  * National Semiconductor LM74

    Datasheet: https://www.ti.com/product/LM74

Author:
	Kaiwan N Billimoria <kaiwan@designergraphix.com>

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

This driver implements support for the National Semiconductor LM70
temperature sensor.

The LM70 temperature sensor chip supports a single temperature sensor.
It communicates with a host processor (or microcontroller) via an
SPI/Microwire Bus interface.

Communication with the LM70 is simple: when the temperature is to be sensed,
the driver accesses the LM70 using SPI communication: 16 SCLK cycles
comprise the MOSI/MISO loop. At the end of the transfer, the 11-bit 2's
complement digital temperature (sent via the SIO line), is available in the
driver for interpretation. This driver makes use of the kernel's in-core
SPI support.

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/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 TMP125 is less accurate and provides 10-bit temperature data
with 0.25 degrees Celsius resolution.

The LM71 is also very similar; main difference is 14-bit temperature
data (0.03125 degrees celsius resolution).

Thanks to
---------
Jean Delvare <jdelvare@suse.de> for mentoring the hwmon-side driver
development.


code:
Kernel driver lm73
==================

Supported chips:

  * Texas Instruments LM73

    Prefix: 'lm73'

    Addresses scanned: I2C 0x48, 0x49, 0x4a, 0x4c, 0x4d, and 0x4e

    Datasheet: Publicly available at the Texas Instruments website

	       https://www.ti.com/product/lm73

Author: Guillaume Ligneul <guillaume.ligneul@gmail.com>

Documentation: Chris Verges <kg4ysn@gmail.com>

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

The LM73 is a digital temperature sensor.  All temperature values are
given in degrees Celsius.

Measurement Resolution Support
------------------------------

The LM73 supports four resolutions, defined in terms of degrees C per
LSB: 0.25, 0.125, 0.0625, and 0.3125.  Changing the resolution mode
affects the conversion time of the LM73's analog-to-digital converter.
From userspace, the desired resolution can be specified as a function of
conversion time via the 'update_interval' sysfs attribute for the
device.  This attribute will normalize ranges of input values to the
maximum times defined for the resolution in the datasheet.

    ============= ============= ============
    Resolution    Conv. Time    Input Range
    (C/LSB)       (msec)        (msec)
    ============= ============= ============
    0.25          14             0..14
    0.125         28            15..28
    0.0625        56            29..56
    0.03125       112           57..infinity
    ============= ============= ============

The following examples show how the 'update_interval' attribute can be
used to change the conversion time::

    $ echo 0 > update_interval
    $ cat update_interval
    14
    $ cat temp1_input
    24250

    $ echo 22 > update_interval
    $ cat update_interval
    28
    $ cat temp1_input
    24125

    $ echo 56 > update_interval
    $ cat update_interval
    56
    $ cat temp1_input
    24062

    $ echo 85 > update_interval
    $ cat update_interval
    112
    $ cat temp1_input
    24031

As shown here, the lm73 driver automatically adjusts any user input for
'update_interval' via a step function.  Reading back the
'update_interval' value after a write operation will confirm the
conversion time actively in use.

Mathematically, the resolution can be derived from the conversion time
via the following function:

   g(x) = 0.250 * [log(x/14) / log(2)]

where 'x' is the output from 'update_interval' and 'g(x)' is the
resolution in degrees C per LSB.

Alarm Support
-------------

The LM73 features a simple over-temperature alarm mechanism.  This
feature is exposed via the sysfs attributes.

The attributes 'temp1_max_alarm' and 'temp1_min_alarm' are flags
provided by the LM73 that indicate whether the measured temperature has
passed the 'temp1_max' and 'temp1_min' thresholds, respectively.  These
values _must_ be read to clear the registers on the LM73.


code:
Kernel driver lm75
==================

Supported chips:

  * National Semiconductor LM75

    Prefix: 'lm75'

    Addresses scanned: I2C 0x48 - 0x4f

    Datasheet: Publicly available at the National Semiconductor website

	       http://www.national.com/

  * National Semiconductor LM75A

    Prefix: 'lm75a'

    Addresses scanned: I2C 0x48 - 0x4f

    Datasheet: Publicly available at the National Semiconductor website

	       http://www.national.com/

  * Dallas Semiconductor (now Maxim) DS75, DS1775, DS7505

    Prefixes: 'ds75', 'ds1775', 'ds7505'

    Addresses scanned: none

    Datasheet: Publicly available at the Maxim website

	       https://www.maximintegrated.com/

  * Maxim MAX6625, MAX6626, MAX31725, MAX31726

    Prefixes: 'max6625', 'max6626', 'max31725', 'max31726'

    Addresses scanned: none

    Datasheet: Publicly available at the Maxim website

	       http://www.maxim-ic.com/

  * Microchip (TelCom) TCN75

    Prefix: 'tcn75'

    Addresses scanned: none

    Datasheet: Publicly available at the Microchip website

	       http://www.microchip.com/

  * Microchip MCP9800, MCP9801, MCP9802, MCP9803

    Prefix: 'mcp980x'

    Addresses scanned: none

    Datasheet: Publicly available at the Microchip website

	       http://www.microchip.com/

  * Analog Devices ADT75

    Prefix: 'adt75'

    Addresses scanned: none

    Datasheet: Publicly available at the Analog Devices website

	       https://www.analog.com/adt75

  * ST Microelectronics STDS75

    Prefix: 'stds75'

    Addresses scanned: none

    Datasheet: Publicly available at the ST website

	       http://www.st.com/internet/analog/product/121769.jsp

  * ST Microelectronics STLM75

    Prefix: 'stlm75'

    Addresses scanned: none

    Datasheet: Publicly available at the ST website

	       https://www.st.com/resource/en/datasheet/stlm75.pdf

  * Texas Instruments TMP100, TMP101, TMP105, TMP112, TMP75, TMP75B, TMP75C, TMP175, TMP275, TMP1075

    Prefixes: 'tmp100', 'tmp101', 'tmp105', 'tmp112', 'tmp175', 'tmp75', 'tmp75b', 'tmp75c', 'tmp275', 'tmp1075'

    Addresses scanned: none

    Datasheet: Publicly available at the Texas Instruments website

	       https://www.ti.com/product/tmp100

	       https://www.ti.com/product/tmp101

	       https://www.ti.com/product/tmp105

	       https://www.ti.com/product/tmp112

	       https://www.ti.com/product/tmp75

	       https://www.ti.com/product/tmp75b

	       https://www.ti.com/product/tmp75c

	       https://www.ti.com/product/tmp175

	       https://www.ti.com/product/tmp275

         https://www.ti.com/product/TMP1075

  * NXP LM75B, PCT2075

    Prefix: 'lm75b', 'pct2075'

    Addresses scanned: none

    Datasheet: Publicly available at the NXP website

	       https://www.nxp.com/documents/data_sheet/LM75B.pdf

               https://www.nxp.com/docs/en/data-sheet/PCT2075.pdf

Author: Frodo Looijaard <frodol@dds.nl>

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

The LM75 implements one temperature sensor. Limits can be set through the
Overtemperature Shutdown register and Hysteresis register. Each value can be
set and read to half-degree accuracy.
An alarm is issued (usually to a connected LM78) when the temperature
gets higher then the Overtemperature Shutdown value; it stays on until
the temperature falls below the Hysteresis value.
All temperatures are in degrees Celsius, and are guaranteed within a
range of -55 to +125 degrees.

The driver caches the values for a period varying between 1 second for the
slowest chips and 125 ms for the fastest chips; reading it more often
will do no harm, but will return 'old' values.

The original LM75 was typically used in combination with LM78-like chips
on PC motherboards, to measure the temperature of the processor(s). Clones
are now used in various embedded designs.

The LM75 is essentially an industry standard; there may be other
LM75 clones not listed here, with or without various enhancements,
that are supported. The clones are not detected by the driver, unless
they reproduce the exact register tricks of the original LM75, and must
therefore be instantiated explicitly. Higher resolution up to 16-bit
is supported by this driver, other specific enhancements are not.

The LM77 is not supported, contrary to what we pretended for a long time.
Both chips are simply not compatible, value encoding differs.


code:
Kernel driver lm77
==================

Supported chips:

  * National Semiconductor LM77

    Prefix: 'lm77'

    Addresses scanned: I2C 0x48 - 0x4b

    Datasheet: Publicly available at the National Semiconductor website

	       http://www.national.com/

Author: Andras BALI <drewie@freemail.hu>

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

The LM77 implements one temperature sensor. The temperature
sensor incorporates a band-gap type temperature sensor,
10-bit ADC, and a digital comparator with user-programmable upper
and lower limit values.

The LM77 implements 3 limits: low (temp1_min), high (temp1_max) and
critical (temp1_crit.) It also implements an hysteresis mechanism which
applies to all 3 limits. The relative difference is stored in a single
register on the chip, which means that the relative difference between
the limit and its hysteresis is always the same for all 3 limits.

This implementation detail implies the following:

* When setting a limit, its hysteresis will automatically follow, the
  difference staying unchanged. For example, if the old critical limit
  was 80 degrees C, and the hysteresis was 75 degrees C, and you change
  the critical limit to 90 degrees C, then the hysteresis will
  automatically change to 85 degrees C.
* All 3 hysteresis can't be set independently. We decided to make
  temp1_crit_hyst writable, while temp1_min_hyst and temp1_max_hyst are
  read-only. Setting temp1_crit_hyst writes the difference between
  temp1_crit_hyst and temp1_crit into the chip, and the same relative
  hysteresis applies automatically to the low and high limits.
* The limits should be set before the hysteresis.


code:
Kernel driver lm78
==================

Supported chips:

  * National Semiconductor LM78 / LM78-J

    Prefix: 'lm78'

    Addresses scanned: I2C 0x28 - 0x2f, ISA 0x290 (8 I/O ports)

    Datasheet: Publicly available at the National Semiconductor website

	       http://www.national.com/

  * National Semiconductor LM79

    Prefix: 'lm79'

    Addresses scanned: I2C 0x28 - 0x2f, ISA 0x290 (8 I/O ports)

    Datasheet: Publicly available at the National Semiconductor website

	       http://www.national.com/

Authors:
	- Frodo Looijaard <frodol@dds.nl>
	- Jean Delvare <jdelvare@suse.de>

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

This driver implements support for the National Semiconductor LM78, LM78-J
and LM79. They are described as 'Microprocessor System Hardware Monitors'.

There is almost no difference between the three supported chips. Functionally,
the LM78 and LM78-J are exactly identical. The LM79 has one more VID line,
which is used to report the lower voltages newer Pentium processors use.
From here on, LM7* means either of these three types.

The LM7* implements one temperature sensor, three fan rotation speed sensors,
seven voltage sensors, VID lines, alarms, and some miscellaneous stuff.

Temperatures are measured in degrees Celsius. An alarm is triggered once
when the Overtemperature Shutdown limit is crossed; it is triggered again
as soon as it drops below the Hysteresis value. A more useful behavior
can be found by setting the Hysteresis value to +127 degrees Celsius; in
this case, alarms are issued during all the time when the actual temperature
is above the Overtemperature Shutdown value. Measurements are guaranteed
between -55 and +125 degrees, with a resolution of 1 degree.

Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
triggered if the rotation speed has dropped below a programmable limit. Fan
readings can be divided by a programmable divider (1, 2, 4 or 8) to give
the readings more range or accuracy. Not all RPM values can accurately be
represented, so some rounding is done. With a divider of 2, the lowest
representable value is around 2600 RPM.

Voltage sensors (also known as IN sensors) report their values in volts.
An alarm is triggered if the voltage has crossed a programmable minimum
or maximum limit. Note that minimum in this case always means 'closest to
zero'; this is important for negative voltage measurements. All voltage
inputs can measure voltages between 0 and 4.08 volts, with a resolution
of 0.016 volt.

The VID lines encode the core voltage value: the voltage level your processor
should work with. This is hardcoded by the mainboard and/or processor itself.
It is a value in volts. When it is unconnected, you will often find the
value 3.50 V here.

If an alarm triggers, it will remain triggered until the hardware register
is read at least once. This means that the cause for the alarm may
already have disappeared! Note that in the current implementation, all
hardware registers are read whenever any data is read (unless it is less
than 1.5 seconds since the last update). This means that you can easily
miss once-only alarms.

The LM7* only updates its values each 1.5 seconds; reading it more often
will do no harm, but will return 'old' values.


code:
Kernel driver lm80
==================

Supported chips:

  * National Semiconductor LM80

    Prefix: 'lm80'

    Addresses scanned: I2C 0x28 - 0x2f

    Datasheet: Publicly available at the National Semiconductor website

	       http://www.national.com/

  * National Semiconductor LM96080

    Prefix: 'lm96080'

    Addresses scanned: I2C 0x28 - 0x2f

    Datasheet: Publicly available at the National Semiconductor website

	       http://www.national.com/

Authors:
       - Frodo Looijaard <frodol@dds.nl>,
       - Philip Edelbrock <phil@netroedge.com>

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

This driver implements support for the National Semiconductor LM80.
It is described as a 'Serial Interface ACPI-Compatible Microprocessor
System Hardware Monitor'. The LM96080 is a more recent incarnation,
it is pin and register compatible, with a few additional features not
yet supported by the driver.

The LM80 implements one temperature sensor, two fan rotation speed sensors,
seven voltage sensors, alarms, and some miscellaneous stuff.

Temperatures are measured in degrees Celsius. There are two sets of limits
which operate independently. When the HOT Temperature Limit is crossed,
this will cause an alarm that will be reasserted until the temperature
drops below the HOT Hysteresis. The Overtemperature Shutdown (OS) limits
should work in the same way (but this must be checked; the datasheet
is unclear about this). Measurements are guaranteed between -55 and
+125 degrees. The current temperature measurement has a resolution of
0.0625 degrees; the limits have a resolution of 1 degree.

Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
triggered if the rotation speed has dropped below a programmable limit. Fan
readings can be divided by a programmable divider (1, 2, 4 or 8) to give
the readings more range or accuracy. Not all RPM values can accurately be
represented, so some rounding is done. With a divider of 2, the lowest
representable value is around 2600 RPM.

Voltage sensors (also known as IN sensors) report their values in volts.
An alarm is triggered if the voltage has crossed a programmable minimum
or maximum limit. Note that minimum in this case always means 'closest to
zero'; this is important for negative voltage measurements. All voltage
inputs can measure voltages between 0 and 2.55 volts, with a resolution
of 0.01 volt.

If an alarm triggers, it will remain triggered until the hardware register
is read at least once. This means that the cause for the alarm may
already have disappeared! Note that in the current implementation, all
hardware registers are read whenever any data is read (unless it is less
than 2.0 seconds since the last update). This means that you can easily
miss once-only alarms.

The LM80 only updates its values each 1.5 seconds; reading it more often
will do no harm, but will return 'old' values.


code:
Kernel driver lm83
==================

Supported chips:

  * National Semiconductor LM83

    Prefix: 'lm83'

    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e

    Datasheet: Publicly available at the National Semiconductor website

	       http://www.national.com/pf/LM/LM83.html

  * National Semiconductor LM82

    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e

    Datasheet: Publicly available at the National Semiconductor website

	       http://www.national.com/pf/LM/LM82.html

Author: Jean Delvare <jdelvare@suse.de>

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

The LM83 is a digital temperature sensor. It senses its own temperature as
well as the temperature of up to three external diodes. The LM82 is
a stripped down version of the LM83 that only supports one external diode.
Both are compatible with many other devices such as the LM84 and all
other ADM1021 clones. The main difference between the LM83 and the LM84
in that the later can only sense the temperature of one external diode.

Using the adm1021 driver for a LM83 should work, but only two temperatures
will be reported instead of four.

The LM83 is only found on a handful of motherboards. Both a confirmed
list and an unconfirmed list follow. If you can confirm or infirm the
fact that any of these motherboards do actually have an LM83, please
contact us. Note that the LM90 can easily be misdetected as a LM83.

Confirmed motherboards:
    ===		=====
    SBS         P014
    SBS         PSL09
    ===		=====

Unconfirmed motherboards:
    =========== ==========
    Gigabyte    GA-8IK1100
    Iwill       MPX2
    Soltek      SL-75DRV5
    =========== ==========

The LM82 is confirmed to have been found on most AMD Geode reference
designs and test platforms.

The driver has been successfully tested by Magnus Forsström, who I'd
like to thank here. More testers will be of course welcome.

The fact that the LM83 is only scarcely used can be easily explained.
Most motherboards come with more than just temperature sensors for
health monitoring. They also have voltage and fan rotation speed
sensors. This means that temperature-only chips are usually used as
secondary chips coupled with another chip such as an IT8705F or similar
chip, which provides more features. Since systems usually need three
temperature sensors (motherboard, processor, power supply) and primary
chips provide some temperature sensors, the secondary chip, if needed,
won't have to handle more than two temperatures. Thus, ADM1021 clones
are sufficient, and there is no need for a four temperatures sensor
chip such as the LM83. The only case where using an LM83 would make
sense is on SMP systems, such as the above-mentioned Iwill MPX2,
because you want an additional temperature sensor for each additional
CPU.

On the SBS P014, this is different, since the LM83 is the only hardware
monitoring chipset. One temperature sensor is used for the motherboard
(actually measuring the LM83's own temperature), one is used for the
CPU. The two other sensors must be used to measure the temperature of
two other points of the motherboard. We suspect these points to be the
north and south bridges, but this couldn't be confirmed.

All temperature values are given in degrees Celsius. Local temperature
is given within a range of 0 to +85 degrees. Remote temperatures are
given within a range of 0 to +125 degrees. Resolution is 1.0 degree,
accuracy is guaranteed to 3.0 degrees (see the datasheet for more
details).

Each sensor has its own high limit, but the critical limit is common to
all four sensors. There is no hysteresis mechanism as found on most
recent temperature sensors.

The lm83 driver will not update its values more frequently than every
other second; reading them more often will do no harm, but will return
'old' values.


code:
Kernel driver lm85
==================

Supported chips:

  * National Semiconductor LM85 (B and C versions)

    Prefix: 'lm85b' or 'lm85c'

    Addresses scanned: I2C 0x2c, 0x2d, 0x2e

    Datasheet: http://www.national.com/pf/LM/LM85.html

  * Texas Instruments LM96000

    Prefix: 'lm9600'

    Addresses scanned: I2C 0x2c, 0x2d, 0x2e

    Datasheet: https://www.ti.com/lit/ds/symlink/lm96000.pdf

  * Analog Devices ADM1027

    Prefix: 'adm1027'

    Addresses scanned: I2C 0x2c, 0x2d, 0x2e

    Datasheet: https://www.onsemi.com/PowerSolutions/product.do?id=ADM1027

  * Analog Devices ADT7463

    Prefix: 'adt7463'

    Addresses scanned: I2C 0x2c, 0x2d, 0x2e

    Datasheet: https://www.onsemi.com/PowerSolutions/product.do?id=ADT7463

  * Analog Devices ADT7468

    Prefix: 'adt7468'

    Addresses scanned: I2C 0x2c, 0x2d, 0x2e

    Datasheet: https://www.onsemi.com/PowerSolutions/product.do?id=ADT7468

  * SMSC EMC6D100, SMSC EMC6D101

    Prefix: 'emc6d100'

    Addresses scanned: I2C 0x2c, 0x2d, 0x2e

    Datasheet: http://www.smsc.com/media/Downloads_Public/discontinued/6d100.pdf

  * SMSC EMC6D102

    Prefix: 'emc6d102'

    Addresses scanned: I2C 0x2c, 0x2d, 0x2e

    Datasheet: http://www.smsc.com/main/catalog/emc6d102.html

  * SMSC EMC6D103

    Prefix: 'emc6d103'

    Addresses scanned: I2C 0x2c, 0x2d, 0x2e

    Datasheet: http://www.smsc.com/main/catalog/emc6d103.html

  * SMSC EMC6D103S

    Prefix: 'emc6d103s'

    Addresses scanned: I2C 0x2c, 0x2d, 0x2e

    Datasheet: http://www.smsc.com/main/catalog/emc6d103s.html

Authors:
       - Philip Pokorny <ppokorny@penguincomputing.com>,
       - Frodo Looijaard <frodol@dds.nl>,
       - Richard Barrington <rich_b_nz@clear.net.nz>,
       - Margit Schubert-While <margitsw@t-online.de>,
       - Justin Thiessen <jthiessen@penguincomputing.com>

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

This driver implements support for the National Semiconductor LM85 and
compatible chips including the Analog Devices ADM1027, ADT7463, ADT7468 and
SMSC EMC6D10x chips family.

The LM85 uses the 2-wire interface compatible with the SMBUS 2.0
specification. Using an analog to digital converter it measures three (3)
temperatures and five (5) voltages. It has four (4) 16-bit counters for
measuring fan speed. Five (5) digital inputs are provided for sampling the
VID signals from the processor to the VRM. Lastly, there are three (3) PWM
outputs that can be used to control fan speed.

The voltage inputs have internal scaling resistors so that the following
voltage can be measured without external resistors:

  2.5V, 3.3V, 5V, 12V, and CPU core voltage (2.25V)

The temperatures measured are one internal diode, and two remote diodes.
Remote 1 is generally the CPU temperature. These inputs are designed to
measure a thermal diode like the one in a Pentium 4 processor in a socket
423 or socket 478 package. They can also measure temperature using a
transistor like the 2N3904.

A sophisticated control system for the PWM outputs is designed into the
LM85 that allows fan speed to be adjusted automatically based on any of the
three temperature sensors. Each PWM output is individually adjustable and
programmable. Once configured, the LM85 will adjust the PWM outputs in
response to the measured temperatures without further host intervention.
This feature can also be disabled for manual control of the PWM's.

Each of the measured inputs (voltage, temperature, fan speed) has
corresponding high/low limit values. The LM85 will signal an ALARM if any
measured value exceeds either limit.

The LM85 samples all inputs continuously. The lm85 driver will not read
the registers more often than once a second. Further, configuration data is
only read once each 5 minutes. There is twice as much config data as
measurements, so this would seem to be a worthwhile optimization.

Special Features
----------------

The LM85 has four fan speed monitoring modes. The ADM1027 has only two.
Both have special circuitry to compensate for PWM interactions with the
TACH signal from the fans. The ADM1027 can be configured to measure the
speed of a two wire fan, but the input conditioning circuitry is different
for 3-wire and 2-wire mode. For this reason, the 2-wire fan modes are not
exposed to user control. The BIOS should initialize them to the correct
mode. If you've designed your own ADM1027, you'll have to modify the
init_client function and add an insmod parameter to set this up.

To smooth the response of fans to changes in temperature, the LM85 has an
optional filter for smoothing temperatures. The ADM1027 has the same
config option but uses it to rate limit the changes to fan speed instead.

The ADM1027, ADT7463 and ADT7468 have a 10-bit ADC and can therefore
measure temperatures with 0.25 degC resolution. They also provide an offset
to the temperature readings that is automatically applied during
measurement. This offset can be used to zero out any errors due to traces
and placement. The documentation says that the offset is in 0.25 degC
steps, but in initial testing of the ADM1027 it was 1.00 degC steps. Analog
Devices has confirmed this "bug". The ADT7463 is reported to work as
described in the documentation. The current lm85 driver does not show the
offset register.

The ADT7468 has a high-frequency PWM mode, where all PWM outputs are
driven by a 22.5 kHz clock. This is a global mode, not per-PWM output,
which means that setting any PWM frequency above 11.3 kHz will switch
all 3 PWM outputs to a 22.5 kHz frequency. Conversely, setting any PWM
frequency below 11.3 kHz will switch all 3 PWM outputs to a frequency
between 10 and 100 Hz, which can then be tuned separately.

See the vendor datasheets for more information. There is application note
from National (AN-1260) with some additional information about the LM85.
The Analog Devices datasheet is very detailed and describes a procedure for
determining an optimal configuration for the automatic PWM control.

The SMSC EMC6D100 & EMC6D101 monitor external voltages, temperatures, and
fan speeds. They use this monitoring capability to alert the system to out
of limit conditions and can automatically control the speeds of multiple
fans in a PC or embedded system. The EMC6D101, available in a 24-pin SSOP
package, and the EMC6D100, available in a 28-pin SSOP package, are designed
to be register compatible. The EMC6D100 offers all the features of the
EMC6D101 plus additional voltage monitoring and system control features.
Unfortunately it is not possible to distinguish between the package
versions on register level so these additional voltage inputs may read
zero. EMC6D102 and EMC6D103 feature additional ADC bits thus extending precision
of voltage and temperature channels.

SMSC EMC6D103S is similar to EMC6D103, but does not support pwm#_auto_pwm_minctl
and temp#_auto_temp_off.

The LM96000 supports additional high frequency PWM modes (22.5 kHz, 24 kHz,
25.7 kHz, 27.7 kHz and 30 kHz), which can be configured on a per-PWM basis.

Hardware Configurations
-----------------------

The LM85 can be jumpered for 3 different SMBus addresses. There are
no other hardware configuration options for the LM85.

The lm85 driver detects both LM85B and LM85C revisions of the chip. See the
datasheet for a complete description of the differences. Other than
identifying the chip, the driver behaves no differently with regard to
these two chips. The LM85B is recommended for new designs.

The ADM1027, ADT7463 and ADT7468 chips have an optional SMBALERT output
that can be used to signal the chipset in case a limit is exceeded or the
temperature sensors fail. Individual sensor interrupts can be masked so
they won't trigger SMBALERT. The SMBALERT output if configured replaces one
of the other functions (PWM2 or IN0). This functionality is not implemented
in current driver.

The ADT7463 and ADT7468 also have an optional THERM output/input which can
be connected to the processor PROC_HOT output. If available, the autofan
control dynamic Tmin feature can be enabled to keep the system temperature
within spec (just?!) with the least possible fan noise.

Configuration Notes
-------------------

Besides standard interfaces driver adds following:

* Temperatures and Zones

Each temperature sensor is associated with a Zone. There are three
sensors and therefore three zones (# 1, 2 and 3). Each zone has the following
temperature configuration points:

* temp#_auto_temp_off
	- temperature below which fans should be off or spinning very low.
* temp#_auto_temp_min
	- temperature over which fans start to spin.
* temp#_auto_temp_max
	- temperature when fans spin at full speed.
* temp#_auto_temp_crit
	- temperature when all fans will run full speed.

PWM Control
^^^^^^^^^^^

There are three PWM outputs. The LM85 datasheet suggests that the
pwm3 output control both fan3 and fan4. Each PWM can be individually
configured and assigned to a zone for its control value. Each PWM can be
configured individually according to the following options.

* pwm#_auto_pwm_min
	- this specifies the PWM value for temp#_auto_temp_off
	  temperature. (PWM value from 0 to 255)

* pwm#_auto_pwm_minctl
	- this flags selects for temp#_auto_temp_off temperature
	  the behaviour of fans. Write 1 to let fans spinning at
	  pwm#_auto_pwm_min or write 0 to let them off.

.. note::

	It has been reported that there is a bug in the LM85 that causes
	the flag to be associated with the zones not the PWMs. This
	contradicts all the published documentation. Setting pwm#_min_ctl
	in this case actually affects all PWMs controlled by zone '#'.

PWM Controlling Zone selection
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

* pwm#_auto_channels
	- controls zone that is associated with PWM

Configuration choices:

========== =============================================
Value      Meaning
========== =============================================
      1    Controlled by Zone 1
      2    Controlled by Zone 2
      3    Controlled by Zone 3
     23    Controlled by higher temp of Zone 2 or 3
    123    Controlled by highest temp of Zone 1, 2 or 3
      0    PWM always 0%  (off)
     -1    PWM always 100%  (full on)
     -2    Manual control (write to 'pwm#' to set)
========== =============================================

The National LM85's have two vendor specific configuration
features. Tach. mode and Spinup Control. For more details on these,
see the LM85 datasheet or Application Note AN-1260. These features
are not currently supported by the lm85 driver.

The Analog Devices ADM1027 has several vendor specific enhancements.
The number of pulses-per-rev of the fans can be set, Tach monitoring
can be optimized for PWM operation, and an offset can be applied to
the temperatures to compensate for systemic errors in the
measurements. These features are not currently supported by the lm85
driver.

In addition to the ADM1027 features, the ADT7463 and ADT7468 also have
Tmin control and THERM asserted counts. Automatic Tmin control acts to
adjust the Tmin value to maintain the measured temperature sensor at a
specified temperature. There isn't much documentation on this feature in
the ADT7463 data sheet. This is not supported by current driver.


code:
Kernel driver lm87
==================

Supported chips:

  * National Semiconductor LM87

    Prefix: 'lm87'

    Addresses scanned: I2C 0x2c - 0x2e

    Datasheet: http://www.national.com/pf/LM/LM87.html

  * Analog Devices ADM1024

    Prefix: 'adm1024'

    Addresses scanned: I2C 0x2c - 0x2e

    Datasheet: https://www.analog.com/en/prod/0,2877,ADM1024,00.html

Authors:
	- Frodo Looijaard <frodol@dds.nl>,
	- Philip Edelbrock <phil@netroedge.com>,
	- Mark Studebaker <mdsxyz123@yahoo.com>,
	- Stephen Rousset <stephen.rousset@rocketlogix.com>,
	- Dan Eaton <dan.eaton@rocketlogix.com>,
	- Jean Delvare <jdelvare@suse.de>,
	- Original 2.6 port Jeff Oliver

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

This driver implements support for the National Semiconductor LM87
and the Analog Devices ADM1024.

The LM87 implements up to three temperature sensors, up to two fan
rotation speed sensors, up to seven voltage sensors, alarms, and some
miscellaneous stuff. The ADM1024 is fully compatible.

Temperatures are measured in degrees Celsius. Each input has a high
and low alarm settings. A high limit produces an alarm when the value
goes above it, and an alarm is also produced when the value goes below
the low limit.

Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
triggered if the rotation speed has dropped below a programmable limit. Fan
readings can be divided by a programmable divider (1, 2, 4 or 8) to give
the readings more range or accuracy. Not all RPM values can accurately be
represented, so some rounding is done. With a divider of 2, the lowest
representable value is around 2600 RPM.

Voltage sensors (also known as IN sensors) report their values in
volts. An alarm is triggered if the voltage has crossed a programmable
minimum or maximum limit. Note that minimum in this case always means
'closest to zero'; this is important for negative voltage measurements.

If an alarm triggers, it will remain triggered until the hardware register
is read at least once. This means that the cause for the alarm may
already have disappeared! Note that in the current implementation, all
hardware registers are read whenever any data is read (unless it is less
than 1.0 seconds since the last update). This means that you can easily
miss once-only alarms.

The lm87 driver only updates its values each 1.0 seconds; reading it more
often will do no harm, but will return 'old' values.

Hardware Configurations
-----------------------

The LM87 has four pins which can serve one of two possible functions,
depending on the hardware configuration.

Some functions share pins, so not all functions are available at the same
time. Which are depends on the hardware setup. This driver normally
assumes that firmware configured the chip correctly. Where this is not
the case, platform code must set the I2C client's platform_data to point
to a u8 value to be written to the channel register.

For reference, here is the list of exclusive functions:
 - in0+in5 (default) or temp3
 - fan1 (default) or in6
 - fan2 (default) or in7
 - VID lines (default) or IRQ lines (not handled by this driver)


code:
Kernel driver lm90
==================

Supported chips:

  * National Semiconductor LM84

    Prefix: 'lm84'

    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e

    Datasheet: Publicly available at the National Semiconductor website

  * National Semiconductor LM90

    Prefix: 'lm90'

    Addresses scanned: I2C 0x4c

    Datasheet: Publicly available at the National Semiconductor website

	       http://www.national.com/pf/LM/LM90.html

  * National Semiconductor LM89

    Prefix: 'lm89' (no auto-detection)

    Addresses scanned: I2C 0x4c and 0x4d

    Datasheet: Publicly available at the National Semiconductor website

	       http://www.national.com/mpf/LM/LM89.html

  * National Semiconductor LM99

    Prefix: 'lm99'

    Addresses scanned: I2C 0x4c and 0x4d

    Datasheet: Publicly available at the National Semiconductor website

	       http://www.national.com/pf/LM/LM99.html

  * National Semiconductor LM86

    Prefix: 'lm86'

    Addresses scanned: I2C 0x4c

    Datasheet: Publicly available at the National Semiconductor website

	       http://www.national.com/mpf/LM/LM86.html

  * Analog Devices ADM1020

    Prefix: 'adm1020'

    Addresses scanned: I2C 0x4c - 0x4e

    Datasheet: Publicly available at the Analog Devices website

  * Analog Devices ADM1021

    Prefix: 'adm1021'

    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e

    Datasheet: Publicly available at the Analog Devices website

  * Analog Devices ADM1021A/ADM1023

    Prefix: 'adm1023'

    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e

    Datasheet: Publicly available at the Analog Devices website

  * Analog Devices ADM1032

    Prefix: 'adm1032'

    Addresses scanned: I2C 0x4c and 0x4d

    Datasheet: Publicly available at the ON Semiconductor website

	       https://www.onsemi.com/PowerSolutions/product.do?id=ADM1032

  * Analog Devices ADT7461

    Prefix: 'adt7461'

    Addresses scanned: I2C 0x4c and 0x4d

    Datasheet: Publicly available at the ON Semiconductor website

	       https://www.onsemi.com/PowerSolutions/product.do?id=ADT7461

  * Analog Devices ADT7461A

    Prefix: 'adt7461a'

    Addresses scanned: I2C 0x4c and 0x4d

    Datasheet: Publicly available at the ON Semiconductor website

	       https://www.onsemi.com/PowerSolutions/product.do?id=ADT7461A

  * Analog Devices ADT7481

    Prefix: 'adt7481'

    Addresses scanned: I2C 0x4b and 0x4c

    Datasheet: Publicly available at the ON Semiconductor website

	       https://www.onsemi.com/PowerSolutions/product.do?id=ADT7481

  * Analog Devices ADT7482

    Prefix: 'adt7482'

    Addresses scanned: I2C 0x4c

    Datasheet: Publicly available at the ON Semiconductor website

	       https://www.onsemi.com/PowerSolutions/product.do?id=ADT7482

  * Analog Devices ADT7483A

    Prefix: 'adt7483a'

    Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, 0x4c, 0x4d, 0x4e

    Datasheet: Publicly available at the ON Semiconductor website

	       https://www.onsemi.com/PowerSolutions/product.do?id=ADT7483A

  * ON Semiconductor NCT1008

    Prefix: 'nct1008'

    Addresses scanned: I2C 0x4c and 0x4d

    Datasheet: Publicly available at the ON Semiconductor website

	       https://www.onsemi.com/PowerSolutions/product.do?id=NCT1008

  * ON Semiconductor NCT210

    Prefix: 'adm1021'

    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e

    Datasheet: Publicly available at the ON Semiconductor website

	       https://www.onsemi.com/PowerSolutions/product.do?id=NCT210

  * ON Semiconductor NCT214

    Prefix: 'nct214'

    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e

    Datasheet: Publicly available at the ON Semiconductor website

	       https://www.onsemi.com/PowerSolutions/product.do?id=NCT214

  * ON Semiconductor NCT218

    Prefix: 'nct218'

    Addresses scanned: I2C 0x4c - 0x4d

    Datasheet: Publicly available at the ON Semiconductor website

	       https://www.onsemi.com/PowerSolutions/product.do?id=NCT218

  * ON Semiconductor NCT72

    Prefix: 'nct72'

    Addresses scanned: I2C 0x4c - 0x4d

    Datasheet: Publicly available at the ON Semiconductor website

	       https://www.onsemi.com/PowerSolutions/product.do?id=NCT72

  * Maxim MAX1617

    Prefix: 'max1617'

    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e

    Datasheet: Publicly available at the Maxim website

  * Maxim MAX1617A

    Prefix: 'max1617a'

    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e

    Datasheet: Publicly available at the Maxim website

  * Maxim MAX6642

    Prefix: 'max6642'

    Addresses scanned: I2C 0x48-0x4f

    Datasheet: Publicly available at the Maxim website

	       http://datasheets.maxim-ic.com/en/ds/MAX6642.pdf

  * Maxim MAX6646

    Prefix: 'max6646'

    Addresses scanned: I2C 0x4d

    Datasheet: Publicly available at the Maxim website

	       http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497

  * Maxim MAX6647

    Prefix: 'max6646'

    Addresses scanned: I2C 0x4e

    Datasheet: Publicly available at the Maxim website

	       http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497

  * Maxim MAX6648

    Prefix: 'max6648'

    Addresses scanned: I2C 0x4c

    Datasheet: Publicly available at the Maxim website

	       http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500

  * Maxim MAX6649

    Prefix: 'max6646'

    Addresses scanned: I2C 0x4c

    Datasheet: Publicly available at the Maxim website

	       http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497

  * Maxim MAX6654

    Prefix: 'max6654'

    Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,

			   0x4c, 0x4d and 0x4e

    Datasheet: Publicly available at the Maxim website

	       https://www.maximintegrated.com/en/products/sensors/MAX6654.html

  * Maxim MAX6657

    Prefix: 'max6657'

    Addresses scanned: I2C 0x4c

    Datasheet: Publicly available at the Maxim website

	       http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578

  * Maxim MAX6658

    Prefix: 'max6657'

    Addresses scanned: I2C 0x4c

    Datasheet: Publicly available at the Maxim website

	       http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578

  * Maxim MAX6659

    Prefix: 'max6659'

    Addresses scanned: I2C 0x4c, 0x4d, 0x4e

    Datasheet: Publicly available at the Maxim website

	       http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578

  * Maxim MAX6680

    Prefix: 'max6680'

    Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,

			   0x4c, 0x4d and 0x4e

    Datasheet: Publicly available at the Maxim website

	       http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3370

  * Maxim MAX6681

    Prefix: 'max6680'

    Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,

			   0x4c, 0x4d and 0x4e

    Datasheet: Publicly available at the Maxim website

	       http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3370

  * Maxim MAX6692

    Prefix: 'max6648'

    Addresses scanned: I2C 0x4c

    Datasheet: Publicly available at the Maxim website

	       http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500

  * Maxim MAX6695

    Prefix: 'max6695'

    Addresses scanned: I2C 0x18

    Datasheet: Publicly available at the Maxim website

	       http://www.maxim-ic.com/datasheet/index.mvp/id/4199

  * Maxim MAX6696

    Prefix: 'max6695'

    Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,

			   0x4c, 0x4d and 0x4e

    Datasheet: Publicly available at the Maxim website

	       http://www.maxim-ic.com/datasheet/index.mvp/id/4199

  * Winbond/Nuvoton W83L771W/G

    Prefix: 'w83l771'

    Addresses scanned: I2C 0x4c

    Datasheet: No longer available

  * Winbond/Nuvoton W83L771AWG/ASG

    Prefix: 'w83l771'

    Addresses scanned: I2C 0x4c

    Datasheet: Not publicly available, can be requested from Nuvoton

  * Philips/NXP SA56004X

    Prefix: 'sa56004'

    Addresses scanned: I2C 0x48 through 0x4F

    Datasheet: Publicly available at NXP website

	       http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf

  * GMT G781

    Prefix: 'g781'

    Addresses scanned: I2C 0x4c, 0x4d

    Datasheet: Not publicly available from GMT

  * Texas Instruments TMP451

    Prefix: 'tmp451'

    Addresses scanned: I2C 0x4c

    Datasheet: Publicly available at TI website

	       https://www.ti.com/litv/pdf/sbos686

  * Texas Instruments TMP461

    Prefix: 'tmp461'

    Addresses scanned: I2C 0x48 through 0x4F

    Datasheet: Publicly available at TI website

	       https://www.ti.com/lit/gpn/tmp461

  * Philips NE1617, NE1617A

    Prefix: 'max1617' (probably detected as a max1617)

    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e

    Datasheets: Publicly available at the Philips website

  * Philips NE1618

    Prefix: 'ne1618'

    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e

    Datasheets: Publicly available at the Philips website

  * Genesys Logic GL523SM

    Prefix: 'gl523sm'

    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e

    Datasheet:

  * TI THMC10

    Prefix: 'thmc10'

    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e

    Datasheet: Publicly available at the TI website

  * Onsemi MC1066

    Prefix: 'mc1066'

    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e

    Datasheet: Publicly available at the Onsemi website

Author: Jean Delvare <jdelvare@suse.de>

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

The LM90 is a digital temperature sensor. It senses its own temperature as
well as the temperature of up to one external diode. It is compatible
with many other devices, many of which are supported by this driver.

The family of chips supported by this driver is derived from MAX1617.
This chip as well as various compatible chips support a local and a remote
temperature sensor with 8 bit accuracy. Later chips provide improved accuracy
and other additional features such as hysteresis and temperature offset
registers.

Note that there is no easy way to differentiate between the MAX6657,
MAX6658 and MAX6659 variants. The extra features of the MAX6659 are only
supported by this driver if the chip is located at address 0x4d or 0x4e,
or if the chip type is explicitly selected as max6659.
The MAX6680 and MAX6681 only differ in their pinout, therefore they obviously
can't (and don't need to) be distinguished.

The different chipsets of the family are not strictly identical, although
very similar. For reference, here comes a non-exhaustive list of specific
features:

LM84:
  * 8 bit sensor resolution

ADM1020, ADM1021, GL523SM, MAX1617, NE1617, NE1617A, THMC10:
  * 8 bit sensor resolution
  * Low temperature limits

NCT210, NE1618:
  * 11 bit sensor resolution for remote temperature sensor
  * Low temperature limits

ADM1021A, ADM1023:
  * Temperature offset register for remote temperature sensor
  * 11 bit resolution for remote temperature sensor
  * Low temperature limits

LM90:
  * 11 bit resolution for remote temperature sensor
  * Temperature offset register for remote temperature sensor
  * Low and critical temperature limits
  * Configurable conversion rate
  * Filter and alert configuration register at 0xBF.
  * ALERT is triggered by temperatures over critical limits.

LM86 and LM89:
  * Same as LM90
  * Better external channel accuracy

LM99:
  * Same as LM89
  * External temperature shifted by 16 degrees down

ADM1032:
  * Consecutive alert register at 0x22.
  * Conversion averaging.
  * Up to 64 conversions/s.
  * ALERT is triggered by open remote sensor.
  * SMBus PEC support for Write Byte and Receive Byte transactions.

ADT7461, ADT7461A, NCT1008:
  * Extended temperature range (breaks compatibility)
  * Lower resolution for remote temperature
  * SMBus PEC support for Write Byte and Receive Byte transactions.
  * 10 bit temperature resolution

ADT7481, ADT7482, ADT7483:
  * Temperature offset register
  * SMBus PEC support
  * 10 bit temperature resolution for external sensors
  * Two remote sensors
  * Selectable address (ADT7483)

MAX6642:
  * No critical limit register
  * Conversion rate not configurable
  * Better local resolution (10 bit)
  * 10 bit external sensor resolution

MAX6646, MAX6647, MAX6649:
  * Better local resolution
  * Extended range unsigned external temperature

MAX6648, MAX6692:
  * Better local resolution
  * Unsigned temperature

MAX6654, MAX6690:
  * Better local resolution
  * Selectable address
  * Remote sensor type selection
  * Extended temperature range
  * Extended resolution only available when conversion rate <= 1 Hz

MAX6657 and MAX6658:
  * Better local resolution
  * Remote sensor type selection

MAX6659:
  * Better local resolution
  * Selectable address
  * Second critical temperature limit
  * Remote sensor type selection

MAX6680 and MAX6681:
  * Selectable address
  * Remote sensor type selection

MAX6695 and MAX6696:
  * Better local resolution
  * Selectable address (max6696)
  * Second critical temperature limit
  * Two remote sensors

W83L771W/G
  * The G variant is lead-free, otherwise similar to the W.
  * Filter and alert configuration register at 0xBF
  * Moving average (depending on conversion rate)

W83L771AWG/ASG
  * Successor of the W83L771W/G, same features.
  * The AWG and ASG variants only differ in package format.
  * Diode ideality factor configuration (remote sensor) at 0xE3

SA56004X:
  * Better local resolution

All temperature values are given in degrees Celsius. Resolution
is 1.0 degree for the local temperature, 0.125 degree for the remote
temperature, except for the MAX6654, MAX6657, MAX6658 and MAX6659 which have
a resolution of 0.125 degree for both temperatures.

Each sensor has its own high and low limits, plus a critical limit.
Additionally, there is a relative hysteresis value common to both critical
values. To make life easier to user-space applications, two absolute values
are exported, one for each channel, but these values are of course linked.
Only the local hysteresis can be set from user-space, and the same delta
applies to the remote hysteresis.

The lm90 driver will not update its values more frequently than configured with
the update_interval attribute; reading them more often will do no harm, but will
return 'old' values.

SMBus Alert Support
-------------------

This driver has basic support for SMBus alert. When an alert is received,
the status register is read and the faulty temperature channel is logged.

The Analog Devices chips (ADM1032, ADT7461 and ADT7461A) and ON
Semiconductor chips (NCT1008) do not implement the SMBus alert protocol
properly so additional care is needed: the ALERT output is disabled when
an alert is received, and is re-enabled only when the alarm is gone.
Otherwise the chip would block alerts from other chips in the bus as long
as the alarm is active.

PEC Support
-----------

The ADM1032 is the only chip of the family which supports PEC. It does
not support PEC on all transactions though, so some care must be taken.

When reading a register value, the PEC byte is computed and sent by the
ADM1032 chip. However, in the case of a combined transaction (SMBus Read
Byte), the ADM1032 computes the CRC value over only the second half of
the message rather than its entirety, because it thinks the first half
of the message belongs to a different transaction. As a result, the CRC
value differs from what the SMBus master expects, and all reads fail.

For this reason, the lm90 driver will enable PEC for the ADM1032 only if
the bus supports the SMBus Send Byte and Receive Byte transaction types.
These transactions will be used to read register values, instead of
SMBus Read Byte, and PEC will work properly.

Additionally, the ADM1032 doesn't support SMBus Send Byte with PEC.
Instead, it will try to write the PEC value to the register (because the
SMBus Send Byte transaction with PEC is similar to a Write Byte transaction
without PEC), which is not what we want. Thus, PEC is explicitly disabled
on SMBus Send Byte transactions in the lm90 driver.

PEC on byte data transactions represents a significant increase in bandwidth
usage (+33% for writes, +25% for reads) in normal conditions. With the need
to use two SMBus transaction for reads, this overhead jumps to +50%. Worse,
two transactions will typically mean twice as much delay waiting for
transaction completion, effectively doubling the register cache refresh time.
I guess reliability comes at a price, but it's quite expensive this time.

So, as not everyone might enjoy the slowdown, PEC is disabled by default and
can be enabled through sysfs. Just write 1 to the "pec" file and PEC will be
enabled. Write 0 to that file to disable PEC again.


code:
Kernel driver lm92
==================

Supported chips:

  * National Semiconductor LM92

    Prefix: 'lm92'

    Addresses scanned: I2C 0x48 - 0x4b

    Datasheet: http://www.national.com/pf/LM/LM92.html

  * National Semiconductor LM76

    Prefix: 'lm92'

    Addresses scanned: none, force parameter needed

    Datasheet: http://www.national.com/pf/LM/LM76.html

  * Maxim MAX6633/MAX6634/MAX6635

    Prefix: 'max6635'

    Addresses scanned: none, force parameter needed

    Datasheet: http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3074

Authors:
       - Abraham van der Merwe <abraham@2d3d.co.za>
       - Jean Delvare <jdelvare@suse.de>

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

This driver implements support for the National Semiconductor LM92
temperature sensor.

Each LM92 temperature sensor supports a single temperature sensor. There are
alarms for high, low, and critical thresholds. There's also an hysteresis to
control the thresholds for resetting alarms.

Support was added later for the LM76 and Maxim MAX6633/MAX6634/MAX6635,
which are mostly compatible. They have not all been tested, so you
may need to use the force parameter.