From: Len Brown <len.brown@intel.com>
To: linux-acpi@vger.kernel.org
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
Len Brown <len.brown@intel.com>
Subject: [PATCH 058/105] ACPI: thinkpad-acpi: prepare for device model conversion
Date: Sun, 29 Apr 2007 00:50:58 -0400 [thread overview]
Message-ID: <11778223593048-git-send-email-len.brown@intel.com> (raw)
Message-ID: <8d376cd6543d57ef10799be02ba5f19aa6678032.1177822058.git.len.brown@intel.com> (raw)
In-Reply-To: <11778223581484-git-send-email-len.brown@intel.com>
In-Reply-To: <ac122bb64b0d51f0512185d3522a75f3f3a80bc9.1177822058.git.len.brown@intel.com>
From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Prepare the thinkpad-acpi driver for the conversion to the device
model, by renaming variables and doing other glue work that shall
make the later patches much cleaner.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/misc/thinkpad_acpi.c | 231 +++++++++++++++++++++++-------------------
drivers/misc/thinkpad_acpi.h | 40 +++++---
2 files changed, 153 insertions(+), 118 deletions(-)
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index e2a1b63..809ec84 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
@@ -277,7 +277,7 @@ static int _sta(acpi_handle handle)
* ACPI device model
*/
-static void ibm_handle_init(char *name,
+static void drv_acpi_handle_init(char *name,
acpi_handle *handle, acpi_handle parent,
char **paths, int num_paths, char **path)
{
@@ -295,40 +295,42 @@ static void ibm_handle_init(char *name,
*handle = NULL;
}
-static void dispatch_notify(acpi_handle handle, u32 event, void *data)
+static void dispatch_acpi_notify(acpi_handle handle, u32 event, void *data)
{
struct ibm_struct *ibm = data;
- if (!ibm || !ibm->notify)
+ if (!ibm || !ibm->acpi || !ibm->acpi->notify)
return;
- ibm->notify(ibm, event);
+ ibm->acpi->notify(ibm, event);
}
-static int __init setup_notify(struct ibm_struct *ibm)
+static int __init setup_acpi_notify(struct ibm_struct *ibm)
{
acpi_status status;
int ret;
- if (!*ibm->handle)
+ BUG_ON(!ibm->acpi);
+
+ if (!*ibm->acpi->handle)
return 0;
dbg_printk(TPACPI_DBG_INIT,
"setting up ACPI notify for %s\n", ibm->name);
- ret = acpi_bus_get_device(*ibm->handle, &ibm->device);
+ ret = acpi_bus_get_device(*ibm->acpi->handle, &ibm->acpi->device);
if (ret < 0) {
printk(IBM_ERR "%s device not present\n", ibm->name);
return -ENODEV;
}
- acpi_driver_data(ibm->device) = ibm;
- sprintf(acpi_device_class(ibm->device), "%s/%s",
+ acpi_driver_data(ibm->acpi->device) = ibm;
+ sprintf(acpi_device_class(ibm->acpi->device), "%s/%s",
IBM_ACPI_EVENT_PREFIX,
ibm->name);
- status = acpi_install_notify_handler(*ibm->handle, ibm->type,
- dispatch_notify, ibm);
+ status = acpi_install_notify_handler(*ibm->acpi->handle,
+ ibm->acpi->type, dispatch_acpi_notify, ibm);
if (ACPI_FAILURE(status)) {
if (status == AE_ALREADY_EXISTS) {
printk(IBM_NOTICE "another device driver is already handling %s events\n",
@@ -339,11 +341,11 @@ static int __init setup_notify(struct ibm_struct *ibm)
}
return -ENODEV;
}
- ibm->flags.notify_installed = 1;
+ ibm->flags.acpi_notify_installed = 1;
return 0;
}
-static int __init ibm_device_add(struct acpi_device *device)
+static int __init tpacpi_device_add(struct acpi_device *device)
{
return 0;
}
@@ -355,24 +357,26 @@ static int __init register_tpacpi_subdriver(struct ibm_struct *ibm)
dbg_printk(TPACPI_DBG_INIT,
"registering %s as an ACPI driver\n", ibm->name);
- ibm->driver = kzalloc(sizeof(struct acpi_driver), GFP_KERNEL);
- if (!ibm->driver) {
+ BUG_ON(!ibm->acpi);
+
+ ibm->acpi->driver = kzalloc(sizeof(struct acpi_driver), GFP_KERNEL);
+ if (!ibm->acpi->driver) {
printk(IBM_ERR "kzalloc(ibm->driver) failed\n");
return -ENOMEM;
}
- sprintf(ibm->driver->name, "%s_%s", IBM_NAME, ibm->name);
- ibm->driver->ids = ibm->hid;
- ibm->driver->ops.add = &ibm_device_add;
+ sprintf(ibm->acpi->driver->name, "%s_%s", IBM_NAME, ibm->name);
+ ibm->acpi->driver->ids = ibm->acpi->hid;
+ ibm->acpi->driver->ops.add = &tpacpi_device_add;
- ret = acpi_bus_register_driver(ibm->driver);
+ ret = acpi_bus_register_driver(ibm->acpi->driver);
if (ret < 0) {
printk(IBM_ERR "acpi_bus_register_driver(%s) failed: %d\n",
- ibm->hid, ret);
- kfree(ibm->driver);
- ibm->driver = NULL;
+ ibm->acpi->hid, ret);
+ kfree(ibm->acpi->driver);
+ ibm->acpi->driver = NULL;
} else if (!ret)
- ibm->flags.driver_registered = 1;
+ ibm->flags.acpi_driver_registered = 1;
return ret;
}
@@ -386,8 +390,8 @@ static int __init register_tpacpi_subdriver(struct ibm_struct *ibm)
****************************************************************************
****************************************************************************/
-static int dispatch_read(char *page, char **start, off_t off, int count,
- int *eof, void *data)
+static int dispatch_procfs_read(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
{
struct ibm_struct *ibm = data;
int len;
@@ -411,8 +415,9 @@ static int dispatch_read(char *page, char **start, off_t off, int count,
return len;
}
-static int dispatch_write(struct file *file, const char __user * userbuf,
- unsigned long count, void *data)
+static int dispatch_procfs_write(struct file *file,
+ const char __user * userbuf,
+ unsigned long count, void *data)
{
struct ibm_struct *ibm = data;
char *kernbuf;
@@ -508,7 +513,7 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
{
vdbg_printk(TPACPI_DBG_INIT, "initializing hotkey subdriver\n");
- IBM_HANDLE_INIT(hkey);
+ IBM_ACPIHANDLE_INIT(hkey);
/* hotkey not supported on 570 */
tp_features.hotkey = hkey_handle != NULL;
@@ -545,10 +550,10 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
int hkey;
if (acpi_evalf(hkey_handle, &hkey, "MHKP", "d"))
- acpi_bus_generate_event(ibm->device, event, hkey);
+ acpi_bus_generate_event(ibm->acpi->device, event, hkey);
else {
printk(IBM_ERR "unknown hotkey event %d\n", event);
- acpi_bus_generate_event(ibm->device, event, 0);
+ acpi_bus_generate_event(ibm->acpi->device, event, 0);
}
}
@@ -643,15 +648,19 @@ static int hotkey_write(char *buf)
return 0;
}
+static struct tp_acpi_drv_struct ibm_hotkey_acpidriver = {
+ .hid = IBM_HKEY_HID,
+ .notify = hotkey_notify,
+ .handle = &hkey_handle,
+ .type = ACPI_DEVICE_NOTIFY,
+};
+
static struct ibm_struct hotkey_driver_data = {
.name = "hotkey",
- .hid = IBM_HKEY_HID,
.read = hotkey_read,
.write = hotkey_write,
.exit = hotkey_exit,
- .notify = hotkey_notify,
- .handle = &hkey_handle,
- .type = ACPI_DEVICE_NOTIFY,
+ .acpi = &ibm_hotkey_acpidriver,
};
/*************************************************************************
@@ -662,7 +671,7 @@ static int __init bluetooth_init(struct ibm_init_struct *iibm)
{
vdbg_printk(TPACPI_DBG_INIT, "initializing bluetooth subdriver\n");
- IBM_HANDLE_INIT(hkey);
+ IBM_ACPIHANDLE_INIT(hkey);
/* bluetooth not supported on 570, 600e/x, 770e, 770x, A21e, A2xm/p,
G4x, R30, R31, R40e, R50e, T20-22, X20-21 */
@@ -742,7 +751,7 @@ static int __init wan_init(struct ibm_init_struct *iibm)
{
vdbg_printk(TPACPI_DBG_INIT, "initializing wan subdriver\n");
- IBM_HANDLE_INIT(hkey);
+ IBM_ACPIHANDLE_INIT(hkey);
tp_features.wan = hkey_handle &&
acpi_evalf(hkey_handle, NULL, "GWAN", "qv");
@@ -835,8 +844,8 @@ static int __init video_init(struct ibm_init_struct *iibm)
vdbg_printk(TPACPI_DBG_INIT, "initializing video subdriver\n");
- IBM_HANDLE_INIT(vid);
- IBM_HANDLE_INIT(vid2);
+ IBM_ACPIHANDLE_INIT(vid);
+ IBM_ACPIHANDLE_INIT(vid2);
if (vid2_handle && acpi_evalf(NULL, &ivga, "\\IVGA", "d") && ivga)
/* G41, assume IVGA doesn't change */
@@ -1053,9 +1062,9 @@ static int __init light_init(struct ibm_init_struct *iibm)
{
vdbg_printk(TPACPI_DBG_INIT, "initializing light subdriver\n");
- IBM_HANDLE_INIT(ledb);
- IBM_HANDLE_INIT(lght);
- IBM_HANDLE_INIT(cmos);
+ IBM_ACPIHANDLE_INIT(ledb);
+ IBM_ACPIHANDLE_INIT(lght);
+ IBM_ACPIHANDLE_INIT(cmos);
/* light not supported on 570, 600e/x, 770e, 770x, G4x, R30, R31 */
tp_features.light = (cmos_handle || lght_handle) && !ledb_handle;
@@ -1148,8 +1157,8 @@ static int __init dock_init(struct ibm_init_struct *iibm)
{
vdbg_printk(TPACPI_DBG_INIT, "initializing dock subdriver\n");
- IBM_HANDLE_INIT(dock);
- IBM_HANDLE_INIT(pci);
+ IBM_ACPIHANDLE_INIT(dock);
+ IBM_ACPIHANDLE_INIT(pci);
vdbg_printk(TPACPI_DBG_INIT, "dock is %s\n",
str_supported(dock_handle != NULL));
@@ -1160,22 +1169,22 @@ static int __init dock_init(struct ibm_init_struct *iibm)
static void dock_notify(struct ibm_struct *ibm, u32 event)
{
int docked = dock_docked();
- int pci = ibm->hid && strstr(ibm->hid, IBM_PCI_HID);
+ int pci = ibm->acpi->hid && strstr(ibm->acpi->hid, IBM_PCI_HID);
if (event == 1 && !pci) /* 570 */
- acpi_bus_generate_event(ibm->device, event, 1); /* button */
+ acpi_bus_generate_event(ibm->acpi->device, event, 1); /* button */
else if (event == 1 && pci) /* 570 */
- acpi_bus_generate_event(ibm->device, event, 3); /* dock */
+ acpi_bus_generate_event(ibm->acpi->device, event, 3); /* dock */
else if (event == 3 && docked)
- acpi_bus_generate_event(ibm->device, event, 1); /* button */
+ acpi_bus_generate_event(ibm->acpi->device, event, 1); /* button */
else if (event == 3 && !docked)
- acpi_bus_generate_event(ibm->device, event, 2); /* undock */
+ acpi_bus_generate_event(ibm->acpi->device, event, 2); /* undock */
else if (event == 0 && docked)
- acpi_bus_generate_event(ibm->device, event, 3); /* dock */
+ acpi_bus_generate_event(ibm->acpi->device, event, 3); /* dock */
else {
printk(IBM_ERR "unknown dock event %d, status %d\n",
event, _sta(dock_handle));
- acpi_bus_generate_event(ibm->device, event, 0); /* unknown */
+ acpi_bus_generate_event(ibm->acpi->device, event, 0); /* unknown */
}
}
@@ -1218,17 +1227,13 @@ static int dock_write(char *buf)
return 0;
}
-static struct ibm_struct dock_driver_data[2] = {
+static struct tp_acpi_drv_struct ibm_dock_acpidriver[2] = {
{
- .name = "dock",
- .read = dock_read,
- .write = dock_write,
.notify = dock_notify,
.handle = &dock_handle,
.type = ACPI_SYSTEM_NOTIFY,
},
{
- .name = "dock",
.hid = IBM_PCI_HID,
.notify = dock_notify,
.handle = &pci_handle,
@@ -1236,6 +1241,19 @@ static struct ibm_struct dock_driver_data[2] = {
},
};
+static struct ibm_struct dock_driver_data[2] = {
+ {
+ .name = "dock",
+ .read = dock_read,
+ .write = dock_write,
+ .acpi = &ibm_dock_acpidriver[0],
+ },
+ {
+ .name = "dock",
+ .acpi = &ibm_dock_acpidriver[1],
+ },
+};
+
#endif /* CONFIG_THINKPAD_ACPI_DOCK */
/*************************************************************************
@@ -1262,12 +1280,12 @@ static int __init bay_init(struct ibm_init_struct *iibm)
{
vdbg_printk(TPACPI_DBG_INIT, "initializing bay subdriver\n");
- IBM_HANDLE_INIT(bay);
+ IBM_ACPIHANDLE_INIT(bay);
if (bay_handle)
- IBM_HANDLE_INIT(bay_ej);
- IBM_HANDLE_INIT(bay2);
+ IBM_ACPIHANDLE_INIT(bay_ej);
+ IBM_ACPIHANDLE_INIT(bay2);
if (bay2_handle)
- IBM_HANDLE_INIT(bay2_ej);
+ IBM_ACPIHANDLE_INIT(bay2_ej);
tp_features.bay_status = bay_handle &&
acpi_evalf(bay_handle, NULL, "_STA", "qv");
@@ -1292,7 +1310,7 @@ static int __init bay_init(struct ibm_init_struct *iibm)
static void bay_notify(struct ibm_struct *ibm, u32 event)
{
- acpi_bus_generate_event(ibm->device, event, 0);
+ acpi_bus_generate_event(ibm->acpi->device, event, 0);
}
#define bay_occupied(b) (_sta(b##_handle) & 1)
@@ -1347,13 +1365,17 @@ static int bay_write(char *buf)
return 0;
}
+static struct tp_acpi_drv_struct ibm_bay_acpidriver = {
+ .notify = bay_notify,
+ .handle = &bay_handle,
+ .type = ACPI_SYSTEM_NOTIFY,
+};
+
static struct ibm_struct bay_driver_data = {
.name = "bay",
.read = bay_read,
.write = bay_write,
- .notify = bay_notify,
- .handle = &bay_handle,
- .type = ACPI_SYSTEM_NOTIFY,
+ .acpi = &ibm_bay_acpidriver,
};
#endif /* CONFIG_THINKPAD_ACPI_BAY */
@@ -1367,7 +1389,7 @@ static int __init cmos_init(struct ibm_init_struct *iibm)
vdbg_printk(TPACPI_DBG_INIT,
"initializing cmos commands subdriver\n");
- IBM_HANDLE_INIT(cmos);
+ IBM_ACPIHANDLE_INIT(cmos);
vdbg_printk(TPACPI_DBG_INIT, "cmos commands are %s\n",
str_supported(cmos_handle != NULL));
@@ -1441,7 +1463,7 @@ static int __init led_init(struct ibm_init_struct *iibm)
{
vdbg_printk(TPACPI_DBG_INIT, "initializing LED subdriver\n");
- IBM_HANDLE_INIT(led);
+ IBM_ACPIHANDLE_INIT(led);
if (!led_handle)
/* led not supported on R30, R31 */
@@ -1566,7 +1588,7 @@ static int __init beep_init(struct ibm_init_struct *iibm)
{
vdbg_printk(TPACPI_DBG_INIT, "initializing beep subdriver\n");
- IBM_HANDLE_INIT(beep);
+ IBM_ACPIHANDLE_INIT(beep);
vdbg_printk(TPACPI_DBG_INIT, "beep is %s\n",
str_supported(beep_handle != NULL));
@@ -2200,9 +2222,9 @@ static int __init fan_init(struct ibm_init_struct *iibm)
fan_watchdog_maxinterval = 0;
tp_features.fan_ctrl_status_undef = 0;
- IBM_HANDLE_INIT(fans);
- IBM_HANDLE_INIT(gfan);
- IBM_HANDLE_INIT(sfan);
+ IBM_ACPIHANDLE_INIT(fans);
+ IBM_ACPIHANDLE_INIT(gfan);
+ IBM_ACPIHANDLE_INIT(sfan);
if (gfan_handle) {
/* 570, 600e/x, 770e, 770x */
@@ -2728,22 +2750,24 @@ static int __init ibm_init(struct ibm_init_struct *iibm)
ibm->flags.init_called = 1;
}
- if (ibm->hid) {
- ret = register_tpacpi_subdriver(ibm);
- if (ret)
- goto err_out;
- }
+ if (ibm->acpi) {
+ if (ibm->acpi->hid) {
+ ret = register_tpacpi_subdriver(ibm);
+ if (ret)
+ goto err_out;
+ }
- if (ibm->notify) {
- ret = setup_notify(ibm);
- if (ret == -ENODEV) {
- printk(IBM_NOTICE "disabling subdriver %s\n",
- ibm->name);
- ret = 0;
- goto err_out;
+ if (ibm->acpi->notify) {
+ ret = setup_acpi_notify(ibm);
+ if (ret == -ENODEV) {
+ printk(IBM_NOTICE "disabling subdriver %s\n",
+ ibm->name);
+ ret = 0;
+ goto err_out;
+ }
+ if (ret < 0)
+ goto err_out;
}
- if (ret < 0)
- goto err_out;
}
dbg_printk(TPACPI_DBG_INIT,
@@ -2761,9 +2785,9 @@ static int __init ibm_init(struct ibm_init_struct *iibm)
}
entry->owner = THIS_MODULE;
entry->data = ibm;
- entry->read_proc = &dispatch_read;
+ entry->read_proc = &dispatch_procfs_read;
if (ibm->write)
- entry->write_proc = &dispatch_write;
+ entry->write_proc = &dispatch_procfs_write;
ibm->flags.proc_created = 1;
}
@@ -2786,12 +2810,15 @@ static void ibm_exit(struct ibm_struct *ibm)
list_del_init(&ibm->all_drivers);
- if (ibm->flags.notify_installed) {
+ if (ibm->flags.acpi_notify_installed) {
dbg_printk(TPACPI_DBG_EXIT,
"%s: acpi_remove_notify_handler\n", ibm->name);
- acpi_remove_notify_handler(*ibm->handle, ibm->type,
- dispatch_notify);
- ibm->flags.notify_installed = 0;
+ BUG_ON(!ibm->acpi);
+ acpi_remove_notify_handler(*ibm->acpi->handle,
+ ibm->acpi->type,
+ dispatch_acpi_notify);
+ ibm->flags.acpi_notify_installed = 0;
+ ibm->flags.acpi_notify_installed = 0;
}
if (ibm->flags.proc_created) {
@@ -2801,13 +2828,14 @@ static void ibm_exit(struct ibm_struct *ibm)
ibm->flags.proc_created = 0;
}
- if (ibm->flags.driver_registered) {
+ if (ibm->flags.acpi_driver_registered) {
dbg_printk(TPACPI_DBG_EXIT,
"%s: acpi_bus_unregister_driver\n", ibm->name);
- acpi_bus_unregister_driver(ibm->driver);
- kfree(ibm->driver);
- ibm->driver = NULL;
- ibm->flags.driver_registered = 0;
+ BUG_ON(!ibm->acpi);
+ acpi_bus_unregister_driver(ibm->acpi->driver);
+ kfree(ibm->acpi->driver);
+ ibm->acpi->driver = NULL;
+ ibm->flags.acpi_driver_registered = 0;
}
if (ibm->flags.init_called && ibm->exit) {
@@ -2860,7 +2888,7 @@ static int __init probe_for_thinkpad(void)
is_thinkpad = dmi_name_in_vendors("ThinkPad");
/* ec is required because many other handles are relative to it */
- IBM_HANDLE_INIT(ec);
+ IBM_ACPIHANDLE_INIT(ec);
if (!ec_handle) {
if (is_thinkpad)
printk(IBM_ERR
@@ -3016,12 +3044,12 @@ static int __init thinkpad_acpi_module_init(void)
return ret;
ibm_thinkpad_ec_found = check_dmi_for_ec();
- IBM_HANDLE_INIT(ecrd);
- IBM_HANDLE_INIT(ecwr);
+ IBM_ACPIHANDLE_INIT(ecrd);
+ IBM_ACPIHANDLE_INIT(ecwr);
- proc_dir = proc_mkdir(IBM_DIR, acpi_root_dir);
+ proc_dir = proc_mkdir(IBM_PROC_DIR, acpi_root_dir);
if (!proc_dir) {
- printk(IBM_ERR "unable to create proc dir %s", IBM_DIR);
+ printk(IBM_ERR "unable to create proc dir " IBM_PROC_DIR);
thinkpad_acpi_module_exit();
return -ENODEV;
}
@@ -3053,10 +3081,9 @@ static void thinkpad_acpi_module_exit(void)
dbg_printk(TPACPI_DBG_INIT, "finished subdriver exit path...\n");
if (proc_dir)
- remove_proc_entry(IBM_DIR, acpi_root_dir);
+ remove_proc_entry(IBM_PROC_DIR, acpi_root_dir);
- if (ibm_thinkpad_ec_found)
- kfree(ibm_thinkpad_ec_found);
+ kfree(ibm_thinkpad_ec_found);
}
module_init(thinkpad_acpi_module_init);
diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h
index 4d3ab40..529528c 100644
--- a/drivers/misc/thinkpad_acpi.h
+++ b/drivers/misc/thinkpad_acpi.h
@@ -52,8 +52,9 @@
#define IBM_DESC "ThinkPad ACPI Extras"
#define IBM_FILE "thinkpad_acpi"
#define IBM_URL "http://ibm-acpi.sf.net/"
+#define IBM_MAIL "ibm-acpi-devel@lists.sourceforge.net"
-#define IBM_DIR "ibm"
+#define IBM_PROC_DIR "ibm"
#define IBM_ACPI_EVENT_PREFIX "ibm"
#define IBM_LOG IBM_FILE ": "
@@ -108,20 +109,21 @@ static acpi_handle ec_handle; /* EC */
static acpi_handle ecrd_handle, ecwr_handle; /* 570 EC access */
static acpi_handle cmos_handle, hkey_handle; /* basic thinkpad handles */
-static void ibm_handle_init(char *name,
+static void drv_acpi_handle_init(char *name,
acpi_handle *handle, acpi_handle parent,
char **paths, int num_paths, char **path);
-#define IBM_HANDLE_INIT(object) \
- ibm_handle_init(#object, &object##_handle, *object##_parent, \
+#define IBM_ACPIHANDLE_INIT(object) \
+ drv_acpi_handle_init(#object, &object##_handle, *object##_parent, \
object##_paths, ARRAY_SIZE(object##_paths), &object##_path)
/* procfs support */
static struct proc_dir_entry *proc_dir;
/* procfs helpers */
-static int dispatch_read(char *page, char **start, off_t off, int count,
- int *eof, void *data);
-static int dispatch_write(struct file *file, const char __user * userbuf,
+static int dispatch_procfs_read(char *page, char **start, off_t off,
+ int count, int *eof, void *data);
+static int dispatch_procfs_write(struct file *file,
+ const char __user * userbuf,
unsigned long count, void *data);
static char *next_cmd(char **cmds);
@@ -140,28 +142,34 @@ static void thinkpad_acpi_module_exit(void);
* Subdrivers
*/
-struct ibm_struct {
- char *name;
+struct ibm_struct;
+struct tp_acpi_drv_struct {
char *hid;
struct acpi_driver *driver;
- int (*read) (char *);
- int (*write) (char *);
- void (*exit) (void);
-
void (*notify) (struct ibm_struct *, u32);
acpi_handle *handle;
- int type;
+ u32 type;
struct acpi_device *device;
+};
+
+struct ibm_struct {
+ char *name;
+
+ int (*read) (char *);
+ int (*write) (char *);
+ void (*exit) (void);
struct list_head all_drivers;
+ struct tp_acpi_drv_struct *acpi;
+
struct {
- u8 driver_registered:1;
+ u8 acpi_driver_registered:1;
+ u8 acpi_notify_installed:1;
u8 proc_created:1;
u8 init_called:1;
- u8 notify_installed:1;
u8 experimental:1;
} flags;
};
--
1.5.2.rc0.34.gda94
next prev parent reply other threads:[~2007-04-29 4:52 UTC|newest]
Thread overview: 89+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-29 4:50 ACPI patches for 2.6.22 merge window Len Brown
[not found] ` <11778223068-git-send-email-len.brown@intel.com>
[not found] ` <ac122bb64b0d51f0512185d3522a75f3f3a80bc9.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 002/105] ACPI: EC: Don't use Global Lock if not asked to do so Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 003/105] ACPI: EC: Make EC to initialize first in ACPI Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 004/105] ACPI: EC: "Fake ECDT" workaround is not needed any longer Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 005/105] ACPI: EC: enable burst functionality in EC Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 006/105] ACPI: EC: Remove casts to/from void* from ec.c Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 007/105] ACPI: EC: Put install handlers into separate function Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 008/105] ACPI: EC: Clean ECDT and namespace parsing Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 009/105] ACPI: EC: Rename ec_ecdt to more informative boot_ec Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 010/105] ACPI: EC: first_ec is better to be acpi_ec than acpi_device Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 011/105] ACPI: EC: Cleanup of EC initialization Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 012/105] ACPI: EC: Block queries until EC is fully initialized Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 013/105] asus-laptop: use acpi_evaluate_integer instead of read_acpi_int Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 014/105] asus-laptop: clean write_status Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 015/105] asus-laptop: add GLED Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 016/105] asus-laptop: add wapf param Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 017/105] asus-laptop: version bump Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 018/105] ACPI: sbs: use EC rather than I2C Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 019/105] ACPI: sbs: remove I2C Kconfig dependency Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 020/105] ACPI: sbs: remove I2C Makefile hooks Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 021/105] ACPI: sbs: Debug messages correction/improvement Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 022/105] ACPI: sbs: Common interface with CM battery Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 023/105] ACPI: sbs: remove i2c_ec.[ch] Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 024/105] ACPI: ibm-acpi: kill trailing whitespace Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 025/105] ACPI: ibm-acpi: rename some identifiers Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 026/105] ACPI: ibm-acpi: add header file Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 027/105] ACPI: ibm-acpi: organize code Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 028/105] ACPI: ibm-acpi: update copyright notice Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 029/105] ACPI: ibm-acpi: update documentation Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 031/105] ACPI: dock: use NULL for pointer Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 033/105] ACPI: thinkpad-acpi: cleanup Kconfig for thinkpad-acpi Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 034/105] ACPI: thinkpad-acpi: add compatibility MODULE_ALIAS entry Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 035/105] ACPI: thinkpad-acpi: cleanup after rename Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 036/105] ACPI: thinkpad-acpi: update MAINTAINERS Len Brown
2007-04-29 4:50 ` Len Brown
[not found] ` <11778223411658-git-send-email-len.brown@intel.com>
[not found] ` <11778223412672-git-send-email-len.brown@intel.com>
[not found] ` <11778223423-git-send-email-len.brown@intel.com>
[not found] ` <1177822343712-git-send-email-len.brown@intel.com>
[not found] ` <11778223442065-git-send-email-len.brown@intel.com>
[not found] ` <11778223452843-git-send-email-len.brown@intel.com>
[not found] ` <11778223461282-git-send-email-len.brown@intel.com>
[not found] ` <11778223472316-git-send-email-len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 046/105] ACPI: thinkpad-acpi: rename register_ibmacpi_subdriver Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 047/105] ACPI: thinkpad-acpi: rename one stray use of ibm-acpi in a comment Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 048/105] ACPI: thinkpad-acpi: rename module glue Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 049/105] ACPI: thinkpad-acpi: rename thinkpad constants Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 050/105] ACPI: thinkpad-acpi: update fan firmware documentation Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 051/105] ACPI: thinkpad-acpi: add debug mode Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 052/105] ACPI: thinkpad-acpi: clean up probing and move init to subdrivers Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 053/105] ACPI: thinkpad-acpi: add subdriver debug statements Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 054/105] ACPI: thinkpad-acpi: uncouple subdriver init from ibms struct Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 055/105] ACPI: thinkpad-acpi: improve thinkpad detection Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 056/105] ACPI: thinkpad-acpi: use bitfields to hold subdriver flags Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 057/105] ACPI: thinkpad-acpi: use bitfields for module flags Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` Len Brown [this message]
2007-04-29 4:50 ` [PATCH 058/105] ACPI: thinkpad-acpi: prepare for device model conversion Len Brown
2007-04-29 4:50 ` [PATCH 059/105] ACPI: thinkpad-acpi: mark acpi helper functions __must_check Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:51 ` [PATCH 060/105] ACPI: thinkpad-acpi: clean up hotkey subdriver Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 061/105] ACPI: thinkpad-acpi: cleanup bluetooth and wan for sysfs conversion Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 062/105] ACPI: thinkpad-acpi: cleanup video subdriver Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 063/105] ACPI: thinkpad-acpi: clean up CMOS commands subdriver Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 064/105] ACPI: thinkpad-acpi: cleanup thermal subdriver for sysfs conversion Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 065/105] ACPI: thinkpad-acpi: improve fan watchdog messages Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 066/105] ACPI: Disable MSI on request of FADT Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 067/105] ACPI: Improve acpi debug documentation Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 068/105] ACPI: thinkpad-acpi: register with the device model Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 069/105] ACPI: thinkpad-acpi: driver sysfs conversion Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 070/105] ACPI: thinkpad-acpi: add infrastructure for the sysfs device attributes Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 071/105] ACPI: thinkpad-acpi: protect fan and hotkey data structures Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 072/105] ACPI: thinkpad-acpi: add sysfs support to the thermal subdriver Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 073/105] ACPI: thinkpad-acpi: add sysfs support to fan subdriver Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 074/105] ACPI: thinkpad-acpi: add a safety net for TPEC fan control mode Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 075/105] ACPI: thinkpad-acpi: add sysfs support to the cmos command subdriver Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 076/105] ACPI: thinkpad-acpi: update brightness sysfs interface support Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 077/105] ACPI: remove duplicate include Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 078/105] ACPI: Remove duplicate definitions for _STA bits Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 079/105] ACPI: use _STA bit names rather than 0x0F Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 080/105] ACPI: correct pathname in comment Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 081/105] ACPI: word-smith kconfig help Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 082/105] ACPI: make /proc/acpi/wakeup more useful Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 083/105] ACPI: prevent ACPI quirk warning mass spamming in logs Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 9:58 ` Andi Kleen
2007-04-29 4:51 ` [PATCH 084/105] ACPI: Remove a warning about unused variable in !CONFIG_ACPI compilation Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 9:59 ` Andi Kleen
2007-04-29 4:51 ` [PATCH 085/105] ACPICA: clear fields reserved before FADT r3 Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 086/105] ACPI: thinkpad-acpi: add a fan-control feature master toggle Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 087/105] ACPI: thinkpad-acpi: do not arm fan watchdog if it would not work Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 088/105] ACPI: thinkpad-acpi: fix a fan watchdog invocation Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 089/105] ACPI: thinkpad-acpi: map ENXIO to EINVAL for fan sysfs Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 090/105] ACPI: thinkpad-acpi: improve fan control documentation Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 091/105] ACPI: thinkpad-acpi: improve debugging for acpi helpers Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 092/105] ACPI: thinkpad-acpi: improve dock subdriver initialization Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 093/105] ACPI: thinkpad-acpi: add sysfs support to hotkey subdriver Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 094/105] ACPI: thinkpad-acpi: add sysfs support to wan and bluetooth subdrivers Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 095/105] thinkpad-acpi: make drivers/misc/thinkpad_acpi:fan_mutex static Len Brown
2007-04-29 4:51 ` Len Brown
[not found] ` <11778223931192-git-send-email-len.brown@intel.com>
[not found] ` <11778223942367-git-send-email-len.brown@intel.com>
[not found] ` <11778223942377-git-send-email-len.brown@intel.com>
[not found] ` <1177822395384-git-send-email-len.brown@intel.com>
[not found] ` <11778223963095-git-send-email-len.brown@intel.com>
[not found] ` <11778223972558-git-send-email-len.brown@intel.com>
[not found] ` <11778223981263-git-send-email-len.brown@intel.com>
[not found] ` <117782239917-git-send-email-len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 105/105] sonypi: use mutex instead of semaphore Len Brown
2007-04-29 4:51 ` Len Brown
2007-05-01 2:19 ` ACPI patches for 2.6.22 merge window Mattia Dongili
2007-05-10 6:44 ` Len Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11778223593048-git-send-email-len.brown@intel.com \
--to=len.brown@intel.com \
--cc=hmh@hmh.eng.br \
--cc=linux-acpi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.