diff options
author | Andres Salomon <dilinger@queued.net> | 2012-07-13 14:57:17 +0200 |
---|---|---|
committer | Andres Salomon <dilinger@queued.net> | 2012-08-01 05:27:30 +0200 |
commit | ac2504151f5af27bbf0c0362b7da5951e05dfc43 (patch) | |
tree | 21e163290e4e35e9151d50f90e58ce8c066c2f3c /include | |
parent | Platform: OLPC: allow EC cmd to be overridden, and create a workqueue to call it (diff) | |
download | linux-ac2504151f5af27bbf0c0362b7da5951e05dfc43.tar.xz linux-ac2504151f5af27bbf0c0362b7da5951e05dfc43.zip |
Platform: OLPC: turn EC driver into a platform_driver
The 1.75-based OLPC EC driver already does this; let's do it for all EC
drivers. This gives us nice suspend/resume hooks, amongst other things.
We want to run the EC's suspend hooks later than other drivers (which may
be setting wakeup masks or be running EC commands). We also want to run
the EC's resume hooks earlier than other drivers (which may want to run EC
commands).
Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Paul Fox <pgf@laptop.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/olpc-ec.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/olpc-ec.h b/include/linux/olpc-ec.h index 231e96f5dfe2..5bb6e760aa61 100644 --- a/include/linux/olpc-ec.h +++ b/include/linux/olpc-ec.h @@ -14,7 +14,13 @@ #define EC_SCI_QUERY 0x84 #define EC_EXT_SCI_QUERY 0x85 +struct platform_device; + struct olpc_ec_driver { + int (*probe)(struct platform_device *); + int (*suspend)(struct platform_device *); + int (*resume)(struct platform_device *); + int (*ec_cmd)(u8, u8 *, size_t, u8 *, size_t, void *); }; |