diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-04 18:51:45 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-04 18:51:45 -0400 |
| commit | 74b9272bbedf45cb01a048217830d64d59aaa73b (patch) | |
| tree | 11cf66b529d4861edd03d16f97c8178e9cfd9f77 /include/linux | |
| parent | f5b63ac0f77ecab46796ba5d368ea5dd51834e6e (diff) | |
| parent | 6dd18e4684f3d188277bbbc27545248487472108 (diff) | |
Merge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux
Pull device tree updates from Grant Likely:
"This branch contains the following changes:
- Removal of CONFIG_OF_DEVICE, it is always enabled by CONFIG_OF
- Remove #ifdef from linux/of_platform.h to increase compiler syntax
coverage
- Bug fix for address decoding on Bimini and js2x powerpc platforms.
- miscellaneous binding changes
One note on the above. The binding changes going in from all kinds of
different trees has gotten rather out of hand. I picked up some
during this cycle, but even going though my tree isn't a great fit.
Ian Campbell has prototyped splitting the bindings and .dtb files into
a separate repository. The plan is to migrate to using that sometime
in the next few kernel releases which should get rid of a lot of the
churn on binding docs and .dts files"
* tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux:
of: Fix address decoding on Bimini and js2x machines
of: remove CONFIG_OF_DEVICE
usb: chipidea: depend on CONFIG_OF instead of CONFIG_OF_DEVICE
of: remove of_platform_driver
ibmebus: convert of_platform_driver to platform_driver
driver core: move to_platform_driver to platform_device.h
mfd: DT bindings for the palmas family MFD
ARM: dts: omap3-devkit8000: fix NAND memory binding
of/base: fix typos
of: remove #ifdef from linux/of_platform.h
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/of_device.h | 6 | ||||
| -rw-r--r-- | include/linux/of_platform.h | 35 | ||||
| -rw-r--r-- | include/linux/platform_device.h | 3 |
3 files changed, 9 insertions, 35 deletions
diff --git a/include/linux/of_device.h b/include/linux/of_device.h index 901b7435e890..9d27475feec1 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h | |||
| @@ -4,12 +4,12 @@ | |||
| 4 | #include <linux/platform_device.h> | 4 | #include <linux/platform_device.h> |
| 5 | #include <linux/of_platform.h> /* temporary until merge */ | 5 | #include <linux/of_platform.h> /* temporary until merge */ |
| 6 | 6 | ||
| 7 | #ifdef CONFIG_OF_DEVICE | ||
| 8 | #include <linux/of.h> | 7 | #include <linux/of.h> |
| 9 | #include <linux/mod_devicetable.h> | 8 | #include <linux/mod_devicetable.h> |
| 10 | 9 | ||
| 11 | struct device; | 10 | struct device; |
| 12 | 11 | ||
| 12 | #ifdef CONFIG_OF | ||
| 13 | extern const struct of_device_id *of_match_device( | 13 | extern const struct of_device_id *of_match_device( |
| 14 | const struct of_device_id *matches, const struct device *dev); | 14 | const struct of_device_id *matches, const struct device *dev); |
| 15 | extern void of_device_make_bus_id(struct device *dev); | 15 | extern void of_device_make_bus_id(struct device *dev); |
| @@ -43,7 +43,7 @@ static inline void of_device_node_put(struct device *dev) | |||
| 43 | of_node_put(dev->of_node); | 43 | of_node_put(dev->of_node); |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | #else /* CONFIG_OF_DEVICE */ | 46 | #else /* CONFIG_OF */ |
| 47 | 47 | ||
| 48 | static inline int of_driver_match_device(struct device *dev, | 48 | static inline int of_driver_match_device(struct device *dev, |
| 49 | struct device_driver *drv) | 49 | struct device_driver *drv) |
| @@ -67,6 +67,6 @@ static inline const struct of_device_id *of_match_device( | |||
| 67 | { | 67 | { |
| 68 | return NULL; | 68 | return NULL; |
| 69 | } | 69 | } |
| 70 | #endif /* CONFIG_OF_DEVICE */ | 70 | #endif /* CONFIG_OF */ |
| 71 | 71 | ||
| 72 | #endif /* _LINUX_OF_DEVICE_H */ | 72 | #endif /* _LINUX_OF_DEVICE_H */ |
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 | */ | ||
| 62 | struct 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 | |||
| 77 | extern const struct of_device_id of_default_bus_match_table[]; | 54 | extern 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); |
| 83 | extern struct platform_device *of_find_device_by_node(struct device_node *np); | 60 | extern 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 */ |
| 87 | extern struct platform_device *of_platform_device_create(struct device_node *np, | 63 | extern 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, | |||
| 91 | extern int of_platform_bus_probe(struct device_node *root, | 67 | extern 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 | ||
| 94 | extern int of_platform_populate(struct device_node *root, | 71 | extern 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) | ||
| 103 | struct of_dev_auxdata; | ||
| 104 | struct device_node; | ||
| 105 | static inline int of_platform_populate(struct device_node *root, | 76 | static 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 */ |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index cd46ee58b9dc..ce8e4ffd78c7 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
| @@ -180,6 +180,9 @@ struct platform_driver { | |||
| 180 | const struct platform_device_id *id_table; | 180 | const struct platform_device_id *id_table; |
| 181 | }; | 181 | }; |
| 182 | 182 | ||
| 183 | #define to_platform_driver(drv) (container_of((drv), struct platform_driver, \ | ||
| 184 | driver)) | ||
| 185 | |||
| 183 | /* | 186 | /* |
| 184 | * use a macro to avoid include chaining to get THIS_MODULE | 187 | * use a macro to avoid include chaining to get THIS_MODULE |
| 185 | */ | 188 | */ |
