ACPI: add ACPI bus_type for driver model

Add ACPI bus_type for Linux driver model.

1.	.shutdown method is added into acpi_driver.ops
	needed by bus_type operations.
2.	remove useless parameter 'int state' in .resume method.
3.	change parameter 'int state'
	to 'pm_message_t state' in .suspend method.

Note:	The new .uevent method mark ACPI drivers by PNPID instead of by name.
	Udev script needs to look for "HWID=" or "COMPTID=" to load
	ACPI drivers as a result.

Signed-off-by: Li Shaohua <shaohua.li@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
此提交包含在:
Patrick Mochel
2006-12-07 20:56:27 +08:00
提交者 Len Brown
父節點 d43ec68e98
當前提交 5d9464a469
共有 5 個檔案被更改,包括 112 行新增85 行删除

查看文件

@@ -92,13 +92,14 @@ typedef int (*acpi_op_remove) (struct acpi_device * device, int type);
typedef int (*acpi_op_lock) (struct acpi_device * device, int type);
typedef int (*acpi_op_start) (struct acpi_device * device);
typedef int (*acpi_op_stop) (struct acpi_device * device, int type);
typedef int (*acpi_op_suspend) (struct acpi_device * device, int state);
typedef int (*acpi_op_resume) (struct acpi_device * device, int state);
typedef int (*acpi_op_suspend) (struct acpi_device * device, pm_message_t state);
typedef int (*acpi_op_resume) (struct acpi_device * device);
typedef int (*acpi_op_scan) (struct acpi_device * device);
typedef int (*acpi_op_bind) (struct acpi_device * device);
typedef int (*acpi_op_unbind) (struct acpi_device * device);
typedef int (*acpi_op_match) (struct acpi_device * device,
struct acpi_driver * driver);
typedef int (*acpi_op_shutdown) (struct acpi_device * device);
struct acpi_bus_ops {
u32 acpi_op_add:1;
@@ -112,7 +113,8 @@ struct acpi_bus_ops {
u32 acpi_op_bind:1;
u32 acpi_op_unbind:1;
u32 acpi_op_match:1;
u32 reserved:21;
u32 acpi_op_shutdown:1;
u32 reserved:20;
};
struct acpi_device_ops {
@@ -127,6 +129,7 @@ struct acpi_device_ops {
acpi_op_bind bind;
acpi_op_unbind unbind;
acpi_op_match match;
acpi_op_shutdown shutdown;
};
struct acpi_driver {