summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/dock.c
Commit message (Collapse)AuthorAgeFilesLines
* ACPI: dock: Send key=value pair instead of plain valueHolger Macht2007-08-111-3/+3
| | | | | | | | | | | | Send key=value pair along with the uevent instead of a plain value so that userspace (udev) can handle it like common environment variables. Signed-off-by: Holger Macht <hmacht@suse.de> Acked-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Cc: Stephan Berberig <s.berberig@arcor.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: dock: fix oops when _DCK evaluation failsDmitry Torokhov2007-07-181-4/+4
| | | | | | | | | | | | | Data returned by acpi_get_name in acpi_buffer is not acpi_object and therefore should not be cast to it, otherwise we'll get an nice oops trying to print error message. Also print name of the ACPI object corresponding to the docking station and elevate severity of the message printed when _DCK fails to KERN_ERR. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: dock: send envp with ueventKristen Carlson Accardi2007-05-101-1/+9
| | | | | | | | Send an env along with our KOBJ_CHANGE uevent so that user space has the option of checking for that to see if a dock or undock has occurred. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: dock: unsuppress ueventsKristen Carlson Accardi2007-05-101-0/+3
| | | | | | | | Platform devices may not send uevents by default - override the setting so that we can send uevents on dock/undock. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: dock: add immediate_undock optionKristen Carlson Accardi2007-05-101-2/+49
| | | | | | | | | | | | | | | | | | | | Allow the driver to be loaded with an option that will allow userspace to control whether the laptop is ejected immediately when the user presses the button, or only when the syfs undock file is written. if immediate_undock == 1, then when the user presses the undock button, the laptop will send an event to userspace to notify userspace of the undock, but then immediately undock without waiting for userspace. This is the current behavior, and I set this to be the default. if immediate_undock == 0, then when the user presses the undock button, the laptop will send an event to userspace and do nothing. User space can query the "flags" sysfs entry to determine if an undock request has been made by the user (if bit 1 is set). User space will then need to write the undock sysfs entry to complete the undocking process. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: dock: use dynamically allocated platform deviceKristen Carlson Accardi2007-05-101-24/+23
| | | | | | | | | Get rid of no release function warnings by switching to dynamically allocating the platform_device and using the platform device release routine in the base driver. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: dock: fix opps after dock driver fails to initializeChuck Ebbert2007-05-101-0/+7
| | | | | | | | | | | | The driver tests the dock_station pointer for nonnull to check whether it has initialized properly. But in some cases dock_station will be non-null after being freed when driver init fails. Fix by zeroing the pointer after freeing. Signed-off-by: Chuck Ebbert <cebbert@redhat.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: dock: cleanup the uid patchKristen Carlson Accardi2007-05-101-5/+8
| | | | | | | | | Make uid sysfs file error path free memory, and cleanup sysfs file when removing driver. Also fix CodingStyle violations. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Cc: Illya A. Volynets-Evenbakh <ilya@total-knowledge.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: dock: use NULL for pointerRandy Dunlap2007-03-281-1/+2
| | | | | | | | | Use NULL instead of 0 for pointers: drivers/acpi/dock.c:677:75: warning: Using plain integer as NULL pointer Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: dock: add access to ACPI docking station UIDIlya A. Volynets-Evenbakh2007-03-091-0/+24
| | | | | | | | | | It is useful to know whether your laptop is docked or not, but it is even more useful to know which docking station it's docked to. Attached patch adds "uid" file to sysfs. Tested on Dell Latitude D600 with D/Dock. Patch is against official 2.6.20 release. Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: delete extra #defines in /drivers/acpi/ driversLen Brown2007-02-121-3/+3
| | | | | | | | | Cosmetic only. Except in a single case, #define ACPI_*_DRIVER_NAME were invoked 0 or 1 times. Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: clean up ACPI_MODULE_NAME() useLen Brown2007-02-121-1/+1
| | | | | | | | | | cosmetic only Make "module name" actually match the file name. Invoke with ';' as leaving it off confuses Lindent and gcc doesn't care. Fix indentation where Lindent did get confused. Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: dock: check if parent is on dockKristen Carlson Accardi2007-02-031-4/+12
| | | | | | | | When determining if a device is on a dock station, we should check the parent of the device as well. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* Pull style into test branchLen Brown2006-12-161-3/+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-3/+3
| | | | | | | | | | Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Len Brown <len.brown@intel.com>
* | Pull bugfix into test branchLen Brown2006-12-161-8/+8
|\ \ | | | | | | | | | | | | | | | Conflicts: kernel/power/disk.c
| * | ACPI: dock: use mutex instead of spinlockKristen Carlson Accardi2006-10-301-8/+8
| |/ | | | | | | | | | | | | | | | | | | | | http://bugzilla.kernel.org/show_bug.cgi?id=7303 Use a mutex instead of a spinlock for locking the hotplug list because we need to call into the ACPI subsystem which might sleep. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: dock: add uevent to indicate change in device statusKristen Carlson Accardi2006-12-141-2/+4
| | | | | | | | | | | | | | | | | | Send a uevent to indicate a device change whenever we dock or undock, so that userspace may now check the dock status via sysfs. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Holger Macht <hmacht@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: dock: Fix symbol conflict between acpiphp and dockPrarit Bhargava2006-12-071-1/+7
| | | | | | | | | | | | | | | | | | Fix bug which will cause acpiphp to not be able to load when dock.ko cannot load. Signed-off-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: dock: Add a docked sysfs file to the dock driver.brandon@ifup.org2006-12-071-16/+79
| | | | | | | | | | | | | | | | | | | | | | | | Add 2 sysfs files for user interface. 1) docked - 1/0 (read only) - indicates whether the software believes the laptop is docked in a docking station. 2) undock - (write only) - writing to this file causes the software to initiate an undock request to the firmware. Signed-off-by: Brandon Philips <brandon@ifup.org> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: dock: fix build warningLen Brown2006-12-071-1/+1
| | | | | | | | | | | | drivers/acpi/dock.c:689: warning: too many arguments for format Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: dock: Make the dock station driver a platform device driver.Kristen Carlson Accardi2006-12-071-2/+20
| | | | | | | | | | | | | | | | Make the dock station driver a platform device driver so that we can create sysfs entries under /sys/device/platform. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | [PATCH] severing fs.h, radix-tree.h -> sched.hAl Viro2006-12-041-0/+1
|/ | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* PCI: docking station: remove dock ueventsKristen Carlson Accardi2006-08-031-7/+6
| | | | | | | | | | | | | Remove uevent dock notifications. There are no consumers of these events at present, and uevents are likely not the correct way to send this type of event anyway. Until I get some kind of idea if anyone in userspace cares about dock events, I will just not send any. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* ACPI: ACPI_DOCK: Initialize the atomic notifier listKristen Accardi2006-07-101-0/+1
| | | | | | Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* Revert "Revert "ACPI: dock driver""Len Brown2006-07-091-0/+739
| | | | This reverts 953969ddf5b049361ed1e8471cc43dc4134d2a6f commit.
* Revert "ACPI: dock driver"Linus Torvalds2006-07-091-739/+0
| | | | | | | | | This reverts commit a5e1b94008f2a96abf4a0c0371a55a56b320c13e. Adrian Bunk points out that it has build errors, and apparently no maintenance. Throw it out. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* ACPI: dock driverKristen Accardi2006-06-281-0/+739
Create a driver which lives in the acpi subsystem to handle dock events. This driver is not an "ACPI" driver, because acpi drivers require that the object be present when the driver is loaded. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Cc: Dave Hansen <haveblue@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>