summaryrefslogtreecommitdiff
path: root/include/linux/of_device.h
diff options
context:
space:
mode:
authorStephen Boyd <stephen.boyd@linaro.org>2016-12-29 01:56:47 +0300
committerPeter Chen <peter.chen@nxp.com>2017-01-20 06:23:51 +0300
commit9c829c097f2f1cbebcfff69a7254b1df9852fe4e (patch)
tree0c2329e62da791c3488f07b42df3f4a41f24a984 /include/linux/of_device.h
parent3f991aa0b665c8e9bb702421a4e5005c3588fb62 (diff)
downloadlinux-9c829c097f2f1cbebcfff69a7254b1df9852fe4e.tar.xz
of: device: Support loading a module with OF based modalias
In the case of ULPI devices, we want to be able to load the driver before registering the device so that we don't get stuck in a loop waiting for the phy module to appear and failing usb controller probe. Currently we request the ulpi module via the ulpi ids, but in the DT case we might need to request it with the OF based modalias instead. Add a common function that allows anyone to request a module with the OF based modalias. Acked-by: Rob Herring <robh@kernel.org> Cc: <devicetree@vger.kernel.org> Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org> Signed-off-by: Peter Chen <peter.chen@nxp.com>
Diffstat (limited to 'include/linux/of_device.h')
-rw-r--r--include/linux/of_device.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index cc7dd687a89d..e9afbcc8de12 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -37,6 +37,7 @@ extern const void *of_device_get_match_data(const struct device *dev);
extern ssize_t of_device_get_modalias(struct device *dev,
char *str, ssize_t len);
+extern int of_device_request_module(struct device *dev);
extern void of_device_uevent(struct device *dev, struct kobj_uevent_env *env);
extern int of_device_uevent_modalias(struct device *dev, struct kobj_uevent_env *env);
@@ -78,6 +79,11 @@ static inline int of_device_get_modalias(struct device *dev,
return -ENODEV;
}
+static inline int of_device_request_module(struct device *dev)
+{
+ return -ENODEV;
+}
+
static inline int of_device_uevent_modalias(struct device *dev,
struct kobj_uevent_env *env)
{