diff options
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/thinkpad_acpi.c | 83 |
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 | ||
141 | MODULE_AUTHOR("Borislav Deianov, Henrique de Moraes Holschuh"); | ||
142 | MODULE_DESCRIPTION(IBM_DESC); | ||
143 | MODULE_VERSION(IBM_VERSION); | ||
144 | MODULE_LICENSE("GPL"); | ||
145 | |||
146 | /* Please remove this in year 2009 */ | ||
147 | MODULE_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 */ | ||
162 | MODULE_ALIAS("dmi:bvnIBM:*:svnIBM:*:pvrThinkPad*:rvnIBM:*"); | ||
163 | MODULE_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... */ | ||
168 | IBM_BIOS_MODULE_ALIAS("I[B,D,H,I,M,N,O,T,W,V,Y,Z]"); | ||
169 | IBM_BIOS_MODULE_ALIAS("1[0,3,6,8,A-G,I,K,M-P,S,T]"); | ||
170 | IBM_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 | ||
5736 | module_param(experimental, int, 0); | 5704 | module_param(experimental, int, 0); |
5705 | MODULE_PARM_DESC(experimental, | ||
5706 | "Enables experimental features when non-zero"); | ||
5737 | 5707 | ||
5738 | module_param_named(debug, dbg_level, uint, 0); | 5708 | module_param_named(debug, dbg_level, uint, 0); |
5709 | MODULE_PARM_DESC(debug, "Sets debug level bit-mask"); | ||
5739 | 5710 | ||
5740 | module_param(force_load, bool, 0); | 5711 | module_param(force_load, bool, 0); |
5712 | MODULE_PARM_DESC(force_load, | ||
5713 | "Attempts to load the driver even on a " | ||
5714 | "mis-identified ThinkPad when true"); | ||
5741 | 5715 | ||
5742 | module_param_named(fan_control, fan_control_allowed, bool, 0); | 5716 | module_param_named(fan_control, fan_control_allowed, bool, 0); |
5717 | MODULE_PARM_DESC(fan_control, | ||
5718 | "Enables setting fan parameters features when true"); | ||
5743 | 5719 | ||
5744 | module_param_named(brightness_mode, brightness_mode, int, 0); | 5720 | module_param_named(brightness_mode, brightness_mode, int, 0); |
5721 | MODULE_PARM_DESC(brightness_mode, | ||
5722 | "Selects brightness control strategy: " | ||
5723 | "0=auto, 1=EC, 2=CMOS, 3=both"); | ||
5745 | 5724 | ||
5746 | module_param(brightness_enable, uint, 0); | 5725 | module_param(brightness_enable, uint, 0); |
5726 | MODULE_PARM_DESC(brightness_enable, | ||
5727 | "Enables backlight control when 1, disables when 0"); | ||
5747 | 5728 | ||
5748 | module_param(hotkey_report_mode, uint, 0); | 5729 | module_param(hotkey_report_mode, uint, 0); |
5730 | MODULE_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 | ||
5753 | IBM_PARAM(hotkey); | 5739 | IBM_PARAM(hotkey); |
5754 | IBM_PARAM(bluetooth); | 5740 | IBM_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 */ | ||
5947 | MODULE_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 */ | ||
5962 | MODULE_ALIAS("dmi:bvnIBM:*:svnIBM:*:pvrThinkPad*:rvnIBM:*"); | ||
5963 | MODULE_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... */ | ||
5968 | IBM_BIOS_MODULE_ALIAS("I[B,D,H,I,M,N,O,T,W,V,Y,Z]"); | ||
5969 | IBM_BIOS_MODULE_ALIAS("1[0,3,6,8,A-G,I,K,M-P,S,T]"); | ||
5970 | IBM_BIOS_MODULE_ALIAS("K[U,X-Z]"); | ||
5971 | |||
5972 | MODULE_AUTHOR("Borislav Deianov, Henrique de Moraes Holschuh"); | ||
5973 | MODULE_DESCRIPTION(IBM_DESC); | ||
5974 | MODULE_VERSION(IBM_VERSION); | ||
5975 | MODULE_LICENSE("GPL"); | ||
5976 | |||
5960 | module_init(thinkpad_acpi_module_init); | 5977 | module_init(thinkpad_acpi_module_init); |
5961 | module_exit(thinkpad_acpi_module_exit); | 5978 | module_exit(thinkpad_acpi_module_exit); |