aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>2008-01-08 10:02:47 -0500
committerLen Brown <len.brown@intel.com>2008-02-01 22:26:07 -0500
commitf68080f86d8b43bf3ff4c309f1bc9aa4d3fdf735 (patch)
tree90d29f256ae88e11244505eb05eb2b24bfee6d74 /drivers/misc
parent4b45cc076bc1964352f4a603a18c511ac182b98f (diff)
ACPI: thinkpad-acpi: module glue cleanups
General cleanup of module glue: Do some code reordering, and add missing parameter help text. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/thinkpad_acpi.c83
1 files changed, 50 insertions, 33 deletions
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index 45be8e5f9351..be04f1c94d61 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
@@ -124,7 +124,6 @@ enum {
124 * Main driver 124 * Main driver
125 */ 125 */
126 126
127/* Module */
128#define IBM_NAME "thinkpad" 127#define IBM_NAME "thinkpad"
129#define IBM_DESC "ThinkPad ACPI Extras" 128#define IBM_DESC "ThinkPad ACPI Extras"
130#define IBM_FILE IBM_NAME "_acpi" 129#define IBM_FILE IBM_NAME "_acpi"
@@ -138,37 +137,6 @@ enum {
138 137
139#define IBM_MAX_ACPI_ARGS 3 138#define IBM_MAX_ACPI_ARGS 3
140 139
141MODULE_AUTHOR("Borislav Deianov, Henrique de Moraes Holschuh");
142MODULE_DESCRIPTION(IBM_DESC);
143MODULE_VERSION(IBM_VERSION);
144MODULE_LICENSE("GPL");
145
146/* Please remove this in year 2009 */
147MODULE_ALIAS("ibm_acpi");
148
149/*
150 * DMI matching for module autoloading
151 *
152 * See http://thinkwiki.org/wiki/List_of_DMI_IDs
153 * See http://thinkwiki.org/wiki/BIOS_Upgrade_Downloads
154 *
155 * Only models listed in thinkwiki will be supported, so add yours
156 * if it is not there yet.
157 */
158#define IBM_BIOS_MODULE_ALIAS(__type) \
159 MODULE_ALIAS("dmi:bvnIBM:bvr" __type "ET??WW")
160
161/* Non-ancient thinkpads */
162MODULE_ALIAS("dmi:bvnIBM:*:svnIBM:*:pvrThinkPad*:rvnIBM:*");
163MODULE_ALIAS("dmi:bvnLENOVO:*:svnLENOVO:*:pvrThinkPad*:rvnLENOVO:*");
164
165/* Ancient thinkpad BIOSes have to be identified by
166 * BIOS type or model number, and there are far less
167 * BIOS types than model numbers... */
168IBM_BIOS_MODULE_ALIAS("I[B,D,H,I,M,N,O,T,W,V,Y,Z]");
169IBM_BIOS_MODULE_ALIAS("1[0,3,6,8,A-G,I,K,M-P,S,T]");
170IBM_BIOS_MODULE_ALIAS("K[U,X-Z]");
171
172/* Debugging */ 140/* Debugging */
173#define IBM_LOG IBM_FILE ": " 141#define IBM_LOG IBM_FILE ": "
174#define IBM_ERR KERN_ERR IBM_LOG 142#define IBM_ERR KERN_ERR IBM_LOG
@@ -5734,21 +5702,39 @@ static int __init set_ibm_param(const char *val, struct kernel_param *kp)
5734} 5702}
5735 5703
5736module_param(experimental, int, 0); 5704module_param(experimental, int, 0);
5705MODULE_PARM_DESC(experimental,
5706 "Enables experimental features when non-zero");
5737 5707
5738module_param_named(debug, dbg_level, uint, 0); 5708module_param_named(debug, dbg_level, uint, 0);
5709MODULE_PARM_DESC(debug, "Sets debug level bit-mask");
5739 5710
5740module_param(force_load, bool, 0); 5711module_param(force_load, bool, 0);
5712MODULE_PARM_DESC(force_load,
5713 "Attempts to load the driver even on a "
5714 "mis-identified ThinkPad when true");
5741 5715
5742module_param_named(fan_control, fan_control_allowed, bool, 0); 5716module_param_named(fan_control, fan_control_allowed, bool, 0);
5717MODULE_PARM_DESC(fan_control,
5718 "Enables setting fan parameters features when true");
5743 5719
5744module_param_named(brightness_mode, brightness_mode, int, 0); 5720module_param_named(brightness_mode, brightness_mode, int, 0);
5721MODULE_PARM_DESC(brightness_mode,
5722 "Selects brightness control strategy: "
5723 "0=auto, 1=EC, 2=CMOS, 3=both");
5745 5724
5746module_param(brightness_enable, uint, 0); 5725module_param(brightness_enable, uint, 0);
5726MODULE_PARM_DESC(brightness_enable,
5727 "Enables backlight control when 1, disables when 0");
5747 5728
5748module_param(hotkey_report_mode, uint, 0); 5729module_param(hotkey_report_mode, uint, 0);
5730MODULE_PARM_DESC(hotkey_report_mode,
5731 "used for backwards compatibility with userspace, "
5732 "see documentation");
5749 5733
5750#define IBM_PARAM(feature) \ 5734#define IBM_PARAM(feature) \
5751 module_param_call(feature, set_ibm_param, NULL, NULL, 0) 5735 module_param_call(feature, set_ibm_param, NULL, NULL, 0); \
5736 MODULE_PARM_DESC(feature, "Simulates thinkpad-aci procfs command " \
5737 "at module load, see documentation")
5752 5738
5753IBM_PARAM(hotkey); 5739IBM_PARAM(hotkey);
5754IBM_PARAM(bluetooth); 5740IBM_PARAM(bluetooth);
@@ -5957,5 +5943,36 @@ static int __init thinkpad_acpi_module_init(void)
5957 return 0; 5943 return 0;
5958} 5944}
5959 5945
5946/* Please remove this in year 2009 */
5947MODULE_ALIAS("ibm_acpi");
5948
5949/*
5950 * DMI matching for module autoloading
5951 *
5952 * See http://thinkwiki.org/wiki/List_of_DMI_IDs
5953 * See http://thinkwiki.org/wiki/BIOS_Upgrade_Downloads
5954 *
5955 * Only models listed in thinkwiki will be supported, so add yours
5956 * if it is not there yet.
5957 */
5958#define IBM_BIOS_MODULE_ALIAS(__type) \
5959 MODULE_ALIAS("dmi:bvnIBM:bvr" __type "ET??WW")
5960
5961/* Non-ancient thinkpads */
5962MODULE_ALIAS("dmi:bvnIBM:*:svnIBM:*:pvrThinkPad*:rvnIBM:*");
5963MODULE_ALIAS("dmi:bvnLENOVO:*:svnLENOVO:*:pvrThinkPad*:rvnLENOVO:*");
5964
5965/* Ancient thinkpad BIOSes have to be identified by
5966 * BIOS type or model number, and there are far less
5967 * BIOS types than model numbers... */
5968IBM_BIOS_MODULE_ALIAS("I[B,D,H,I,M,N,O,T,W,V,Y,Z]");
5969IBM_BIOS_MODULE_ALIAS("1[0,3,6,8,A-G,I,K,M-P,S,T]");
5970IBM_BIOS_MODULE_ALIAS("K[U,X-Z]");
5971
5972MODULE_AUTHOR("Borislav Deianov, Henrique de Moraes Holschuh");
5973MODULE_DESCRIPTION(IBM_DESC);
5974MODULE_VERSION(IBM_VERSION);
5975MODULE_LICENSE("GPL");
5976
5960module_init(thinkpad_acpi_module_init); 5977module_init(thinkpad_acpi_module_init);
5961module_exit(thinkpad_acpi_module_exit); 5978module_exit(thinkpad_acpi_module_exit);