summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/asus_acpi.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'ull' into testLen Brown2008-10-221-1/+1
|\ | | | | | | | | | | | | | | | | Conflicts: drivers/acpi/bay.c drivers/acpi/dock.c drivers/ata/libata-acpi.c Signed-off-by: Len Brown <len.brown@intel.com>
| * ACPI: Change acpi_evaluate_integer to support 64-bit on 32-bit kernelsMatthew Wilcox2008-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | As of version 2.0, ACPI can return 64-bit integers. The current acpi_evaluate_integer only supports 64-bit integers on 64-bit platforms. Change the argument to take a pointer to an acpi_integer so we support 64-bit integers on all platforms. lenb: replaced use of "acpi_integer" with "unsigned long long" lenb: fixed bug in acpi_thermal_trips_update() Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | Merge branch 'misc' into testLen Brown2008-10-221-1/+3
|\ \
| * | don't load asus-acpi if model is not supportedZhang Rui2008-10-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | asus_hotk_get_info should return -ENODEV if the model is not supported. http://bugzilla.kernel.org/show_bug.cgi?id=10389 Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
| * | ACPI: catch calls of acpi_driver_data on pointer of wrong typePavel Machek2008-10-101-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | Catch attempts to use of acpi_driver_data on pointers of wrong type. akpm: rewritten to use proper C typechecking and remove the "function"-used-as-lvalue thing. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
* | asus_acpi: whitespace and comment cleanupMike Dahlgren2008-10-171-111/+110
|/ | | | | Signed-off-by: Mike Dahlgren <dahlgren@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
* Remove newline from the description of module parametersNiels de Vos2008-08-011-2/+2
| | | | | | | | | | | | | | | | | | | | Some module parameters with only one line have the '\n' at the end of the description. This is not needed nor wanted as after the description the type (i.e. int) is followed by a newline. Some modules contain a multi-line description, these are not affected by this patch. Signed-off-by: Niels de Vos <niels.devos@wincor-nixdorf.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: John W. Linville <linville@tuxdriver.com> Cc: Ed L. Cashin <ecashin@coraid.com> Cc: Dave Airlie <airlied@linux.ie> Cc: Roland Dreier <rolandd@cisco.com> Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* asus_acpi: remove misleading maskJulia Lawall2008-03-181-1/+1
| | | | | | | | | | | led_out is boolean, so there is no functional change here, but apparently an extra mask with 1 caused some style checkers to flag this as logic bug. Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Luca Tettamanti <kronos.it@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
* asus_acpi: add support for F3SaLuca Tettamanti2008-02-071-10/+45
| | | | | | | | | | | | | | Add support for ASUS F3Sa notebook. Features: - LCD on/off - Brightness - Wifi kill - Bluetooth kill Signed-off-by: Luca Tettamanti <kronos.it@gmail.com> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Karol Kozimor <sziwan@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: Schedule /proc/acpi/event for removalLen Brown2007-08-231-1/+1
| | | | | | | | | | | | Schedule /proc/acpi/event for removal in 6 months. Re-name acpi_bus_generate_event() to acpi_bus_generate_proc_event() to make sure there is no confusion that it is for /proc/acpi/event only. Add CONFIG_ACPI_PROC_EVENT to allow removal of /proc/acpi/event. There is no functional change if CONFIG_ACPI_PROC_EVENT=y Signed-off-by: Len Brown <len.brown@intel.com>
* asus_acpi: fix possible double free (found by Coverity)Jesper Juhl2007-08-031-0/+1
| | | | | Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: autoload modules - Create __mod_acpi_device_table symbol for all ACPI ↵Thomas Renninger2007-07-231-3/+8
| | | | | | | | | | drivers modpost is going to use these to create e.g. acpi:ACPI0001 in modules.alias. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* asus_acpi: fix oops on non-asus machinesMaxime Austruy2007-07-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | If asus_acpi_init doesn't find any device it knows about, it mistakenly returns a "success" error code even though it cleans up after itself. Later when trying to rmmod asus_acpi, the module_exit routine would try to clean up one more time and we would end up calling acpi_bus_unregister_driver(&asus_hotk_driver) twice. This patch addresses this first problem by returning -ENODEV when no appropriate device is found. Then there was also another bug with the code handling the return value of backlight_device_register. If this function ever failed, the driver would cleanup by calling the module_exit routine from module_init, but it would still return "success". So any attempt to rmmod this module would result in asus_acpi_exit being called twice but it's not ready to handle it (I haven't hit this bug, just found it by code inspection). This patch fixes that by inserting a return -ENODEV; at the end of this error handling path. Signed-off-by: Maxime Austruy <maxime@tralhalla.org> Cc: Len Brown <lenb@kernel.org> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* acpi: fix section mismatch warning in asus + toshibaSam Ravnborg2007-06-011-1/+1
| | | | | | | | | | | | | | | | | | | Fix following section mismatch warnings in acpi WARNING: drivers/acpi/asus_acpi.o(.init.text+0xb7): Section mismatch: reference to .exit.text: (after 'init_module') WARNING: o-i386/drivers/acpi/toshiba_acpi.o(.init.text+0x13a): Section mismatch: reference to .exit.text: (after 'init_module') The exit function is used in the init function during an error codition. As __exit may be discarded during link-time / run-time this is no good. Do not mark the exit function __exit. Note: This warning is only seen by my local copy of modpost but the change will soon hit upstream. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* backlight: Separate backlight properties from backlight ops pointersRichard Purdie2007-02-201-3/+3
| | | | | | | | | Per device data such as brightness belongs to the indivdual device and should therefore be separate from the the backlight operation function pointers. This patch splits the two types of data and allows simplifcation of some code. Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
* backlight: Remove unneeded owner fieldRichard Purdie2007-02-201-1/+0
| | | | | | | | | | | | Remove uneeded owner field from backlight_properties structure. Nothing uses it and it is unlikely that it will ever be used. The backlight class uses other means to ensure that nothing references unloaded code. Based on a patch from Dmitry Torokhov <dtor@insightbb.com> Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
* Pull remove-hotkey into release branchLen Brown2007-02-161-4/+0
|\
| * ACPI: hotkey: remove driver, per feature-removal-schedule.txtLen Brown2007-02-161-4/+0
| | | | | | | | Signed-off-by: Len Brown <len.brown@intel.com>
* | Pull fluff into release branchLen Brown2007-02-161-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: arch/x86_64/pci/mmconfig.c drivers/acpi/bay.c Signed-off-by: Len Brown <len.brown@intel.com>
| * | ACPI: fix acpi_driver.name usageLen Brown2007-02-121-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was erroneously used as a description rather than a name. ie. turn this: lenb@se7525gp2:/sys> ls bus/acpi/drivers ACPI AC Adapter Driver ACPI Embedded Controller Driver ACPI Power Resource Driver ACPI Battery Driver ACPI Fan Driver ACPI Processor Driver ACPI Button Driver ACPI PCI Interrupt Link Driver ACPI Thermal Zone Driver ACPI container driver ACPI PCI Root Bridge Driver hpet into this: lenb@se7525gp2:~> ls /sys/bus/acpi/drivers ac battery button container ec fan hpet pci_link pci_root power processor thermal Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: asus_acpi: Add support for Asus Z81SPMatthew C Campbell2007-02-091-1/+13
|/ | | | | | | | | | | | | Adds support in asus_acpi for the Asus Z81SP laptop. This preserves all old functionality when improperly detected as well as enabling Bluetooth support. Signed-off-by: Matthew C Campbell <calvinmc@gmail.com> Acked-by: Corentin Chary <corentincj@iksaif.net> Cc: Karol Kozimor <sziwan@users.sourceforge.net> Cc: <acpi4asus-user@lists.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: minimal patch to integrate new tables into LinuxAlexey Starikovskiy2007-02-021-7/+2
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: replace kmalloc+memset with kzallocBurman Yan2006-12-201-2/+1
| | | | | Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* Pull platform-drivers into test branchLen Brown2006-12-201-1/+1
|\
| * ACPI: video: Add dev argument for backlight_device_registerYu Luming2006-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch set adds generic abstract layer support for acpi video driver to have generic user interface to control backlight and output switch control by leveraging the existing backlight sysfs class driver, and by adding a new video output sysfs class driver. This patch: Add dev argument for backlight_device_register to link the class device to real device object. The platform specific driver should find a way to get the real device object for their video device. [akpm@osdl.org: build fix] [akpm@osdl.org: fix msi-laptop.c] Signed-off-by: Luming Yu <Luming.yu@intel.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* | Pull style into test branchLen Brown2006-12-161-4/+3
|\ \ | |/ |/| | | | | | | | | | | | | Conflicts: drivers/acpi/button.c drivers/acpi/ec.c drivers/acpi/osl.c drivers/acpi/sbs.c
| * ACPI: Remove unnecessary from/to-void* and to-void casts in drivers/acpiJan Engelhardt2006-10-141-4/+3
| | | | | | | | | | Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: asus_acpi: Add support for the generic backlight deviceHolger Macht2006-10-211-16/+46
| | | | | | | | | | | | | | | | | | | | | | | | Add support for the generic backlight interface below /sys/class/backlight. Keep the procfs brightness handling for backward compatibility. [apw@shadowen.org: backlight users need to select BACKLIGHT_CLASS_DEVICE] Signed-off-by: Holger Macht <hmacht@suse.de> Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: asus_acpi: don't printk on writing garbage to proc filesAlexey Dobriyan2006-10-141-9/+1
| | | | | | | | | | | | | | | | This reporting is useless (we errno anyway). Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: asus_acpi: fix proc files parsingDarren Jenkins2006-10-141-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | ICC complains about a "Pointless comparsion of unsigned interger with zero" @ line 760 & 808 of asus_acpi.c parse_arg() mentioned below returns -E but it's copied into unsigned variable... Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: asus_acpi: W3000 supportMarek W2006-10-141-1/+16
|/ | | | | | | | | | | Add support for W3000 (W3V) and indirectly fixes an issue with kmilo under KDE (it was triggering excessive LCD read error messages by querying asus_acpi module) allowing people (I am probably the only one who tested this) with W3000 to run kmilo. Cc: Karol Kozimor <sziwan@hell.org.pl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: asus_acpi: correct M6N/M6R display nodesKarol Kozimor2006-07-011-2/+3
| | | | | | | | | This patch switches back the display nodes for M6R and M6N -- this happened a while ago when a patch was misapplied (only the in-tree version was affected). Signed-off-by: Karol Kozimor <sziwan@hell.org.pl> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: asus_acpi: add S1N WLED controlKarol Kozimor2006-06-301-2/+3
| | | | | | | | This small patch adds back WLED control for S1N models, this was accidentally removed a while ago. Signed-off-by: Karol Kozimor <sziwan@hell.org.pl> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: asus_acpi: rework model detectionKarol Kozimor2006-06-301-90/+93
| | | | | | | | | | | | | | | | | | | | | This patch reworks laptop model detection. This addresses the Samsung P30 issue, where the INIT method would return no object, but the implicit return in the AML interpreter would confuse the driver. It also accounts for a newer batch of Asus models whose INIT returns ACPI_TYPE_BUFFER instead of STRING. The handling is now much leaner, if we get a buffer or a string, we check against known values, in every other case we use a different path (currently DSDT signatures). The bulk of this patch is separating the string matching from asus_hotk_get_info() into a separate function. This patch properly fixes http://bugme.osdl.org/show_bug.cgi?id=5067 and http://bugme.osdl.org/show_bug.cgi?id=5092 and makes the driver fully functional again with acpi=strict on all machines. Signed-off-by: Karol Kozimor <sziwan@hell.org.pl> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: asus_acpi: support L5DKarol Kozimor2006-06-301-3/+7
| | | | | | | | This patch adds support for Asus L5D and thus fixes http://bugme.osdl.org/show_bug.cgi?id=4695 Signed-off-by: Karol Kozimor <sziwan@hell.org.pl> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: asus_acpi: handle internal Bluetooth / support W5AKarol Kozimor2006-06-301-4/+47
| | | | | | | | | | | | | | | | This patch creates a new file named "bluetooth" under /proc/acpi/asus/. This file controls both the internal Bluetooth adapter's presence on the USB bus and the associated LED. echo 1 > /proc/acpi/asus/bluetooth to enable, 0 to disable. Additionally, the patch add support for Asus W5A, the first model that uses this feature. Patch originally by Fernando A. P. Gomes. Signed-off-by: Karol Kozimor <sziwan@hell.org.pl> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: asus_acpi: support A4GKarol Kozimor2006-06-301-0/+13
| | | | | | | | This patch adds support for Asus A4G. Originally by Giuseppe Rota. Signed-off-by: Karol Kozimor <sziwan@hell.org.pl> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: asus_acpi: support W3400NKarol Kozimor2006-06-301-4/+6
| | | | | | | This patch adds support for Asus W3400N. Signed-off-by: Karol Kozimor <sziwan@hell.org.pl> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: asus_acpi: LED display supportKarol Kozimor2006-06-301-6/+63
| | | | | | | | | | This patch adds handling for front LED displays found on W1N and the like. Additionally, W1N is given its own model_data instance. Patch originally by Éric Burghard. Signed-off-by: Karol Kozimor <sziwan@hell.org.pl> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: asus_acpi: support A3GKarol Kozimor2006-06-301-2/+6
| | | | | | | This patch adds support for Asus A3G. Signed-off-by: Karol Kozimor <sziwan@hell.org.pl> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: asus_acpi: misc cleanupsKarol Kozimor2006-06-301-20/+7
| | | | | | | | This patch updates the version string, copyright notices and does whitespace cleanup (it looks weird, blame Lindent). Signed-off-by: Karol Kozimor <sziwan@hell.org.pl> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: delete acpi_os_free(), use kfree() directlyLen Brown2006-06-301-3/+3
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: asus_acpi_init: propagate correct return valueAndrew Morton2006-06-271-1/+1
| | | | | | | Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Acked-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* Pull trivial2 into release branchLen Brown2006-06-151-1/+1
|\
| * ACPI: asus_acpi_init(): propagate correct return valueAndrew Morton2006-05-151-1/+1
| | | | | | | | | | | | | | Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Acked-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* | Pull acpi_bus_register_driver into release branchLen Brown2006-06-151-1/+17
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: drivers/acpi/asus_acpi.c drivers/acpi/scan.c
| * | ACPI: update asus_acpi driver registration to unload on failureBjorn Helgaas2006-04-011-1/+17
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the assumption that acpi_bus_register_driver() returns the number of devices claimed. Returning the count is unreliable because devices may be hot-plugged in the future (admittedly not applicable for this driver). Since the hardware for this driver is not hot-pluggable, determine whether the hardware is present by noticing calls to the .add() method. It would be better to probe the ACPI namespace for the ASUS HIDs, and load the driver only when we find one, but ACPI doesn't support that yet. I don't have an ASUS laptop to test on, but on my HP dl360, it does report the appropriate error when attempting to load the module: $ sudo insmod drivers/acpi/asus_acpi.ko insmod: error inserting 'drivers/acpi/asus_acpi.ko': -1 No such device Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* | Pull trivial1 into release branchLen Brown2006-06-151-5/+5
|\ \
| * | ACPI: remove __init/__exit from Asus .add()/.remove() methods Bjorn Helgaas2006-04-011-5/+5
| |/ | | | | | | | | | | | | | | | | | | | | Even though the devices claimed by asus_acpi.c can not be hot-plugged, the driver registration infrastructure allows the .add() and .remove() methods to be called at any time while the driver is registered. So remove __init and __exit from them. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ACPICA 20060421Bob Moore2006-06-141-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed a device initialization optimization introduced in 20051216 where the _STA method was not run unless an _INI was also present for the same device. This optimization could cause problems because it could allow _INI methods to be run within a not-present device subtree (If a not-present device had no _INI, _STA would not be run, the not-present status would not be discovered, and the children of the device would be incorrectly traversed.) Implemented a new _STA optimization where namespace subtrees that do not contain _INI are identified and ignored during device initialization. Selectively running _STA can significantly improve boot time on large machines (with assistance from Len Brown.) Implemented support for the device initialization case where the returned _STA flags indicate a device not-present but functioning. In this case, _INI is not run, but the device children are examined for presence, as per the ACPI specification. Implemented an additional change to the IndexField support in order to conform to MS behavior. The value written to the Index Register is not simply a byte offset, it is a byte offset in units of the access width of the parent Index Field. (Fiodor Suietov) Defined and deployed a new OSL interface, acpi_os_validate_address(). This interface is called during the creation of all AML operation regions, and allows the host OS to exert control over what addresses it will allow the AML code to access. Operation Regions whose addresses are disallowed will cause a runtime exception when they are actually accessed (will not affect or abort table loading.) Defined and deployed a new OSL interface, acpi_os_validate_interface(). This interface allows the host OS to match the various "optional" interface/behavior strings for the _OSI predefined control method as appropriate (with assistance from Bjorn Helgaas.) Restructured and corrected various problems in the exception handling code paths within DsCallControlMethod and DsTerminateControlMethod in dsmethod (with assistance from Takayoshi Kochi.) Modified the Linux source converter to ignore quoted string literals while converting identifiers from mixed to lower case. This will correct problems with the disassembler and other areas where such strings must not be modified. The ACPI_FUNCTION_* macros no longer require quotes around the function name. This allows the Linux source converter to convert the names, now that the converter ignores quoted strings. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
OpenPOWER on IntegriCloud