Commit d12dbbfe authored by Len Brown's avatar Len Brown

Pull thinkpad-2.6.24 into release branch

parents 614a6bbe 59f91ff1
ThinkPad ACPI Extras Driver ThinkPad ACPI Extras Driver
Version 0.16 Version 0.17
August 2nd, 2007 October 04th, 2007
Borislav Deianov <borislav@users.sf.net> Borislav Deianov <borislav@users.sf.net>
Henrique de Moraes Holschuh <hmh@hmh.eng.br> Henrique de Moraes Holschuh <hmh@hmh.eng.br>
...@@ -923,19 +923,34 @@ sysfs backlight device "thinkpad_screen" ...@@ -923,19 +923,34 @@ sysfs backlight device "thinkpad_screen"
This feature allows software control of the LCD brightness on ThinkPad This feature allows software control of the LCD brightness on ThinkPad
models which don't have a hardware brightness slider. models which don't have a hardware brightness slider.
It has some limitations: the LCD backlight cannot be actually turned on or off It has some limitations: the LCD backlight cannot be actually turned on or
by this interface, and in many ThinkPad models, the "dim while on battery" off by this interface, and in many ThinkPad models, the "dim while on
functionality will be enabled by the BIOS when this interface is used, and battery" functionality will be enabled by the BIOS when this interface is
cannot be controlled. used, and cannot be controlled.
The backlight control has eight levels, ranging from 0 to 7. Some of the On IBM (and some of the earlier Lenovo) ThinkPads, the backlight control
levels may not be distinct. has eight brightness levels, ranging from 0 to 7. Some of the levels
may not be distinct. Later Lenovo models that implement the ACPI
There are two interfaces to the firmware for brightness control, EC and CMOS. display backlight brightness control methods have 16 levels, ranging
To select which one should be used, use the brightness_mode module parameter: from 0 to 15.
brightness_mode=1 selects EC mode, brightness_mode=2 selects CMOS mode,
brightness_mode=3 selects both EC and CMOS. The driver tries to autodetect There are two interfaces to the firmware for direct brightness control,
which interface to use. EC and CMOS. To select which one should be used, use the
brightness_mode module parameter: brightness_mode=1 selects EC mode,
brightness_mode=2 selects CMOS mode, brightness_mode=3 selects both EC
and CMOS. The driver tries to autodetect which interface to use.
When display backlight brightness controls are available through the
standard ACPI interface, it is best to use it instead of this direct
ThinkPad-specific interface. The driver will disable its native
backlight brightness control interface if it detects that the standard
ACPI interface is available in the ThinkPad.
The brightness_enable module parameter can be used to control whether
the LCD brightness control feature will be enabled when available.
brightness_enable=0 forces it to be disabled. brightness_enable=1
forces it to be enabled when available, even if the standard ACPI
interface is also available.
Procfs notes: Procfs notes:
...@@ -947,11 +962,11 @@ Procfs notes: ...@@ -947,11 +962,11 @@ Procfs notes:
Sysfs notes: Sysfs notes:
The interface is implemented through the backlight sysfs class, which is poorly The interface is implemented through the backlight sysfs class, which is
documented at this time. poorly documented at this time.
Locate the thinkpad_screen device under /sys/class/backlight, and inside it Locate the thinkpad_screen device under /sys/class/backlight, and inside
there will be the following attributes: it there will be the following attributes:
max_brightness: max_brightness:
Reads the maximum brightness the hardware can be set to. Reads the maximum brightness the hardware can be set to.
...@@ -961,17 +976,19 @@ there will be the following attributes: ...@@ -961,17 +976,19 @@ there will be the following attributes:
Reads what brightness the screen is set to at this instant. Reads what brightness the screen is set to at this instant.
brightness: brightness:
Writes request the driver to change brightness to the given Writes request the driver to change brightness to the
value. Reads will tell you what brightness the driver is trying given value. Reads will tell you what brightness the
to set the display to when "power" is set to zero and the display driver is trying to set the display to when "power" is set
has not been dimmed by a kernel power management event. to zero and the display has not been dimmed by a kernel
power management event.
power: power:
power management mode, where 0 is "display on", and 1 to 3 will power management mode, where 0 is "display on", and 1 to 3
dim the display backlight to brightness level 0 because will dim the display backlight to brightness level 0
thinkpad-acpi cannot really turn the backlight off. Kernel because thinkpad-acpi cannot really turn the backlight
power management events can temporarily increase the current off. Kernel power management events can temporarily
power management level, i.e. they can dim the display. increase the current power management level, i.e. they can
dim the display.
Volume control -- /proc/acpi/ibm/volume Volume control -- /proc/acpi/ibm/volume
......
This diff is collapsed.
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
/* ThinkPad CMOS NVRAM constants */ /* ThinkPad CMOS NVRAM constants */
#define TP_NVRAM_ADDR_BRIGHTNESS 0x5e #define TP_NVRAM_ADDR_BRIGHTNESS 0x5e
#define TP_NVRAM_MASK_LEVEL_BRIGHTNESS 0x07 #define TP_NVRAM_MASK_LEVEL_BRIGHTNESS 0x0f
#define TP_NVRAM_POS_LEVEL_BRIGHTNESS 0 #define TP_NVRAM_POS_LEVEL_BRIGHTNESS 0
#define onoff(status,bit) ((status) & (1 << (bit)) ? "on" : "off") #define onoff(status,bit) ((status) & (1 << (bit)) ? "on" : "off")
...@@ -246,6 +246,7 @@ static struct { ...@@ -246,6 +246,7 @@ static struct {
u32 hotkey_wlsw:1; u32 hotkey_wlsw:1;
u32 light:1; u32 light:1;
u32 light_status:1; u32 light_status:1;
u32 bright_16levels:1;
u32 wan:1; u32 wan:1;
u32 fan_ctrl_status_undef:1; u32 fan_ctrl_status_undef:1;
u32 input_device_registered:1; u32 input_device_registered:1;
...@@ -338,6 +339,7 @@ static int bluetooth_write(char *buf); ...@@ -338,6 +339,7 @@ static int bluetooth_write(char *buf);
static struct backlight_device *ibm_backlight_device; static struct backlight_device *ibm_backlight_device;
static int brightness_offset = 0x31; static int brightness_offset = 0x31;
static int brightness_mode; static int brightness_mode;
static unsigned int brightness_enable; /* 0 = no, 1 = yes, 2 = auto */
static int brightness_init(struct ibm_init_struct *iibm); static int brightness_init(struct ibm_init_struct *iibm);
static void brightness_exit(void); static void brightness_exit(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment