Re: [ibm-acpi-devel] ACPI: thinkpad-acpi: react to Lenovo ThinkPad differences in hot key

2007-07-14 Thread Matthew Garrett
On Sat, Jul 14, 2007 at 11:12:09AM -0300, Henrique de Moraes Holschuh wrote: Ah, I see this one fixes some of my comments. However: > + KEY_RESERVED, /* 0x0F: FN+HOME (brightness up) */ > + /* Scan codes 0x10 to 0x1F: Extended ACPI HKEY hot keys */ > + KEY_RE

Re: [ibm-acpi-devel] ACPI: thinkpad-acpi: rename pci HID constant

2007-07-14 Thread Matthew Garrett
On Sat, Jul 14, 2007 at 11:12:04AM -0300, Henrique de Moraes Holschuh wrote: > - .hid = IBM_PCI_HID, > + /* THIS ONE MUST NEVER BE USED FOR DRIVER AUTOLOADING. Some rationale here would be good. There are no known devices where loading ibm-acpi is harmful. -- Matthew Garrett | [EMAIL PR

Re: [ibm-acpi-devel] ACPI: thinkpad-acpi: make the input event mode the default

2007-07-14 Thread Matthew Garrett
On Sat, Jul 14, 2007 at 11:12:00AM -0300, Henrique de Moraes Holschuh wrote: > - KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, > - KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, > - KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, > + KEY_FN_F1, KEY_FN_F2, KE

Re: [ibm-acpi-devel] ACPI: thinkpad-acpi: add input device support to hotkey subdriver

2007-07-14 Thread Matthew Garrett
On Sat, Jul 14, 2007 at 11:11:59AM -0300, Henrique de Moraes Holschuh wrote: > +static u16 hotkey_keycode_map[] = { > + /* Scan Codes 0x00 to 0x0B: ACPI HKEY FN+F1..F12 */ > + KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, > + KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, >

[ibm-acpi-devel] thinkpad-acpi release 0.15-20070714 uploaded to ibm-acpi.sf.net

2007-07-14 Thread Henrique de Moraes Holschuh
I have released version 0.15-20070714 of thinkpad-acpi through the sourceforge.net release system. It contains all the code currently submitted upstream for 2.6.23. I hope to produce a few more patches for 2.6.23, still. Patches are available for 2.6.20, 2.6.21 and 2.6.22 at: http

Re: [ibm-acpi-devel] [ltp] Re: CALL FOR TESTING: thinkpad-acpi BETA release 0.14-20070708

2007-07-14 Thread Michael Olbrich
On Sat, Jul 14, 2007 at 10:20:40AM -0300, Henrique de Moraes Holschuh wrote: > On Tue, 10 Jul 2007, Michael Olbrich wrote: > > brightness: > > keys work. procfs and sysfs are updated correctly. > > setting with procfs works. > > sysfs accepts 30, 40, 50, 60, 70, 80, 90, 100 only. All other values d

Re: [ibm-acpi-devel] [GIT PULL] thinkpad-acpi queue for 2.6.23 (v2)

2007-07-14 Thread Henrique de Moraes Holschuh
Len, I forgot to tell git send-email to number the patches. Sorry about that. The shortlog has the correct patch order listed, and there is also the git branch. Still, if you'd rather I post the batch again with the proper patch ordering in the subject this time, just say so. -- "One disk t

[ibm-acpi-devel] ACPI: thinkpad-acpi: rename pci HID constant

2007-07-14 Thread Henrique de Moraes Holschuh
Rename an internal driver constant, on request by Len Brown. Also, document exactly what it is for. Signed-off-by: Henrique de Moraes Holschuh <[EMAIL PROTECTED]> --- drivers/misc/thinkpad_acpi.c |7 +-- drivers/misc/thinkpad_acpi.h |1 - 2 files changed, 5 insertions(+), 3 deletions

[ibm-acpi-devel] ACPI: thinkpad-acpi: store ThinkPad model information

2007-07-14 Thread Henrique de Moraes Holschuh
Keep note of ThinkPad model, BIOS and EC firmware information, and log it on startup. Makes for far more readable code in places, too. Signed-off-by: Henrique de Moraes Holschuh <[EMAIL PROTECTED]> --- drivers/misc/thinkpad_acpi.c | 98 ++ drivers/misc/t

[ibm-acpi-devel] ACPI: thinkpad-acpi: allow use of CMOS NVRAM for brightness control

2007-07-14 Thread Henrique de Moraes Holschuh
It appears that Lenovo decided to break the EC brightness control interface in a weird way in their latest BIOSes. Fortunately, the old CMOS NVRAM interface works just fine in such BIOSes. Add a module parameter that allows the user to select which strategy to use for brightness control: EC, NVRA

[ibm-acpi-devel] ACPI: thinkpad-acpi: register input device

2007-07-14 Thread Henrique de Moraes Holschuh
Register an input device to send input events to userspace. This patch is based on a patch by Richard Hughes <[EMAIL PROTECTED]>. Signed-off-by: Henrique de Moraes Holschuh <[EMAIL PROTECTED]> Cc: Richard Hughes <[EMAIL PROTECTED]> Cc: Dmitry Torokhov <[EMAIL PROTECTED]> --- drivers/misc/thinkpa

[ibm-acpi-devel] ACPI: thinkpad-acpi: export EV_SW SW_RADIO events

2007-07-14 Thread Henrique de Moraes Holschuh
The expected user case for the radio slider switch on a ThinkPad includes interfacing to applications, so that the user gets an offer to find and associate with a wireless network when the switch is changed from disabled to enabled (ThinkVantage suite). Export the information about the switch stat

[ibm-acpi-devel] ACPI: thinkpad-acpi: checkpoint sysfs interface version due to hotkey

2007-07-14 Thread Henrique de Moraes Holschuh
The change in the size of the hotkey mask, the hability to report the keys that use the higher bits, and the addition of the hotkey_radio_sw attribute are important enough features to warrant increasing the minor field of the sysfs interface version. Also, document a bit better how and when the th

[ibm-acpi-devel] ACPI: thinkpad-acpi: make sure DSDT TMPx readings don't return +128

2007-07-14 Thread Henrique de Moraes Holschuh
We get +128 instead of -128 from the DSDT TMPx methods, due to errors when converting a EC byte return that is a s8 to an ACPI handler return that is an int. Fix it once and for all, by clamping acceptable temperature readings from DSDT TMPx so that anything outside the [-127,+127] range is conver

[ibm-acpi-devel] ACPI: thinkpad-acpi: react to Lenovo ThinkPad differences in hot key

2007-07-14 Thread Henrique de Moraes Holschuh
Lenovo ThinkPads have a slightly different key map layout from IBM ThinkPads (fn+f2 and fn+f3 are swapped). Knowing which one we are dealing with, we can properly set a few more hot keys up by default. Also, export the correct vendor in the input device, as that information might be useful to use

[ibm-acpi-devel] ACPI: thinkpad-acpi: bump up version to 0.15

2007-07-14 Thread Henrique de Moraes Holschuh
Name it thinkpad-acpi version 0.15. Signed-off-by: Henrique de Moraes Holschuh <[EMAIL PROTECTED]> --- Documentation/thinkpad-acpi.txt |8 drivers/misc/thinkpad_acpi.c|2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Documentation/thinkpad-acpi.txt b/Docum

[ibm-acpi-devel] ACPI: thinkpad-acpi: add input device support to hotkey subdriver

2007-07-14 Thread Henrique de Moraes Holschuh
Add input device support to the hotkey subdriver. Hot keys that have a valid keycode mapping are reported through the input layer if the input device is open. Otherwise, they will be reported as ACPI events, as they were before. Scan codes are reported (using EV_MSC MSC_SCAN events) along with E

[ibm-acpi-devel] ACPI: thinkpad-acpi: remove all uneeded initializers

2007-07-14 Thread Henrique de Moraes Holschuh
Remove all initializers to NULL or zero. Signed-off-by: Henrique de Moraes Holschuh <[EMAIL PROTECTED]> --- drivers/misc/thinkpad_acpi.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index 22a5f2

[ibm-acpi-devel] ACPI: thinkpad-acpi: make EC-based thermal readings non-experimental

2007-07-14 Thread Henrique de Moraes Holschuh
Reading the 16 thermal sensors directly from the EC has been stable for about one year, in all supported ThinkPad models. Remove its "experimental" label. Signed-off-by: Henrique de Moraes Holschuh <[EMAIL PROTECTED]> --- Documentation/thinkpad-acpi.txt | 18 +- drivers/misc/th

[ibm-acpi-devel] pci-ids: add Lenovo PCI vendor ID

2007-07-14 Thread Henrique de Moraes Holschuh
thinkpad-acpi wants to differentiate IBM from Lenovo ThinkPads, and the PCI IDs are the best way to go about it for quirk tables and so on. Add the missing Lenovo PCI ID to pci_ids.h. Signed-off-by: Henrique de Moraes Holschuh <[EMAIL PROTECTED]> Cc: Jeff Garzik <[EMAIL PROTECTED]> --- include/l

[ibm-acpi-devel] ACPI: thinkpad-acpi: make the input event mode the default

2007-07-14 Thread Henrique de Moraes Holschuh
Make the input layer the default way to deal with thinkpad-acpi hot keys, but add a kernel config option to retain the old way of doing things. This means we map a lot more keys to useful stuff by default, and also that we enable hot key handling by default on driver load (like Windows does). The

[ibm-acpi-devel] ACPI: thinkpad_acpi: use bool for boolean parameters

2007-07-14 Thread Henrique de Moraes Holschuh
Some of the module parameters are boolean in nature. Make it so in fact. Signed-off-by: Henrique de Moraes Holschuh <[EMAIL PROTECTED]> --- drivers/misc/thinkpad_acpi.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpa

[ibm-acpi-devel] ACPI: thinkpad-acpi: checkpoint sysfs interface version due to input layer

2007-07-14 Thread Henrique de Moraes Holschuh
The change in the way hotkey events are handled by default, and the use of the input layer for the hotkey events are important enough features to warrant increasing the major field of the sysfs interface version. Signed-off-by: Henrique de Moraes Holschuh <[EMAIL PROTECTED]> --- Documentation/thi

[ibm-acpi-devel] ACPI: thinkpad-acpi: add power-management handler capability

2007-07-14 Thread Henrique de Moraes Holschuh
Some subdrivers could benefit from resume handling, so add the infrastructure for simple resume handling. Signed-off-by: Henrique de Moraes Holschuh <[EMAIL PROTECTED]> --- drivers/misc/thinkpad_acpi.c | 16 drivers/misc/thinkpad_acpi.h |1 + 2 files changed, 17 insertions(

[ibm-acpi-devel] ACPI: thinkpad-acpi: enable more hotkeys

2007-07-14 Thread Henrique de Moraes Holschuh
Revise ACPI HKEY functionality to better interface with the firmware, and enable up to 32 regular hotkeys, instead of just 16 of them. Ouch. This takes care of most keys one used to have to do CMOS NVRAM polling on, and should drop the need for tpb, thinkpad-keys, and other such 5Hz NVRAM polling

[ibm-acpi-devel] ACPI: thinkpad-acpi: update CMOS commands documentation

2007-07-14 Thread Henrique de Moraes Holschuh
The CMOS set of commands is often just used to keep the CMOS NVRAM in sync with whatever the ACPI BIOS has been doing in modern ThinkPads. In older ThinkPads, it actually carried out real actions. Document this. Signed-off-by: Henrique de Moraes Holschuh <[EMAIL PROTECTED]> --- Documentation/th

[ibm-acpi-devel] ACPI: thinkpad-acpi: export hotkey maximum masks

2007-07-14 Thread Henrique de Moraes Holschuh
The firmware knows how many hot keys it supports, so export this information in a sysfs attribute. And the driver knows which keys are always handled by the firmware in all known ThinkPad models too, so export this information as well in a sysfs attribute. Unless you know which events need to be

[ibm-acpi-devel] ACPI: thinkpad-acpi: export to sysfs the state of the radio slider switch

2007-07-14 Thread Henrique de Moraes Holschuh
Some ThinkPad models, notably the T60 and X60, have a slider switch to enable and disable the radios. The switch has the capability of force-disabling the radios in hardware on most models, and it is supposed to affect all radios (WLAN, WWAN, BlueTooth). Export the switch state as a sysfs attribu

[ibm-acpi-devel] ACPI: thinkpad-acpi: update information on T43 thermal sensor 0xc1

2007-07-14 Thread Henrique de Moraes Holschuh
Update the documentation with some extra data on the T43 thermal sensor @0xc1, thanks to Alexey Fisher. Signed-off-by: Henrique de Moraes Holschuh <[EMAIL PROTECTED]> --- Documentation/thinkpad-acpi.txt |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/Documentation/think

[ibm-acpi-devel] ACPI: thinkpad-acpi: add DMI-based modalias

2007-07-14 Thread Henrique de Moraes Holschuh
Add DMI-based aliases to allow module autoloading on select thinkpads. The aliases will do nothing unless the dmi-based-module-autoloading.patch patch from Lennart Poettering <[EMAIL PROTECTED]> is applied. Lennart's patch has been accepted by greghk and will be merged eventually. Signed-off-by:

[ibm-acpi-devel] [GIT PULL] thinkpad-acpi queue for 2.6.23 (v2)

2007-07-14 Thread Henrique de Moraes Holschuh
Len, Please pull from: git://repo.or.cz/linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git for-upstream/acpi-test

Re: [ibm-acpi-devel] [ltp] Re: CALL FOR TESTING: thinkpad-acpi BETA release 0.14-20070708

2007-07-14 Thread Henrique de Moraes Holschuh
Hi Peter! On Sat, 14 Jul 2007, Peter Jordan wrote: > Henrique de Moraes Holschuh, 07/14/07 14:17: > > > On Sat, 14 Jul 2007, Peter Jordan wrote: > >>> Model: Lenevo R60 (BIOS: 7CETC6WW[2.16]): brightness- and volume-keys > >>> work under console as well as under X (enligtenment /with(out) tpb) a

Re: [ibm-acpi-devel] [ltp] Re: CALL FOR TESTING: thinkpad-acpi BETA release 0.14-20070708

2007-07-14 Thread Henrique de Moraes Holschuh
On Tue, 10 Jul 2007, Michael Olbrich wrote: > brightness: > keys work. procfs and sysfs are updated correctly. > setting with procfs works. > sysfs accepts 30, 40, 50, 60, 70, 80, 90, 100 only. All other values do > not affect actual_brightness at all. I would expect that the next best > setting is

Re: [ibm-acpi-devel] [ltp] Re: CALL FOR TESTING: thinkpad-acpi BETA release 0.14-20070708

2007-07-14 Thread Peter Jordan
Henrique de Moraes Holschuh, 07/14/07 14:17: > On Sat, 14 Jul 2007, Peter Jordan wrote: >>> Model: Lenevo R60 (BIOS: 7CETC6WW[2.16]): brightness- and volume-keys >>> work under console as well as under X (enligtenment /with(out) tpb) and >>> procfs/sysfs (with acpi_video in kernel). >> followup: >

Re: [ibm-acpi-devel] [ltp] Re: CALL FOR TESTING: thinkpad-acpi BETA release 0.14-20070708

2007-07-14 Thread Henrique de Moraes Holschuh
On Sat, 14 Jul 2007, Peter Jordan wrote: > > Model: Lenevo R60 (BIOS: 7CETC6WW[2.16]): brightness- and volume-keys > > work under console as well as under X (enligtenment /with(out) tpb) and > > procfs/sysfs (with acpi_video in kernel). > > followup: > with this version the thinkpad_acpi hotkeys (

Re: [ibm-acpi-devel] CALL FOR TESTING: thinkpad-acpi BETA release 0.14-20070708

2007-07-14 Thread Michael Olbrich
Hi, I tried to send this before but sourceforge blocked it. So with a bit delay my test results. from dmesg: thinkpad_acpi: ThinkPad ACPI Extras v0.14 thinkpad_acpi: http://ibm-acpi.sf.net/ thinkpad_acpi: ThinkPad BIOS 7FETA0WW (2.18), EC 7FHT26WW-1.08 thinkpad_acpi: Lenovo ThinkPad Z61m thinkpa