Commit c8f7a62c authored by Len Brown's avatar Len Brown

Revert "Revert "ACPI: dock driver""

This reverts 953969dd commit.
parent 953969dd
......@@ -133,6 +133,13 @@ config ACPI_FAN
This driver adds support for ACPI fan devices, allowing user-mode
applications to perform basic fan control (on, off, status).
config ACPI_DOCK
tristate "Dock"
depends on !ACPI_IBM_DOCK
default y
help
This driver adds support for ACPI controlled docking stations
config ACPI_PROCESSOR
tristate "Processor"
default y
......
......@@ -42,6 +42,7 @@ obj-$(CONFIG_ACPI_BATTERY) += battery.o
obj-$(CONFIG_ACPI_BUTTON) += button.o
obj-$(CONFIG_ACPI_EC) += ec.o
obj-$(CONFIG_ACPI_FAN) += fan.o
obj-$(CONFIG_ACPI_DOCK) += dock.o
obj-$(CONFIG_ACPI_VIDEO) += video.o
obj-$(CONFIG_ACPI_HOTKEY) += hotkey.o
obj-y += pci_root.o pci_link.o pci_irq.o pci_bind.o
......
This diff is collapsed.
......@@ -663,6 +663,29 @@ static int acpi_bus_find_driver(struct acpi_device *device)
Device Enumeration
-------------------------------------------------------------------------- */
acpi_status
acpi_bus_get_ejd(acpi_handle handle, acpi_handle *ejd)
{
acpi_status status;
acpi_handle tmp;
struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
union acpi_object *obj;
status = acpi_get_handle(handle, "_EJD", &tmp);
if (ACPI_FAILURE(status))
return status;
status = acpi_evaluate_object(handle, "_EJD", NULL, &buffer);
if (ACPI_SUCCESS(status)) {
obj = buffer.pointer;
status = acpi_get_handle(NULL, obj->string.pointer, ejd);
kfree(buffer.pointer);
}
return status;
}
EXPORT_SYMBOL_GPL(acpi_bus_get_ejd);
static int acpi_bus_get_flags(struct acpi_device *device)
{
acpi_status status = AE_OK;
......
......@@ -334,7 +334,7 @@ int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent,
acpi_handle handle, int type);
int acpi_bus_trim(struct acpi_device *start, int rmdevice);
int acpi_bus_start(struct acpi_device *device);
acpi_status acpi_bus_get_ejd(acpi_handle handle, acpi_handle *ejd);
int acpi_match_ids(struct acpi_device *device, char *ids);
int acpi_create_dir(struct acpi_device *);
void acpi_remove_dir(struct acpi_device *);
......
......@@ -110,4 +110,21 @@ int acpi_processor_set_thermal_limit(acpi_handle handle, int type);
extern int acpi_specific_hotkey_enabled;
/*--------------------------------------------------------------------------
Dock Station
-------------------------------------------------------------------------- */
#if defined(CONFIG_ACPI_DOCK) || defined(CONFIG_ACPI_DOCK_MODULE)
extern int is_dock_device(acpi_handle handle);
extern int register_dock_notifier(struct notifier_block *nb);
extern void unregister_dock_notifier(struct notifier_block *nb);
extern int register_hotplug_dock_device(acpi_handle handle,
acpi_notify_handler handler, void *context);
extern void unregister_hotplug_dock_device(acpi_handle handle);
#else
#define is_dock_device(h) (0)
#define register_dock_notifier(nb) (-ENODEV)
#define unregister_dock_notifier(nb) do { } while(0)
#define register_hotplug_dock_device(h1, h2, c) (-ENODEV)
#define unregister_hotplug_dock_device(h) do { } while(0)
#endif
#endif /*__ACPI_DRIVERS_H__*/
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment