summaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorChris Morgan <macromorgan@hotmail.com>2023-01-23 16:46:00 +0100
committerLinus Walleij <linus.walleij@linaro.org>2023-01-27 09:39:21 +0100
commit19ff997ffc43cb203fb7d6ac169b69e26c7dcbfb (patch)
tree27048464fbffea670e6c13ca4c1cda8c4d9bac21 /include/drm
parentdrm: panel: jd9365da-h3: Add Radxa Display 8HD (diff)
downloadlinux-19ff997ffc43cb203fb7d6ac169b69e26c7dcbfb.tar.xz
linux-19ff997ffc43cb203fb7d6ac169b69e26c7dcbfb.zip
drm: of: Add drm_of_get_dsi_bus helper function
Add helper function to find DSI host for devices where DSI panel is not a minor of a DSI bus (such as the Samsung AMS495QA01 panel or the official Raspberry Pi touchscreen display). Co-developed-by: Maya Matuszczyk <maccraft123mc@gmail.com> Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com> Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Reviewed-by: Maxime Ripard <maxime@cerno.tech> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230123154603.1315112-2-macroalpha82@gmail.com
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_of.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h
index 10ab58c40746..082a6e980d01 100644
--- a/include/drm/drm_of.h
+++ b/include/drm/drm_of.h
@@ -15,6 +15,8 @@ struct drm_encoder;
struct drm_panel;
struct drm_bridge;
struct device_node;
+struct mipi_dsi_device_info;
+struct mipi_dsi_host;
/**
* enum drm_lvds_dual_link_pixels - Pixel order of an LVDS dual-link connection
@@ -129,6 +131,16 @@ drm_of_get_data_lanes_count_ep(const struct device_node *port,
}
#endif
+#if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_DRM_MIPI_DSI)
+struct mipi_dsi_host *drm_of_get_dsi_bus(struct device *dev);
+#else
+static inline struct
+mipi_dsi_host *drm_of_get_dsi_bus(struct device *dev)
+{
+ return ERR_PTR(-EINVAL);
+}
+#endif /* CONFIG_OF && CONFIG_DRM_MIPI_DSI */
+
/*
* drm_of_panel_bridge_remove - remove panel bridge
* @np: device tree node containing panel bridge output ports