aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.4/0448-drm-Emit-modalias-uevents-for-the-DSI-devices-we-cre.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2016-09-10 14:54:26 +0200
committerÁlvaro Fernández Rojas <noltari@gmail.com>2016-09-10 14:54:26 +0200
commit2b1c6b21b5e6c82ebb55d7fb7df90e60e88cbb14 (patch)
treeba6d48b4fec219d07110f5d55afc19bc309d2bdb /target/linux/brcm2708/patches-4.4/0448-drm-Emit-modalias-uevents-for-the-DSI-devices-we-cre.patch
parentac08cb06f6734ebf73ed855cbc836c566f80eaca (diff)
downloadupstream-2b1c6b21b5e6c82ebb55d7fb7df90e60e88cbb14.tar.gz
upstream-2b1c6b21b5e6c82ebb55d7fb7df90e60e88cbb14.tar.bz2
upstream-2b1c6b21b5e6c82ebb55d7fb7df90e60e88cbb14.zip
brcm2708: update linux 4.4 patches to latest version
As usual these patches were extracted and rebased from the raspberry pi repo: https://github.com/raspberrypi/linux/tree/rpi-4.4.y Also adds support for Raspberry Pi Compute Module 3 (untested). Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.4/0448-drm-Emit-modalias-uevents-for-the-DSI-devices-we-cre.patch')
-rw-r--r--target/linux/brcm2708/patches-4.4/0448-drm-Emit-modalias-uevents-for-the-DSI-devices-we-cre.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0448-drm-Emit-modalias-uevents-for-the-DSI-devices-we-cre.patch b/target/linux/brcm2708/patches-4.4/0448-drm-Emit-modalias-uevents-for-the-DSI-devices-we-cre.patch
new file mode 100644
index 0000000000..77b0eca35e
--- /dev/null
+++ b/target/linux/brcm2708/patches-4.4/0448-drm-Emit-modalias-uevents-for-the-DSI-devices-we-cre.patch
@@ -0,0 +1,48 @@
+From e46450e232a96665344b825557bacf1d37842174 Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric@anholt.net>
+Date: Tue, 9 Aug 2016 15:13:33 -0700
+Subject: [PATCH] drm: Emit modalias uevents for the DSI devices we create.
+
+This gets the Raspberry Pi panel module to automatically load at boot
+time.
+
+Signed-off-by: Eric Anholt <eric@anholt.net>
+---
+ drivers/gpu/drm/drm_mipi_dsi.c | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+--- a/drivers/gpu/drm/drm_mipi_dsi.c
++++ b/drivers/gpu/drm/drm_mipi_dsi.c
+@@ -50,6 +50,24 @@ static int mipi_dsi_device_match(struct
+ return of_driver_match_device(dev, drv);
+ }
+
++/**
++ * Send modalias events when devices are created on the bus, so that
++ * modules can load automatically.
++ */
++static int mipi_dsi_uevent(struct device *dev, struct kobj_uevent_env *env)
++{
++ int rc;
++
++ /* Just do the OF uevent, which emits the compatible string so
++ * that a MODULE_DEVICE_TABLE(of, ...) works.
++ */
++ rc = of_device_uevent_modalias(dev, env);
++ if (rc != -ENODEV)
++ return rc;
++
++ return 0;
++}
++
+ static const struct dev_pm_ops mipi_dsi_device_pm_ops = {
+ .runtime_suspend = pm_generic_runtime_suspend,
+ .runtime_resume = pm_generic_runtime_resume,
+@@ -65,6 +83,7 @@ static struct bus_type mipi_dsi_bus_type
+ .name = "mipi-dsi",
+ .match = mipi_dsi_device_match,
+ .pm = &mipi_dsi_device_pm_ops,
++ .uevent = mipi_dsi_uevent,
+ };
+
+ static int of_device_match(struct device *dev, void *data)