diff options
| author | Johan Hovold <johan@kernel.org> | 2014-09-26 06:55:30 -0400 |
|---|---|---|
| committer | Lee Jones <lee.jones@linaro.org> | 2014-11-10 11:30:03 -0500 |
| commit | a7975473cc41773d9f6d8ea72b48c7656e6cd0f6 (patch) | |
| tree | c8435ca96f0f8651677c08193db8cde5a2e004bf /include/linux/mfd | |
| parent | f114040e3ea6e07372334ade75d1ee0775c355e1 (diff) | |
mfd: core: Add helper function to register hotplug devices
Hot-pluggable multi-function devices should always be registered with
PLATFORM_DEVID_AUTO to avoid name collisions on the platform bus. This
helper also hides the memory map and irq parameters, which aren't used
by hot-pluggable (e.g. USB-based) devices.
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux/mfd')
| -rw-r--r-- | include/linux/mfd/core.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index 73e1709d4c09..a76bc100bf97 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h | |||
| @@ -111,6 +111,13 @@ extern int mfd_add_devices(struct device *parent, int id, | |||
| 111 | struct resource *mem_base, | 111 | struct resource *mem_base, |
| 112 | int irq_base, struct irq_domain *irq_domain); | 112 | int irq_base, struct irq_domain *irq_domain); |
| 113 | 113 | ||
| 114 | static inline int mfd_add_hotplug_devices(struct device *parent, | ||
| 115 | const struct mfd_cell *cells, int n_devs) | ||
| 116 | { | ||
| 117 | return mfd_add_devices(parent, PLATFORM_DEVID_AUTO, cells, n_devs, | ||
| 118 | NULL, 0, NULL); | ||
| 119 | } | ||
| 120 | |||
| 114 | extern void mfd_remove_devices(struct device *parent); | 121 | extern void mfd_remove_devices(struct device *parent); |
| 115 | 122 | ||
| 116 | #endif | 123 | #endif |
