aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of_platform.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/of_platform.h')
-rw-r--r--include/linux/of_platform.h35
1 files changed, 3 insertions, 32 deletions
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index 2a93b64a3869..05cb4a928252 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -13,8 +13,6 @@
13 13
14#include <linux/device.h> 14#include <linux/device.h>
15#include <linux/mod_devicetable.h> 15#include <linux/mod_devicetable.h>
16
17#ifdef CONFIG_OF_DEVICE
18#include <linux/pm.h> 16#include <linux/pm.h>
19#include <linux/of_device.h> 17#include <linux/of_device.h>
20#include <linux/platform_device.h> 18#include <linux/platform_device.h>
@@ -53,27 +51,6 @@ struct of_dev_auxdata {
53 { .compatible = _compat, .phys_addr = _phys, .name = _name, \ 51 { .compatible = _compat, .phys_addr = _phys, .name = _name, \
54 .platform_data = _pdata } 52 .platform_data = _pdata }
55 53
56/**
57 * of_platform_driver - Legacy of-aware driver for platform devices.
58 *
59 * An of_platform_driver driver is attached to a basic platform_device on
60 * the ibm ebus (ibmebus_bus_type).
61 */
62struct of_platform_driver
63{
64 int (*probe)(struct platform_device* dev,
65 const struct of_device_id *match);
66 int (*remove)(struct platform_device* dev);
67
68 int (*suspend)(struct platform_device* dev, pm_message_t state);
69 int (*resume)(struct platform_device* dev);
70 int (*shutdown)(struct platform_device* dev);
71
72 struct device_driver driver;
73};
74#define to_of_platform_driver(drv) \
75 container_of(drv,struct of_platform_driver, driver)
76
77extern const struct of_device_id of_default_bus_match_table[]; 54extern const struct of_device_id of_default_bus_match_table[];
78 55
79/* Platform drivers register/unregister */ 56/* Platform drivers register/unregister */
@@ -82,7 +59,6 @@ extern struct platform_device *of_device_alloc(struct device_node *np,
82 struct device *parent); 59 struct device *parent);
83extern struct platform_device *of_find_device_by_node(struct device_node *np); 60extern struct platform_device *of_find_device_by_node(struct device_node *np);
84 61
85#ifdef CONFIG_OF_ADDRESS /* device reg helpers depend on OF_ADDRESS */
86/* Platform devices and busses creation */ 62/* Platform devices and busses creation */
87extern struct platform_device *of_platform_device_create(struct device_node *np, 63extern struct platform_device *of_platform_device_create(struct device_node *np,
88 const char *bus_id, 64 const char *bus_id,
@@ -91,17 +67,12 @@ extern struct platform_device *of_platform_device_create(struct device_node *np,
91extern int of_platform_bus_probe(struct device_node *root, 67extern int of_platform_bus_probe(struct device_node *root,
92 const struct of_device_id *matches, 68 const struct of_device_id *matches,
93 struct device *parent); 69 struct device *parent);
70#ifdef CONFIG_OF_ADDRESS
94extern int of_platform_populate(struct device_node *root, 71extern int of_platform_populate(struct device_node *root,
95 const struct of_device_id *matches, 72 const struct of_device_id *matches,
96 const struct of_dev_auxdata *lookup, 73 const struct of_dev_auxdata *lookup,
97 struct device *parent); 74 struct device *parent);
98#endif /* CONFIG_OF_ADDRESS */ 75#else
99
100#endif /* CONFIG_OF_DEVICE */
101
102#if !defined(CONFIG_OF_ADDRESS)
103struct of_dev_auxdata;
104struct device_node;
105static inline int of_platform_populate(struct device_node *root, 76static inline int of_platform_populate(struct device_node *root,
106 const struct of_device_id *matches, 77 const struct of_device_id *matches,
107 const struct of_dev_auxdata *lookup, 78 const struct of_dev_auxdata *lookup,
@@ -109,6 +80,6 @@ static inline int of_platform_populate(struct device_node *root,
109{ 80{
110 return -ENODEV; 81 return -ENODEV;
111} 82}
112#endif /* !CONFIG_OF_ADDRESS */ 83#endif
113 84
114#endif /* _LINUX_OF_PLATFORM_H */ 85#endif /* _LINUX_OF_PLATFORM_H */