[ltp] thinkpad-acpi release for 2.6.24-rc2

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Mon, 19 Nov 2007 16:48:06 -0200


--jRHKVT23PllUwdXP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Mon, 19 Nov 2007, Yves-Alexis Perez wrote:
> On Mon, Nov 19, 2007 at 02:13:26PM +0000, Henrique de Moraes Holschuh wrote:
> > Send me by private email the dmidecode and acpidump output for your
> > thinkpad, please.  Remove the UUID and serial numbers from the dmidecode
> > output.
> 
> I already did that some time ago. I may resend it this evening if you need it.

Found it.  Sorry for requesting it twice.

> > I know of no thinkpad that reports brightness directly over the KDC, but it
> > is not impossible it might happen.
> 
> What is the KDC?

Keyboard controller (which is just another I/O port for the ThinkPad
embedded controller, really).

> I just tested with no hal, no acpid, no dbus, runnin only xorg+xterm.
> keypresses are reported as soon as thinkpad-acpi is loaded.

Ah, I think I might know what is happening, now.

Someone got a bad patch merged behind my back by sending it directly to
Linus, and it could cause exactly what you describe.

Dammit, I should have recalled that possibility much sooner.

I have sent a fix-up patch to Len Brown, but it has not been merged into
mainline, yet.  Just in case it is what is troubling you, I will attach it
to this message.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

--jRHKVT23PllUwdXP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch

commit 0a26d65914b849bbcc433bc79c78e666e048d23c
Author: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Date:   Sat Nov 17 23:55:14 2007 -0200

    ACPI: thinkpad-acpi: revert keymap changes
    
    Revert commit fba956c46a72f9e7503fd464ffee43c632307e31, "Map volume and
    brightness events on thinkpads".
    
    That commit made some modifications to the default keymaps that cause bad
    behaviour on all IBM ThinkPads if HAL doesn't know to change them into
    passive (on-screen-display only) events.
    
    The proper solution for IBM ThinkPads is to use the _NOTIFY version of the
    key codes for the IBM default map (which are not available in mainline
    yet), and for the Lenovo keymap, it will take some studying of the various
    DSDTs and testing to know the best path (which I will do shortly).
    
    For more data, refer to:
    http://thread.gmane.org/gmane.linux.kernel/591037/focus=591045
    
    Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
    Cc: Jeremy Katz <katzj@redhat.com>

diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index e953276..63b1e26 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
@@ -964,15 +964,15 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
 		KEY_UNKNOWN,	/* 0x0C: FN+BACKSPACE */
 		KEY_UNKNOWN,	/* 0x0D: FN+INSERT */
 		KEY_UNKNOWN,	/* 0x0E: FN+DELETE */
-		KEY_BRIGHTNESSUP,	/* 0x0F: FN+HOME (brightness up) */
+		KEY_RESERVED,	/* 0x0F: FN+HOME (brightness up) */
 		/* Scan codes 0x10 to 0x1F: Extended ACPI HKEY hot keys */
-		KEY_BRIGHTNESSDOWN,	/* 0x10: FN+END (brightness down) */
+		KEY_RESERVED,	/* 0x10: FN+END (brightness down) */
 		KEY_RESERVED,	/* 0x11: FN+PGUP (thinklight toggle) */
 		KEY_UNKNOWN,	/* 0x12: FN+PGDOWN */
 		KEY_ZOOM,	/* 0x13: FN+SPACE (zoom) */
-		KEY_VOLUMEUP,	/* 0x14: VOLUME UP */
-		KEY_VOLUMEDOWN,	/* 0x15: VOLUME DOWN */
-		KEY_MUTE,	/* 0x16: MUTE */
+		KEY_RESERVED,	/* 0x14: VOLUME UP */
+		KEY_RESERVED,	/* 0x15: VOLUME DOWN */
+		KEY_RESERVED,	/* 0x16: MUTE */
 		KEY_VENDOR,	/* 0x17: Thinkpad/AccessIBM/Lenovo */
 		/* (assignments unknown, please report if found) */
 		KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN,
@@ -993,9 +993,9 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
 		KEY_RESERVED,	/* 0x11: FN+PGUP (thinklight toggle) */
 		KEY_UNKNOWN,	/* 0x12: FN+PGDOWN */
 		KEY_ZOOM,	/* 0x13: FN+SPACE (zoom) */
-		KEY_VOLUMEUP,	/* 0x14: VOLUME UP */
-		KEY_VOLUMEDOWN,	/* 0x15: VOLUME DOWN */
-		KEY_MUTE,	/* 0x16: MUTE */
+		KEY_RESERVED,	/* 0x14: VOLUME UP */
+		KEY_RESERVED,	/* 0x15: VOLUME DOWN */
+		KEY_RESERVED,	/* 0x16: MUTE */
 		KEY_VENDOR,	/* 0x17: Thinkpad/AccessIBM/Lenovo */
 		/* (assignments unknown, please report if found) */
 		KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN,

--jRHKVT23PllUwdXP--