Commit a7975473 authored by Johan Hovold's avatar Johan Hovold Committed by Lee Jones

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: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent f114040e
...@@ -111,6 +111,13 @@ extern int mfd_add_devices(struct device *parent, int id, ...@@ -111,6 +111,13 @@ extern int mfd_add_devices(struct device *parent, int id,
struct resource *mem_base, struct resource *mem_base,
int irq_base, struct irq_domain *irq_domain); int irq_base, struct irq_domain *irq_domain);
static inline int mfd_add_hotplug_devices(struct device *parent,
const struct mfd_cell *cells, int n_devs)
{
return mfd_add_devices(parent, PLATFORM_DEVID_AUTO, cells, n_devs,
NULL, 0, NULL);
}
extern void mfd_remove_devices(struct device *parent); extern void mfd_remove_devices(struct device *parent);
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment