ideapad-laptop is a new driver which enable hotkeys on Lenovo Ideapad laptops The driver will bind on ACPI HID:VPC2004. When hotkey pressed, the notify function will be called and query EC to tell which key pressed. Hotkeys enabled listed below: * LCD backlight switch - reports KEY_DISPLAY_OFF * One key restore - reports KEY_PROG1 * Brightness Up/down - reports KEY_BRIGHTNESS_CYCLE Both up/down keys reports the same event. Need to find other way to detect * Touchpad switch - reports KEY_F13 * Video output switch - reports KEY_SWITCHVIDEOMODE * Camera switch - reports KEY_CAMERA * Video resolution switch - reports KEY_VIDEO_NEXT * S/W rfkill key - reports KEY_WLAN The developing git tree as reference: git://kernel.ubuntu.com/ikepanhc/ideapad-laptop.git This patch made against current checkout of mainline kernel. Signed-off-by: Ike Panhc <ike.pan@canonical.com> --- drivers/platform/x86/Kconfig | 11 + drivers/platform/x86/Makefile | 1 + drivers/platform/x86/ideapad-laptop.c | 398 +++++++++++++++++++++++++++++++++ 3 files changed, 410 insertions(+), 0 deletions(-) create mode 100644 drivers/platform/x86/ideapad-laptop.c diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig index 79baa63..e9a203d 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig @@ -581,4 +581,15 @@ config INTEL_IPS functionality. If in doubt, say Y here; it will only load on supported platforms. +config IDEAPAD_LAPTOP + tristate "Ideapad Laptop Extras" + depends on ACPI + depends on INPUT + select INPUT_SPARSEKMAP + ---help--- + This is the ACPI extra Linux driver for ideapad laptops which enable + ACPI event based hotkey. + + If you have an Ideapad laptop, say Y or M here. + endif # X86_PLATFORM_DEVICES diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile index 4744c77..47ca2b9 100644 --- a/drivers/platform/x86/Makefile +++ b/drivers/platform/x86/Makefile @@ ...
Cool, now we got two ideapad drivers :p. David just sent an rfkill driver to this list. Maybe you could merge your work ? Thanks, -- Corentin Chary http://xf.iksaif.net --
Could you point me where is the rfkill driver? Sorry I do not find it. I will see what I can do. Thanks. --
Here is the thread http://thread.gmane.org/gmane.linux.drivers.platform.x86.devel/471 -- Corentin Chary http://xf.iksaif.net --
Yes, I believe I can. will read patch from David and merge. But I think i will not use \_SB_.SECN as major interface. I know there is another command code of EC that can access HW switch status and shutdown the interface. --
git://git.infradead.org/users/dwmw2/ideapad-2.6.git http://git.infradead.org/users/dwmw2/ideapad-2.6.git After fixing Corentin's review feedback and conferring with Matthew, I asked Linus to pull it last night -- without the rfkill support, people were having to reinstall Windows and use it to unblock the rfkill and get wireless working. http://bugs.meego.com/show_bug.cgi?id=4086 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/577114 http://forums.lenovo.com/t5/Linux-Discussion/Solution-to-rfkill-wireless-problems-w-Id... -- David Woodhouse Open Source Technology Centre David.Woodhouse@intel.com Intel Corporation --
Hm, interesting. What model (and BIOS version) are you testing with? On my S10-3, (DMI BIOS version 2ACN23WW, date 03/12/2010), I get these keys through the normal keyboard controller -- and we can tell the brightness up/down apart, too. http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h=9cd075e3 Do you see those keycodes too... and do they *stop* arriving through the keyboard controller when you load your driver? -- David Woodhouse Open Source Technology Centre David.Woodhouse@intel.com Intel Corporation --
I have two machine, B550 and S10-3, the BIOS date/version of S10-3 is the Yes, IIRC EC will send i8042 keycode when you booting with QS button, not with power button. atkbd.c reports unknown key after booting with QS button. --
That's interesting. I don't *ever* boot with the QS button; I get the keycodes when I boot normally. I tried the QS button precisely once, but only *after* I blew away the original contents of the hard drive with my MeeGo installation, so it didn't boot. Do you know how to restore it? Or do you have a copy of the 'lenovo-ec' module that it apparently contains? I did keep the Windows restore partition, just in case I needed to go back to it to get wireless working. But when I tried to recover, it told me it didn't like my partition table -- so I fixed that and next time I booted into the OS recovery, it just dumped me at a command prompt and didn't even manage to start the graphical recovery tool. -- David Woodhouse Open Source Technology Centre David.Woodhouse@intel.com Intel Corporation --
No, I received the ideapads without any OS preinstalled, and get the design spec with NDA. I asked and got the approve to send the driver to mainline kernel according to the spec. Since your driver is pulled. I am happy to have another patch made against your driver and post again. --
Cool. I'd like to have a copy of that spec. Please could you tell me who in Lenovo (presumably) I should contact? -- David Woodhouse Open Source Technology Centre David.Woodhouse@intel.com Intel Corporation --
If you merge the drivers, I'd sure prefer the name "ideapad-laptop" over "ideapad-acpi". While the maintainerless "toshiba-acpi" driver was a pioneer, and thinkpad-acpi feared installed-base confusion when considering a name change, we tend to reserve the "acpi" in drivers for things that supply ACPI, rather than simply use ACPI. Also, you may find that the platform driver ends up doing more for the laptop than just using what is behind its platform-specific ACPI extension. thanks, Len Brown, Intel Open Source Technology Center --
Hello David, I do have that module: I coaxed it out of Lenovo with the help of gpl-violations.org as no source was available on my S10-3t. Since it is flagged as Dual BSD/GPL license, there should be no harm in posting it here. I hope it helps you in some way. Florian
Hello David, I do have that module: I coaxed it out of Lenovo with the help of gpl-violations.org as no source was available on my S10-3t. Since it is flagged as Dual BSD/GPL license, there should be no harm in posting it here. I hope it helps you in some way. Florian
| Greg KH | Og dreams of kernels |
| Jens Axboe | [PATCH 31/33] Fusion: sg chaining support |
| Arnd Bergmann | Re: finding your own dead "CONFIG_" variables |
| Mark Brown | [PATCH 2/2] Subject: natsemi: Allow users to disable workaround for DspCfg reset |
| Tony Breeds | [LGUEST] Look in object dir for .config |
git: | |
| Brian Downing | Re: Git in a Nutshell guide |
| John Benes | Re: master has some toys |
| Matthias Lederhofer | [PATCH 4/7] introduce GIT_WORK_TREE to specify the work tree |
| Alexander Sulfrian | [RFC/PATCH] RE: git calls SSH_ASKPASS even if DISPLAY is not set |
| Junio C Hamano | Re: Rss produced by git is not valid xml? |
| Linux Kernel Mailing List | iSeries: fix section mismatch in iseries_veth |
| Linux Kernel Mailing List |
