Added driver for Maxim MAX6639
Subsystems (2)
PATCH v2 1/1 Added driver for Maxim MAX6639
2-Channel Temperature Monitor with Dual PWM Fan-Speed Controller
This patch version changes:
* Minor "const int" addition
* FAN_FROM_REG() fix to consider rpm_range
* Added _alarm interfaces
* Added SENSORS_LIMIT() to set_pwm()
Documentation/hwmon/max6639 new file +48 -0
@@ -0,0 +1,49 @@ +Kernel driver max6639 +==========+ +Supported chips: + * Maxim MAX6639 + Prefix: 'max6639' + Addresses scanned: I2C 0x2c, 0x2e, 0x2f + Datasheet: http://pdfserv.maxim-ic.com/en/ds/MAX6639.pdf + +Authors: + He Changqing <[email protected]> + Roland Stigge <[email protected]> + +Description +----------- + +This driver implements support for the Maxim MAX6639. This chip is a 2-channel +temperature monitor with dual PWM fan speed controller. It can monitor its own +temperature and one external diode-connected transistor or two external +diode-connected transistors. + +The following device attributes are implemented via sysfs: + +Attribute R/W Contents +---------------------------------------------------------------------------- +temp1_input R Temperature channel 1 input (0..150 C) +temp2_input R Temperature channel 2 input (0..150 C) +temp1_fault R Temperature channel 1 diode fault +temp2_fault R Temperature channel 2 diode fault +temp1_max RW Set THERM temperature for input 1 + (in C, see datasheet) +temp2_max RW Set THERM temperature for input 2 +temp1_crit RW Set ALERT temperature for input 1 +temp2_crit RW Set ALERT temperature for input 2 +temp1_emergency RW Set OT temperature for input 1 + (in C, see datasheet) +temp2_emergency RW Set OT temperature for input 2 +pwm1 RW Fan 1 target duty cycle (0..255) +pwm2 RW Fan 2 target duty cycle (0..255) +fan1_input R TACH1 fan tachometer input (in RPM) +fan2_input R TACH2 fan tachometer input (in RPM) +fan1_fault R Fan 1 fault +fan2_fault R Fan 2 fault +temp1_max_alarm R Alarm on THERM temperature on channel 1 +temp2_max_alarm R Alarm on THERM temperature on channel 2 +temp1_crit_alarm R Alarm on ALERT temperature on channel 1 +temp2_crit_alarm R Alarm on ALERT temperature on channel 2 +temp1_emergency_alarm R Alarm on OT temperature on channel 1 +temp2_emergency_alarm R Alarm on OT temperature on channel 2
drivers/hwmon/Kconfig +10 -0
@@ -674,6 +674,16 @@ config SENSORS_MAX1619 This driver can also be built as a module. If so, the module will be called max1619. +config SENSORS_MAX6639 + tristate "Maxim MAX6639 sensor chip" + depends on I2C && EXPERIMENTAL + help + If you say yes here you get support for the MAX6639 + sensor chips. + + This driver can also be built as a module. If so, the module + will be called max6639. + config SENSORS_MAX6650 tristate "Maxim MAX6650 sensor chip" depends on I2C && EXPERIMENTAL
drivers/hwmon/Makefile +1 -0
@@ -83,6 +83,7 @@ obj-$(CONFIG_SENSORS_LTC4245) += ltc4245.o obj-$(CONFIG_SENSORS_LTC4261) += ltc4261.o obj-$(CONFIG_SENSORS_MAX1111) += max1111.o obj-$(CONFIG_SENSORS_MAX1619) += max1619.o +obj-$(CONFIG_SENSORS_MAX6639) += max6639.o obj-$(CONFIG_SENSORS_MAX6650) += max6650.o obj-$(CONFIG_SENSORS_MC13783_ADC)+= mc13783-adc.o obj-$(CONFIG_SENSORS_PC87360) += pc87360.o
drivers/hwmon/max6639.c new file +638 -0
638 lines not on this page · raw message
include/linux/i2c/max6639.h new file +14 -0
@@ -0,0 +1,14 @@ +#ifndef _LINUX_MAX6639_H +#define _LINUX_MAX6639_H + +#include <linux/types.h> + +/* platform data for the MAX6639 temperature sensor and fan control */ + +struct max6639_platform_data { +bool pwm_polarity;/* Polarity low (0) or high (1, default) */ +int ppr;/* Pulses per rotation 1..4 (default = 2) */ +int rpm_range;/* 2000, 4000 (default), 8000 or 16000 */ +}; + +#endif /* _LINUX_MAX6639_H */
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedQuoted 9 lines · On Thu, 2011-01-20 at 12:42 -0500, [email protected] wrote:
2-Channel Temperature Monitor with Dual PWM Fan-Speed Controller
This patch version changes:
* Minor "const int" addition
*FAN_FROM_REG()fix to considerrpm_range
* Added_alarminterfaces
* AddedSENSORS_LIMIT()toset_pwm()Signed-off-by Roland Stigge <[email protected]>
Applied to -next.
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 9 lines · Guenter Roeck
Quoted 8 lines · On Thu, 2011-01-20 at 12:42 -0500, [email protected] wrote:
2-Channel Temperature Monitor with Dual PWM Fan-Speed Controller
This patch version changes:
* Minor "const int" addition
*FAN_FROM_REG()fix to considerrpm_range
* Added_alarminterfaces
* AddedSENSORS_LIMIT()toset_pwm()
Quoted 3 lines
Quoted 1 line
Signed-off-by Roland Stigge <[email protected]>Applied to -next.
Please add an entry to wiki/Devices for this chip.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 10 lines · Jean Delvare
Quoted 9 lines · Guenter Roeck
Quoted 8 lines · On Thu, 2011-01-20 at 12:42 -0500, [email protected] wrote:
2-Channel Temperature Monitor with Dual PWM Fan-Speed Controller
This patch version changes:
* Minor "const int" addition
*FAN_FROM_REG()fix to considerrpm_range
* Added_alarminterfaces
* AddedSENSORS_LIMIT()toset_pwm()
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Roland Stigge <[email protected]>Applied to -next.
Please add an entry to wiki/Devices for this chip.
Done. That was on my to-do list for today ...
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors