summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2016-09-15 01:38:27 +0100
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2024-03-26 12:09:22 +0000
commit594d2321e24dcad4c886e2bf1359f9198066ace7 (patch)
tree6f0f48f024ae7f1aee7ecf24b16e6669ef3b0228 /include
parent802c8efc2babd56368aacfeef80eb045d49cd4fc (diff)
ARM: sa1100/h3xxx: sleeve support
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ipaq-sleeve.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/include/linux/ipaq-sleeve.h b/include/linux/ipaq-sleeve.h
new file mode 100644
index 000000000000..fb669fad0c4e
--- /dev/null
+++ b/include/linux/ipaq-sleeve.h
@@ -0,0 +1,34 @@
+#ifndef LINUX_IPAQ_SLEEVE_H
+#define LINUX_IPAQ_SLEEVE_H
+
+#include <linux/device.h>
+#include <linux/mod_devicetable.h>
+
+struct ipaq_option_device {
+ struct ipaq_option_id id;
+ struct device dev;
+};
+#define to_ipaq_option_device(x) container_of(x, struct ipaq_option_device, dev)
+
+struct ipaq_option_driver {
+ const struct ipaq_option_id *id_table;
+ struct device_driver driver;
+};
+
+extern struct bus_type ipaq_option_sleeve_bus;
+
+int ipaq_option_device_add(struct device *parent, struct ipaq_option_id id);
+void ipaq_option_device_del(void);
+
+static inline int ipaq_option_driver_register(struct ipaq_option_driver *drv)
+{
+ drv->driver.bus = &ipaq_option_sleeve_bus;
+ return driver_register(&drv->driver);
+}
+
+static inline void ipaq_option_driver_unregister(struct ipaq_option_driver *drv)
+{
+ driver_unregister(&drv->driver);
+}
+
+#endif