diff options
-rw-r--r-- | Documentation/thinkpad-acpi.txt | 4 | ||||
-rw-r--r-- | drivers/misc/thinkpad_acpi.c | 9 | ||||
-rw-r--r-- | drivers/misc/thinkpad_acpi.h | 1 |
3 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/thinkpad-acpi.txt b/Documentation/thinkpad-acpi.txt index a743bfa62b95..f877c13c5ef8 100644 --- a/Documentation/thinkpad-acpi.txt +++ b/Documentation/thinkpad-acpi.txt | |||
@@ -944,6 +944,10 @@ When display backlight brightness controls are available through the | |||
944 | standard ACPI interface, it is best to use it instead of this direct | 944 | standard ACPI interface, it is best to use it instead of this direct |
945 | ThinkPad-specific interface. | 945 | ThinkPad-specific interface. |
946 | 946 | ||
947 | The brightness_enable module parameter can be used to control whether | ||
948 | the LCD brightness control feature will be enabled when available. | ||
949 | brightness_enable=0 forces it to be disabled. | ||
950 | |||
947 | Procfs notes: | 951 | Procfs notes: |
948 | 952 | ||
949 | The available commands are: | 953 | The available commands are: |
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index 322ba25b4798..56a21e6b80a9 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
@@ -3182,6 +3182,12 @@ static int __init brightness_init(struct ibm_init_struct *iibm) | |||
3182 | 3182 | ||
3183 | mutex_init(&brightness_mutex); | 3183 | mutex_init(&brightness_mutex); |
3184 | 3184 | ||
3185 | if (!brightness_enable) { | ||
3186 | dbg_printk(TPACPI_DBG_INIT, | ||
3187 | "brightness support disabled by module parameter\n"); | ||
3188 | return 1; | ||
3189 | } | ||
3190 | |||
3185 | if (!brightness_mode) { | 3191 | if (!brightness_mode) { |
3186 | if (thinkpad_id.vendor == PCI_VENDOR_ID_LENOVO) | 3192 | if (thinkpad_id.vendor == PCI_VENDOR_ID_LENOVO) |
3187 | brightness_mode = 2; | 3193 | brightness_mode = 2; |
@@ -4803,6 +4809,9 @@ module_param_named(fan_control, fan_control_allowed, bool, 0); | |||
4803 | static int brightness_mode; | 4809 | static int brightness_mode; |
4804 | module_param_named(brightness_mode, brightness_mode, int, 0); | 4810 | module_param_named(brightness_mode, brightness_mode, int, 0); |
4805 | 4811 | ||
4812 | static unsigned int brightness_enable = 2; /* 2 = auto, 0 = no, 1 = yes */ | ||
4813 | module_param(brightness_enable, uint, 0); | ||
4814 | |||
4806 | static unsigned int hotkey_report_mode; | 4815 | static unsigned int hotkey_report_mode; |
4807 | module_param(hotkey_report_mode, uint, 0); | 4816 | module_param(hotkey_report_mode, uint, 0); |
4808 | 4817 | ||
diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h index 8ca19c333727..8fba2bbe345e 100644 --- a/drivers/misc/thinkpad_acpi.h +++ b/drivers/misc/thinkpad_acpi.h | |||
@@ -339,6 +339,7 @@ static int bluetooth_write(char *buf); | |||
339 | static struct backlight_device *ibm_backlight_device; | 339 | static struct backlight_device *ibm_backlight_device; |
340 | static int brightness_offset = 0x31; | 340 | static int brightness_offset = 0x31; |
341 | static int brightness_mode; | 341 | static int brightness_mode; |
342 | static unsigned int brightness_enable; /* 0 = no, 1 = yes, 2 = auto */ | ||
342 | 343 | ||
343 | static int brightness_init(struct ibm_init_struct *iibm); | 344 | static int brightness_init(struct ibm_init_struct *iibm); |
344 | static void brightness_exit(void); | 345 | static void brightness_exit(void); |