aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi/dock.c
AgeCommit message (Collapse)Author
2007-08-11ACPI: dock: Send key=value pair instead of plain valueHolger Macht
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>
2007-07-18ACPI: dock: fix oops when _DCK evaluation failsDmitry Torokhov
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>
2007-05-10ACPI: dock: send envp with ueventKristen Carlson Accardi
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>
2007-05-10ACPI: dock: unsuppress ueventsKristen Carlson Accardi
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>
2007-05-10ACPI: dock: add immediate_undock optionKristen Carlson Accardi
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>
2007-05-10ACPI: dock: use dynamically allocated platform deviceKristen Carlson Accardi
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>
2007-05-10ACPI: dock: fix opps after dock driver fails to initializeChuck Ebbert
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>
2007-05-10ACPI: dock: cleanup the uid patchKristen Carlson Accardi
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>
2007-03-28ACPI: dock: use NULL for pointerRandy Dunlap
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>
2007-03-09ACPI: dock: add access to ACPI docking station UIDIlya A. Volynets-Evenbakh
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>
2007-02-12ACPI: delete extra #defines in /drivers/acpi/ driversLen Brown
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>
2007-02-12ACPI: clean up ACPI_MODULE_NAME() useLen Brown
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>
2007-02-03ACPI: dock: check if parent is on dockKristen Carlson Accardi
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>
2006-12-16Pull style into test branchLen Brown
Conflicts: drivers/acpi/button.c drivers/acpi/ec.c drivers/acpi/osl.c drivers/acpi/sbs.c
2006-12-16Pull bugfix into test branchLen Brown
Conflicts: kernel/power/disk.c
2006-12-14ACPI: dock: add uevent to indicate change in device statusKristen Carlson Accardi
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>
2006-12-07ACPI: dock: Fix symbol conflict between acpiphp and dockPrarit Bhargava
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>
2006-12-07ACPI: dock: Add a docked sysfs file to the dock driver.brandon@ifup.org
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>
2006-12-07ACPI: dock: fix build warningLen Brown
drivers/acpi/dock.c:689: warning: too many arguments for format Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-07ACPI: dock: Make the dock station driver a platform device driver.Kristen Carlson Accardi
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>
2006-12-04[PATCH] severing fs.h, radix-tree.h -> sched.hAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-10-30ACPI: dock: use mutex instead of spinlockKristen Carlson Accardi
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>
2006-10-14ACPI: Remove unnecessary from/to-void* and to-void casts in drivers/acpiJan Engelhardt
Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Len Brown <len.brown@intel.com>
2006-08-03PCI: docking station: remove dock ueventsKristen Carlson Accardi
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>
2006-07-10ACPI: ACPI_DOCK: Initialize the atomic notifier listKristen Accardi
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>
2006-07-09Revert "Revert "ACPI: dock driver""Len Brown
This reverts 953969ddf5b049361ed1e8471cc43dc4134d2a6f commit.
2006-07-09Revert "ACPI: dock driver"Linus Torvalds
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>
2006-06-28ACPI: dock driverKristen Accardi
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>