Commit Graph

24 Commits (af4c293ffcdd76fc97469beb7d8861662232d92e)

Author SHA1 Message Date
Len Brown 955ba39561 Merge branch 'bugfixes' into test 2008-10-22 23:19:50 -04:00
Lin Ming 08237974af ACPI: replace AE_BAD_ADDRESS exception code with AE_ERROR
The AE_BAD_ADDRESS exception code is now unused in ACPICA.
For linux, it's only used at wmi.c and acer-wmi.c.
I checked both wmi.c and acer-wmi.c, the AE_BAD_ADDRESS exception code
has no special meaning. The parent functions just call AE_SUCCESS() or
AE_FAILURE() to check the return status.
So it's safe to replace AE_BAD_ADDRESS with AE_ERROR.

Signed-off-by Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-10-22 17:56:40 -04:00
Carlos Corbacho ae3a1b4609 acer-wmi: Remove private workqueue
As per Dmitry Torokhov's suggestion, acer-wmi doesn't need a private
workqueue, so remove it.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-10-10 23:59:37 -04:00
Carlos Corbacho 7d9a06de61 acer-wmi: Remove wireless and bluetooth sysfs entries
These are now replaced by the rfkill interface.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-10-08 16:56:04 -04:00
Carlos Corbacho 0606e1abfc acer-wmi: Add rfkill support for wireless and bluetooth
This patch implements rfkill support for the wireless and bluetooth devices
commonly found on Acer laptops.

For now, we will always poll these devices once a second to guarantee we
can catch state changes. On newer Acer laptops, it may be possible to rely
on WMI events to do this instead, and experimental support for this will be
added in a later patch.

3G has been deliberately left off for now, as we still have no way to
detect it, (nor, AFAIK, has any Linux user tried the code) and on laptops
that don't support 3G, trying to poll for the status will leave the logs
full of ACPI tracebacks.

The old sysfs interface for wireless and bluetooth will be removed in a
later patch.

(Thanks to Henrique de Moraes Holschuh and Dmitry Torokhov for reviewing
this patch).

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-10-08 16:55:45 -04:00
Russ Dill 39dbbb4523 acer-wmi: remove debugfs entries upon unloading
The exit function neglects to remove debugfs entries, leading to a BUG
on reload.

[akpm@linux-foundation.org: cleanups]
Signed-off-by: Russ Dill <Russ.Dill@gmail.com>
Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-09-02 19:21:37 -07:00
Arjan van de Ven 83097aca85 Fix oops in acer_wmi driver (acer_wmi_init)
The acer_wmi driver does a DMI scan for quirks, and then sets flags into the
"interface" datastructure for some cases. However, the quirks happen real early
before "interface" is per se initialized from NULL.

The patch below 1) adds a NULL pointer check and 2) (re)runs the quirks at the
end, when "interface" has it's final value.

Reported-by: kerneloops.org
Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
CC: stable@vger.kernel.org
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-23 21:54:00 -07:00
Carlos Corbacho 5c742b45dd acer-wmi: Fix wireless and bluetooth on early AMW0 v2 laptops
In the old acer_acpi, I discovered that on some of the newer AMW0 laptops
that supported the WMID methods, they don't work properly for setting the
wireless and bluetooth values.

So for the AMW0 V2 laptops, we want to use both the 'old' AMW0 and the
'new' WMID methods for setting wireless & bluetooth to guarantee we always
enable it.

This was fixed in acer_acpi some time ago, but I forgot to port the patch
over to acer-wmi when it was merged.

(Without this patch, early AMW0 V2 laptops such as the Aspire 5040 won't
work with acer-wmi, where-as they did with the old acer_acpi).

AK: fix compilation

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
CC: stable@kernel.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
2008-08-15 02:27:01 +02:00
Carlos Corbacho 860f0c6b3d acer-wmi: Remove version number
It doesn't make much sense these days.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
2008-07-16 23:27:02 +02:00
Carlos Corbacho 81143522aa acer-wmi: Add debugfs file for device detection
Add a debugfs file for showing the full results of the method we use to
detect devices on WMID laptops.

This should be useful in the case that a Linux user gets an Acer laptop
with 3G support (and/ or people who enjoy ripping their wireless cards out)
so we can get some feedback on how this value changes in these cases.

(At the moment, we always enable the wireless and 3G control. In the case
of the former, this is fairly safe. In the case of the latter though,
trying to toggle this device if it doesn't exist on a laptop causes ACPI
warnings/ errors).

To summarise: If you have an Acer laptop with a built in 3G card, please
report back the value from this file.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
2008-07-16 23:27:02 +02:00
Carlos Corbacho 5753dd539a acer-wmi: Disable device autodetection on Fujitsu Siemens Amilo Li2732
The AMW0 (V1) device detection method doesn't work properly on this laptop,
so disable it, and for other laptops that may have this problem, by
switching on a strange GUID.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
2008-07-16 23:27:02 +02:00
Carlos Corbacho 6f061ab5e5 acer-wmi: Add EC quirk for Fujitsu Siemens Amilo Li 1718
This laptop needs a different EC quirk from the standard Acer one to read
the wireless status.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
2008-07-16 23:27:02 +02:00
Carlos Corbacho f2b585b4a3 acer-wmi: Respect framebuffer blanking in backlight
If the framebuffer has requested blanking, turn the backlight down. Also
offer the user the option to do this.

Reported-by: Michal Pecio <michal.pecio@gmail.com>
Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
2008-07-16 23:27:02 +02:00
Carlos Corbacho 9991d9f2bc acer-wmi: Blacklist backlight on Acer Aspire 1520 & 1360 series
A newer BIOS for these laptops adds ACPI-WMI support to them. However, it does
not add support for the backlight via the EC, and we have no way to detect
this on older machines, so blacklist it from them.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
2008-07-16 23:27:02 +02:00
Len Brown b4de123a0b Merge branches 'release', 'ejd', 'sony' and 'wmi' into release 2008-03-13 01:59:52 -04:00
Len Brown c523aef0f7 Merge branches 'release', 'button-sysfs', 'misc', 'mismatch', 'randconfig' and 'toshiba' into release 2008-03-13 01:59:49 -04:00
Carlos Corbacho ed9cfe9805 acer-wmi: Add DMI quirk for mail LED support on Acer Aspire 3610/ 5610
Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-03-12 16:25:02 -04:00
Carlos Corbacho 8d039bc7f3 acer-wmi: Make device detection error messages more descriptive
The current device detection error messages are all copy & pasted - make
them more descriptive so it's easier to see where in the code a problem
occurs.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-03-12 16:24:12 -04:00
Carlos Corbacho 9b963c4030 acer-wmi: Don't warn if mail LED cannot be detected
This warning confuses users, who think it is an error. Not detecting the
mail LED simply means it isn't there, so let's not unduly panic users.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-03-11 17:58:22 -04:00
Carlos Corbacho 343c00422d acer-wmi: Rename mail LED correctly & remove hardcoded colour
The mail LED name for acer-wmi currently hardcodes in the colour as green.
This is wrong, since many of the newer laptops now come with an orange
LED, and we have no way of telling what colour is used on a given system.

Also, rename the mail LED to be inline with the current recommendations of
the LED class documentation.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-03-11 17:53:24 -04:00
Sam Ravnborg 7560e38565 acer-wmi: fix section mismatch warnings
Fix following warnings:
WARNING: vmlinux.o(.text+0x672615): Section mismatch in reference from the function acer_platform_remove() to the function .exit.text:acer_backlight_exit()
WARNING: vmlinux.o(.devinit.text+0x1e859): Section mismatch in reference from the function acer_platform_probe() to the function .init.text:acer_led_init()
WARNING: vmlinux.o(.devinit.text+0x1e878): Section mismatch in reference from the function acer_platform_probe() to the function .init.text:acer_backlight_init()

Remove __exit annotation from acer_backlight_exit(). We cannot reference
a __exit annotated function from non __exit functions.

acer_led_init() and acer_backlight_init() where both annotated __init but
used from a __devinit function. This would result in an oops should
gcc drop their inlining and the module are hot plugged.

Fix by annotating acer_led_init() and acer_backlight_init() __devinit.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-21 02:55:53 -05:00
Carlos Corbacho 262ee35be6 acer-wmi: Add DMI match for mail LED on Acer TravelMate 4200 series
The TM4200 series use the same method as the TM2490 series to control the
mail LED, so add a DMI based quirk for these laptops.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-16 00:47:13 -05:00
Carlos Corbacho 4609d029aa acer-wmi: Fix backlight on AMW0 (V1) laptops
There is some leftover cruft from the old quirk infrastructure that causes
us to be unable to set the backlight on older laptops.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-09 03:29:33 -05:00
Carlos Corbacho 745a5d2126 acer-wmi: Add driver for newer Acer laptops
This is a driver for newer Acer (and Wistron) laptops. It adds wireless
radio and bluetooth control, and on some laptops, exposes the mail LED and
LCD backlight.

v1:

* Initial release

v2:

* Replace left over ACPI references with WMI
* Add GUID based autoloading (depends on future work to WMI)
* Add DMI based autoloading (backup solution until WMI sysfs/ class
  work is available)
* Checkpatch fixes

v3:

* Add new EC quirks for Aspire 3100 & 5100, and Extensa 5220

v4:

* Simplified internal handling of WMID and AMW0 devices
* Add autodetection for bluetooth and maximum brightness on AMW0 V2 and
  WMID laptops.

v5:

* Add EC quirk for Medion MD 98000
* Add autodetection for AMW0, and mail LED on AMW0 and AMW0 V2.
* Improve error handling
* Fix AMW0 V2 bluetooth and wireless, by using both WMID and AMW0 methods
  to ensure that the correct value is always set.

v6:

* Fix 'use before initialisation' bug with quirks.

v7

* Fix bug on AMW0 where acer-wmi would exit if a mail LED was not
  detected.
* Add Acer Aspire 9110 mail LED support
* Fix section mismatch warnings

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
CC: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-05 15:07:00 -05:00