Picon
Favicon

[GIT PATCH] thinkpad-acpi changes targeted at 2.6.23-rc6


Len,

The two patches that follow this email update thinkpad-acpi userspace
interface into a much friendlier shape, taking advantage of the new
netlink functionality in the ACPI core.

Please send them to Linus ASAP for merging, so that they get included in
2.6.23.  That will make my life (and HAL's, as well as the user's) a lot
easier...  The solution currently in mainline is not nearly as nice and
transparent as the one in these patches.

As usual, these patches are available for git pull from:
git://repo.or.cz/linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git for-upstream/acpi-release

Shortlog follows:

Henrique de Moraes Holschuh (3):
      ACPI: event: fix acpi_bus_generate_netlink_event call
      		(the above patch was sent separately)
      ACPI: thinkpad-acpi: always enable input layer, add hotkey_report_mode
      ACPI: thinkpad-acpi: bump up version to 0.16

--

-- 
  "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
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
(Continue reading)

Picon
Favicon

[PATCH] ACPI: thinkpad-acpi: bump up version to 0.16

Name it thinkpad-acpi version 0.16 to avoid any confusion with some
0.15 development snapshots that had input layer support, but no
hotkey_report_mode.

Signed-off-by: Henrique de Moraes Holschuh <hmh <at> hmh.eng.br>
---
 Documentation/thinkpad-acpi.txt |    4 ++--
 drivers/misc/thinkpad_acpi.c    |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/thinkpad-acpi.txt b/Documentation/thinkpad-acpi.txt
index 6d2d9ab..277cb31 100644
--- a/Documentation/thinkpad-acpi.txt
+++ b/Documentation/thinkpad-acpi.txt
 <at>  <at>  -1,7 +1,7  <at>  <at> 
 		     ThinkPad ACPI Extras Driver

-                            Version 0.15
-                           July 1st, 2007
+                            Version 0.16
+                          August 2nd, 2007

                Borislav Deianov <borislav <at> users.sf.net>
              Henrique de Moraes Holschuh <hmh <at> hmh.eng.br>
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index 3d849d1..0222bba 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
 <at>  <at>  -21,7 +21,7  <at>  <at> 
  *  02110-1301, USA.
(Continue reading)

Picon
Favicon

[PATCH] ACPI: thinkpad-acpi: always enable input layer, add hotkey_report_mode

Now that ACPICA can send events over netlink, we can use a different
strategy to keep backwards compatibility with older userspace, without the
need for the CONFIG_THINKPAD_ACPI_INPUT_ENABLED games.  And it arrived
before the CONFIG_THINKPAD_ACPI_INPUT_ENABLED stuff made it to a stable
mainline kernel, even, which is Good.

Hotkey events are always sent to the input devices, and never sent to the
netlink device.  A new module parameter is added: hotkey_report_mode, that
selects whether events are sent to the (now) legacy ACPI procfs event
socket: 0 default mode; 1 - issue hot key events over procfs; 2 - do not
issue hot key events over procfs.

The default mode is "issue hot key events" in 2.6.23 and later.  It is
"runtime selectable" in driver backports to kernels that lack the ACPI
netlink device.

The way hot keys are being reported is available through the sysfs
attribute hotkey_report_mode.  This attribute is read-only on 2.6.23, but
driver backports to legacy kernels that do not have the netlink support
may select a "runtime selectable" mode (which is the default).  It returns
1 or 2, as per its namesake module parameter.

Hot key events will always go to the legacy procfs event interface and the
input layer.  Non-hot key events go to the new netlink event interface, and
the legacy procfs event interface.

Hot key handling will be unconditionally enabled at driver load, along with
the best possible mask.  This follows the Windows behaviour.  Users can
modify hot key handling state it at runtime, or at load time by using the
hotkey=disable module parameter.
(Continue reading)

Len Brown | 3 Sep 2007 23:15

Re: [PATCH] ACPI: thinkpad-acpi: always enable input layer, add hotkey_report_mode

Henrique,
I may be seriously jet-lagged right now,
but I'm having trouble parsing this check-in comment
and the the Documentation update, so I'm not
clear on what you're trying to do with this code.

It should basically say:

hotkeys are reported through the input layer,
and /proc/acpi/event when CONFIG_ACPI_PROC_EVENT=y

all other events are reported via netlink,
and /proc/acpi/event when CONFIG_ACPI_PROC_EVENT=y

And if you need to add a flag to eliminate duplicate
reporting, so be it.

But I'm totally confused why there is any mention of netlink
in any of this text -- for if this patch is really
specific to hotkey events, then no version of any
kernel should send hotkey events via netlink,
and no version of HAL should listen for hotkey
events on netlink.

thanks,
-Len

ps.
For me to apply a patch post -rc5,
it really has to be a bug fix -- preferably fixing a regression.
(Continue reading)

Picon
Favicon

Re: [PATCH] ACPI: thinkpad-acpi: always enable input layer, add hotkey_report_mode

On Mon, 03 Sep 2007, Len Brown wrote:
> I may be seriously jet-lagged right now,
> but I'm having trouble parsing this check-in comment
> and the the Documentation update, so I'm not
> clear on what you're trying to do with this code.

Sounds like at the very least I need to be more clear on both, then :)

The idea is this:

1. I want old userspace to just work with thinkpad-acpi (old userspace uses
ACPI via procfs, and ignores the thinkpad-acpi input devices, but does open
them for some dumbass reason).   This means I must send every event over the
ACPI procfs interface by default.

2. I want new userspace to just work, but using input devices and netlink.
This means I must not send any events that go over the input device also to
the netlink ACPI event interface.

(and, here's what causes the need for the patch):

3. I want to give userspace a way to allow it to use input devices and also
the ACPI procfs interface, because thinkpad-acpi backports to 2.6.20, 2.6.21
and 2.6.22 are really popular.   This means I need to let userspace tell
thinkpad-acpi to NOT send every event over the procfs interface.

> hotkeys are reported through the input layer,
> and /proc/acpi/event when CONFIG_ACPI_PROC_EVENT=y

It does this by default.
(Continue reading)

Picon
Favicon

[PATCH 1/2] ACPI: thinkpad-acpi: revert new 2.6.23 CONFIG_THINKPAD_ACPI_INPUT_ENABLED option

Revert new 2.6.23 CONFIG_THINKPAD_ACPI_INPUT_ENABLED Kconfig option because
it would create a legacy we don't want to support.

CONFIG_THINKPAD_ACPI_INPUT_ENABLED was added to try to fix an issue that is
now moot with the addition of the netlink ACPI event report interface to
the ACPI core.

Now that ACPI core can send events over netlink, we can use a different
strategy to keep backwards compatibility with older userspace, without the
need for the CONFIG_THINKPAD_ACPI_INPUT_ENABLED games.  And it arrived
before CONFIG_THINKPAD_ACPI_INPUT_ENABLED made it to a stable mainline
kernel, even, which is Good.

This patch is in sync with some changes to thinkpad-acpi backports, that
will keep things sane for userspace across different combinations of kernel
versions, thinkpad-acpi backports (or the lack thereof), and userspace
capabilities:

Unless a module parameter is used, thinkpad-acpi will now behave in such a
way that it will work well (by default) with userspace that still uses only
the old ACPI procfs event interface and doesn't care for thinkpad-acpi
input devices.

It will also always work well with userspace that has been updated to use
both the thinkpad-acpi input devices, and ACPI core netlink event
interface, regardless of any module parameter.

The module parameter was added to allow thinkpad-acpi to work with
userspace that has been partially updated to use thinkpad-acpi input
devices, but not the new ACPI core netlink event interface.  To use this
(Continue reading)

Picon
Favicon

[PATCH 2/2] ACPI: thinkpad-acpi: bump up version to 0.16

Name it thinkpad-acpi version 0.16 to avoid any confusion with some 0.15
thinkpad-acpi development snapshots and backports that had input layer
support, but no hotkey_report_mode support.

Signed-off-by: Henrique de Moraes Holschuh <hmh <at> hmh.eng.br>
---
 Documentation/thinkpad-acpi.txt |    4 ++--
 drivers/misc/thinkpad_acpi.c    |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/thinkpad-acpi.txt b/Documentation/thinkpad-acpi.txt
index ca89711..60953d6 100644
--- a/Documentation/thinkpad-acpi.txt
+++ b/Documentation/thinkpad-acpi.txt
 <at>  <at>  -1,7 +1,7  <at>  <at> 
 		     ThinkPad ACPI Extras Driver

-                            Version 0.15
-                           July 1st, 2007
+                            Version 0.16
+                          August 2nd, 2007

                Borislav Deianov <borislav <at> users.sf.net>
              Henrique de Moraes Holschuh <hmh <at> hmh.eng.br>
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index 3d849d1..0222bba 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
 <at>  <at>  -21,7 +21,7  <at>  <at> 
  *  02110-1301, USA.
(Continue reading)

Picon
Favicon

[GIT PATCH] thinkpad-acpi changes targeted at 2.6.23-rc6 (v2)


Len,

Here is a new version of the patches for thinkpad-acpi that I'd like to
see merged in mainline before 2.6.23-rc6 is out.  There were *no* code
chages since the last version.  I have updated the patch comments and
title as you suggested, and also made some changes to the thinkpad-acpi
documentation in the patch.

As usual, it is available at:
git://repo.or.cz/linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git for-upstream/acpi-release                                                                  

Shortlog of the above branch:
Henrique de Moraes Holschuh (3):
      ACPI: event: fix acpi_bus_generate_netlink_event call
      ACPI: thinkpad-acpi: revert new 2.6.23 CONFIG_THINKPAD_ACPI_INPUT_ENABLED option
      ACPI: thinkpad-acpi: bump up version to 0.16

--

-- 
  "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
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Jeremy Jackson | 4 Sep 2007 17:53

Re: T30 bluetooth regression 2.6.20 -> 2.6.22

On Thu, 2007-08-02 at 23:49 -0300, Henrique de Moraes Holschuh wrote:
> On Thu, 02 Aug 2007, Jeremy Jackson wrote:
> > Is there an acpi table patch I should be (creating and) appliying, for a
> > cleaner fix?
> 
> You can get the DSDTs from the *latest* T42 BIOS or T43 BIOS, compare it
> with your T30, and try to enhance the T30's.
> 
> Be *very* conservative while doing it, one small step at a time.  Maybe that
> could give you all the hotkeys a T43 has, for example ;-)  Depends on the EC
> firmware, really.
> 

Ok, I've compared 2.6.20 vs 2.6.22, and there is an added test for the
bluetooth capability reported by ACPI DSDT... it now checks for module
present/enabled/unknown problem status.... and the T30 doesn't recognize
the Bluetooth III module I have "hacked" into the system.  It prints a
warning at bootup, "more than one ethernet device present, remove and
restart", and waits until I hit Escape to continue.

So my problem really is, that my hardware/BIOS combination is broken,
and thinkpad_acpi just recently started checking that.

I was able to patch my DSDT, forcing bluetooth to "installed, disabled"
status unconditionally, causing thinkpad_acpi to create the sysfs
file /sys/devices/platform/thinkpad_acpi/bluetooth_enable and after
"echo 1 > bluetooth_enable", everything works like before.

Seeing as this is a hacked setup, I think it's best that I post the DSDT
patch to Thinkwiki.org, as there are other BIOS hacks/mods there for
(Continue reading)

Len Brown | 4 Sep 2007 23:25

Re: [GIT PATCH] thinkpad-acpi changes targeted at 2.6.23-rc6 (v2)

On Tuesday 04 September 2007 10:13, you wrote:
> 
> Len,
> 
> Here is a new version of the patches for thinkpad-acpi that I'd like to
> see merged in mainline before 2.6.23-rc6 is out.  There were *no* code
> chages since the last version.  I have updated the patch comments and
> title as you suggested, and also made some changes to the thinkpad-acpi
> documentation in the patch.
> 
> As usual, it is available at:
> git://repo.or.cz/linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git for-upstream/acpi-release                                                                  
> 
> Shortlog of the above branch:
> Henrique de Moraes Holschuh (3):
>       ACPI: event: fix acpi_bus_generate_netlink_event call
>       ACPI: thinkpad-acpi: revert new 2.6.23 CONFIG_THINKPAD_ACPI_INPUT_ENABLED option
>       ACPI: thinkpad-acpi: bump up version to 0.16
> 

thanks for updating this, Henrique, it is a big improvement.
I'll apply it to my release branch.

-Len
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

(Continue reading)


Gmane