i8k: Add support for fan labels
authorPali Rohár <pali.rohar@gmail.com>
Mon, 12 Jan 2015 13:32:05 +0000 (14:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Jan 2015 17:17:59 +0000 (09:17 -0800)
commitf989e55452c74b4f7b22c889b8ec9f1192aaeec4
tree5e0fea244bf5e28774d1682a723b0fa6d878787d
parent1a131ca1de7a84cf3827c418ee5971b493c6f23f
i8k: Add support for fan labels

This patch adds labels support for fans if SMM function with EAX register
0x03a3 reports it. This information was taken from DOS binary NBSVC.MDM.

Additionally this patch change detection of fan presece. Instead reading fan
status now detection is based on new label SMM function. Dell DOS binary
NBSVC.MDM is doing similar checks, so we should do that too.

This patch also remove I8K_FAN_LEFT and I8K_FAN_RIGHT usage from hwmon driver
part because that names does not make sense anymore. So numeric constants are
used instead. Original /proc/i8k ioctl part was not changed for compatibility
reasons.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/i8k.c