Add Nuvoton NCT7904 hwmon driver
Subsystems (2)
PATCH v4 1/1 Add Nuvoton NCT7904 hwmon driver
---
Changes from v3:
1. Added Documentation/hwmon/nct7904
2. Removed X86 dependency from Kconfig
3. Fan mode may be only 0 or 1 (for manual/smartfan) selecting smartfan mode is allowed only if the mode has been previously set up
4. Minor style fixes
Documentation/hwmon/nct7904 | 61 +++++ drivers/hwmon/Kconfig | 10 + drivers/hwmon/Makefile | 1 + drivers/hwmon/nct7904.c | 610 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 682 insertions(+) create mode 100644 Documentation/hwmon/nct7904 create mode 100644 drivers/hwmon/nct7904.c
Documentation/hwmon/nct7904 new file +61 -0
@@ -0,0 +1,61 @@ +Kernel driver nct7904 +========== + +Supported chip: + * Nuvoton NCT7904D + Prefix: nct7904 + Addresses: I2C 0x2d, 0x2e + Datasheet: Publicly available at Nuvoton website + http://www.nuvoton.com/ + +Author: Vadim V. Vlasov <[email protected]> + + +Description +----------- + +The NCT7904D is a hardware monitor supporting up to 20 voltage sensors, +internal temperature sensor, Intel PECI and AMD SB-TSI CPU temperature +interface, up to 12 fan tachometer inputs, up to 4 fan control channels +with SmartFan. + + +Sysfs entries +------------- + +Currently, the driver supports only the following features: + +in[1-20]_input Input voltage measurements (mV) + +fan[1-12]_input Fan tachometer measurements (rpm) + +temp1_input Local temperature (1/1000 degree, + 0.125 degree resolution) + +temp[2-9]_input CPU temperatures (1/1000 degree, + 0.125 degree resolution) + +fan[1-4]_mode R/W, 0/1 for manual or SmartFan mode + Setting SmartFan mode is supported only if it has been + previously configured by BIOS (or configuration EEPROM) + +fan[1-4]_pwm R/O in SmartFan mode, R/W in manual control mode + +The driver checks sensor control registers and does not export the sensors +that are not enabled. Anyway, a sensor that is enabled may actually be not +connected and thus provide zero readings. + + +Limitations +----------- + +The following features are not supported in current version: + + - SmartFan control + - Watchdog + - GPIO + - external temperature sensors + - SMI + - min/max values + - many other... +
drivers/hwmon/Kconfig +10 -0
@@ -1145,6 +1145,16 @@ config SENSORS_NCT7802 This driver can also be built as a module. If so, the module will be called nct7802. +config SENSORS_NCT7904 + tristate "Nuvoton NCT7904" + depends on I2C + help + If you say yes here you get support for the Nuvoton NCT7904 + hardware monitoring chip, including manual fan speed control. + + This driver can also be built as a module. If so, the module + will be called nct7904. + config SENSORS_PCF8591 tristate "Philips PCF8591 ADC/DAC" depends on I2C
drivers/hwmon/Makefile +1 -0
@@ -120,6 +120,7 @@ obj-$(CONFIG_SENSORS_MENF21BMC_HWMON) += menf21bmc_hwmon.o obj-$(CONFIG_SENSORS_NCT6683) += nct6683.o obj-$(CONFIG_SENSORS_NCT6775) += nct6775.o obj-$(CONFIG_SENSORS_NCT7802) += nct7802.o +obj-$(CONFIG_SENSORS_NCT7904) += nct7904.o obj-$(CONFIG_SENSORS_NTC_THERMISTOR) += ntc_thermistor.o obj-$(CONFIG_SENSORS_PC87360) += pc87360.o obj-$(CONFIG_SENSORS_PC87427) += pc87427.o
drivers/hwmon/nct7904.c new file +609 -0
609 lines not on this page · raw message
Signature · 9 lines
1.9.3 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 11 lines · Vadim V. Vlasov
Signed-off-by Vadim V. Vlasov <[email protected]>---
Changes from v3:
1. AddedDocumentation/hwmon/nct7904
2. Removed X86 dependency fromKconfig
3. Fan mode may be only 0 or 1 (for manual/smartfan) selecting smartfan mode is allowed only if the mode has been previously set up
4. Minor style fixesDocumentation/hwmon/nct7904 | 61 +++++
Nicely done.
You introduced a couple of whitespace errors in this file. No need to resubmit, I fixed it up.
I also dropped the now redundant comment about not supported features from the driver code.
Thanks, applied to -next.
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors