diff options
author | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 2007-09-25 06:38:03 -0300 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-09-25 15:21:53 -0400 |
commit | 7fd400297978a2cf7a74344fb22020e9479b4f69 (patch) | |
tree | adac241038f638b9c73ca2513caa4f13bdcd48f5 /drivers/misc/thinkpad_acpi.h | |
parent | 3e5ce914bd17335ca74a7c7b06a776c6be6ca434 (diff) | |
download | op-kernel-dev-7fd400297978a2cf7a74344fb22020e9479b4f69.zip op-kernel-dev-7fd400297978a2cf7a74344fb22020e9479b4f69.tar.gz |
ACPI: thinkpad-acpi: use a separate platform device for hwmon and name it (v2)
Use a separate platform device and driver ("thinkpad_hwmon") to attach
hwmon attributes and class, and add a name attribute of "thinkpad" to
it, which defines the hwmon device name for libsensors4.
This makes thinkpad-acpi compatible with libsensors4 from lm-sensors, and
the platform driver and device split will make it much easier to separate
hwmon functionality into its own module later on.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/misc/thinkpad_acpi.h')
-rw-r--r-- | drivers/misc/thinkpad_acpi.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h index fa64ded..791b8ca 100644 --- a/drivers/misc/thinkpad_acpi.h +++ b/drivers/misc/thinkpad_acpi.h @@ -58,13 +58,14 @@ #define IBM_NAME "thinkpad" #define IBM_DESC "ThinkPad ACPI Extras" -#define IBM_FILE "thinkpad_acpi" +#define IBM_FILE IBM_NAME "_acpi" #define IBM_URL "http://ibm-acpi.sf.net/" #define IBM_MAIL "ibm-acpi-devel@lists.sourceforge.net" #define IBM_PROC_DIR "ibm" #define IBM_ACPI_EVENT_PREFIX "ibm" #define IBM_DRVR_NAME IBM_FILE +#define IBM_HWMON_DRVR_NAME IBM_NAME "_hwmon" #define IBM_LOG IBM_FILE ": " #define IBM_ERR KERN_ERR IBM_LOG @@ -171,6 +172,7 @@ static int parse_strtoul(const char *buf, unsigned long max, /* Device model */ static struct platform_device *tpacpi_pdev; +static struct platform_device *tpacpi_sensors_pdev; static struct class_device *tpacpi_hwmon; static struct platform_driver tpacpi_pdriver; static struct input_dev *tpacpi_inputdev; @@ -249,6 +251,8 @@ static struct { u32 input_device_registered:1; u32 platform_drv_registered:1; u32 platform_drv_attrs_registered:1; + u32 sensors_pdrv_registered:1; + u32 sensors_pdev_attrs_registered:1; } tp_features; struct thinkpad_id_data { |