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

Commit 5372d2d7 authored by Guenter Roeck's avatar Guenter Roeck
Browse files

hwmon: Driver for Maxim MAX6697 and compatibles



Add support for MAX6581, MAX6602, MAX6622, MAX6636, MAX6689, MAX6693,
MAX6694, MAX6697, MAX6698, and MAX6699 temperature sensors

Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Reviewed-by: default avatarJean Delvare <khali@linux-fr.org>
parent 412e29c1
Loading
Loading
Loading
Loading
+64 −0
Original line number Diff line number Diff line
max6697 properties

Required properties:
- compatible:
	Should be one of
		maxim,max6581
		maxim,max6602
		maxim,max6622
		maxim,max6636
		maxim,max6689
		maxim,max6693
		maxim,max6694
		maxim,max6697
		maxim,max6698
		maxim,max6699
- reg: I2C address

Optional properties:

- smbus-timeout-disable
	Set to disable SMBus timeout. If not specified, SMBus timeout will be
	enabled.
- extended-range-enable
	Only valid for MAX6581. Set to enable extended temperature range.
	Extended temperature will be disabled if not specified.
- beta-compensation-enable
	Only valid for MAX6693 and MX6694. Set to enable beta compensation on
	remote temperature channel 1.
	Beta compensation will be disabled if not specified.
- alert-mask
	Alert bit mask. Alert disabled for bits set.
	Select bit 0 for local temperature, bit 1..7 for remote temperatures.
	If not specified, alert will be enabled for all channels.
- over-temperature-mask
	Over-temperature bit mask. Over-temperature reporting disabled for
	bits set.
	Select bit 0 for local temperature, bit 1..7 for remote temperatures.
	If not specified, over-temperature reporting will be enabled for all
	channels.
- resistance-cancellation
	Boolean for all chips other than MAX6581. Set to enable resistance
	cancellation on remote temperature channel 1.
	For MAX6581, resistance cancellation enabled for all channels if
	specified as boolean, otherwise as per bit mask specified.
	Only supported for remote temperatures (bit 1..7).
	If not specified, resistance cancellation will be disabled for all
	channels.
- transistor-ideality
	For MAX6581 only. Two values; first is bit mask, second is ideality
	select value as per MAX6581 data sheet. Select bit 1..7 for remote
	channels.
	Transistor ideality will be initialized to default (1.008) if not
	specified.

Example:

temp-sensor@1a {
	compatible = "maxim,max6697";
	reg = <0x1a>;
	smbus-timeout-disable;
	resistance-cancellation;
	alert-mask = <0x72>;
	over-temperature-mask = <0x7f>;
};
+58 −0
Original line number Diff line number Diff line
Kernel driver max6697
=====================

Supported chips:
  * Maxim MAX6581
    Prefix: 'max6581'
    Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX6581.pdf
  * Maxim MAX6602
    Prefix: 'max6602'
    Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX6602.pdf
  * Maxim MAX6622
    Prefix: 'max6622'
    Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX6622.pdf
  * Maxim MAX6636
    Prefix: 'max6636'
    Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX6636.pdf
  * Maxim MAX6689
    Prefix: 'max6689'
    Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX6689.pdf
  * Maxim MAX6693
    Prefix: 'max6693'
    Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX6693.pdf
  * Maxim MAX6694
    Prefix: 'max6694'
    Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX6694.pdf
  * Maxim MAX6697
    Prefix: 'max6697'
    Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX6697.pdf
  * Maxim MAX6698
    Prefix: 'max6698'
    Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX6698.pdf
  * Maxim MAX6699
    Prefix: 'max6699'
    Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX6699.pdf

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

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

This driver implements support for several MAX6697 compatible temperature sensor
chips. The chips support one local temperature sensor plus four, six, or seven
remote temperature sensors. Remote temperature sensors are diode-connected
thermal transitors, except for MAX6698 which supports three diode-connected
thermal transistors plus three thermistors in addition to the local temperature
sensor.

The driver provides the following sysfs attributes. temp1 is the local (chip)
temperature, temp[2..n] are remote temperatures. The actually supported
per-channel attributes are chip type and channel dependent.

tempX_input      RO temperature
tempX_max        RW temperature maximum threshold
tempX_max_alarm  RO temperature maximum threshold alarm
tempX_crit       RW temperature critical threshold
tempX_crit_alarm RO temperature critical threshold alarm
tempX_fault      RO temperature diode fault (remote sensors only)
+11 −0
Original line number Diff line number Diff line
@@ -854,6 +854,17 @@ config SENSORS_MAX6650
	  This driver can also be built as a module.  If so, the module
	  will be called max6650.

config SENSORS_MAX6697
	tristate "Maxim MAX6697 and compatibles"
	depends on I2C
	help
	  If you say yes here you get support for MAX6581, MAX6602, MAX6622,
	  MAX6636, MAX6689, MAX6693, MAX6694, MAX6697, MAX6698, and MAX6699
	  temperature sensor chips.

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

config SENSORS_MCP3021
	tristate "Microchip MCP3021 and compatibles"
	depends on I2C
+1 −0
Original line number Diff line number Diff line
@@ -99,6 +99,7 @@ obj-$(CONFIG_SENSORS_MAX197) += max197.o
obj-$(CONFIG_SENSORS_MAX6639)	+= max6639.o
obj-$(CONFIG_SENSORS_MAX6642)	+= max6642.o
obj-$(CONFIG_SENSORS_MAX6650)	+= max6650.o
obj-$(CONFIG_SENSORS_MAX6697)	+= max6697.o
obj-$(CONFIG_SENSORS_MC13783_ADC)+= mc13783-adc.o
obj-$(CONFIG_SENSORS_MCP3021)	+= mcp3021.o
obj-$(CONFIG_SENSORS_NTC_THERMISTOR)	+= ntc_thermistor.o
+726 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading