From: Johan Hovold <johan@kernel.org>
To: Samuel Ortiz <sameo@linux.intel.com>, Lee Jones <lee.jones@linaro.org>
Cc: Jiri Kosina <jkosina@suse.cz>,
linux-input@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
Johan Hovold <johan@kernel.org>
Subject: [PATCH 3/6] mfd: core: add helper function to register hotplug devices
Date: Fri, 26 Sep 2014 12:55:30 +0200 [thread overview]
Message-ID: <1411728933-13351-4-git-send-email-johan@kernel.org> (raw)
In-Reply-To: <1411728933-13351-1-git-send-email-johan@kernel.org>
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>
---
include/linux/mfd/core.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h
index f543de91ce19..1e47262a1c63 100644
--- a/include/linux/mfd/core.h
+++ b/include/linux/mfd/core.h
@@ -108,6 +108,13 @@ extern int mfd_add_devices(struct device *parent, int id,
struct resource *mem_base,
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);
#endif
--
1.8.5.5
next prev parent reply other threads:[~2014-09-26 10:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-26 10:55 [PATCH 0/6] mfd: fix platform-device id collisions Johan Hovold
2014-09-26 10:55 ` [PATCH 1/6] mfd: viperboard: fix platform-device id collision Johan Hovold
2014-10-07 9:21 ` Lee Jones
2014-09-26 10:55 ` [PATCH 2/6] mfd: rtsx_usb: fix platform device-id collision Johan Hovold
2014-10-07 9:22 ` Lee Jones
2014-10-07 12:52 ` Johan Hovold
2014-09-26 10:55 ` Johan Hovold [this message]
2014-10-07 9:24 ` [PATCH 3/6] mfd: core: add helper function to register hotplug devices Lee Jones
2014-09-26 10:55 ` [PATCH 4/6] mfd: use mfd_add_hotplug_devices helper Johan Hovold
2014-10-07 9:24 ` Lee Jones
2014-09-26 10:55 ` [PATCH 5/6] HID: hid-sensor-hub: " Johan Hovold
2014-09-26 11:25 ` Jiri Kosina
2014-10-07 9:24 ` Lee Jones
2014-09-26 10:55 ` [PATCH 6/6] mfd: core: fix platform-device id generation Johan Hovold
2014-10-07 9:25 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1411728933-13351-4-git-send-email-johan@kernel.org \
--to=johan@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jkosina@suse.cz \
--cc=lee.jones@linaro.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sameo@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome