summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2021-09-10 12:11:58 +0200
committerFrancesco Dolcini <francesco.dolcini@toradex.com>2023-03-22 11:52:49 +0100
commit22c05f2a96a1877ccf50760ffb1ca20f8eef2038 (patch)
treecf385383b62c24cb4e28a63bae4ed67de5b19d9e /include
parent4a2bae64b2a7cf82cce8ceda5bc012ece933ef11 (diff)
drm/mipi-dsi: Create devm device attachment
MIPI-DSI devices need to call mipi_dsi_attach() when their probe is done to attach against their host. However, at removal or when an error occurs, that attachment needs to be undone through a call to mipi_dsi_detach(). Let's create a device-managed variant of the attachment function that will automatically detach the device at unbind. Upstream-Status: Backport [db6568498b35a4d5d5a99420df27ed25fae31406] Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20210910101218.1632297-5-maxime@cerno.tech
Diffstat (limited to 'include')
-rw-r--r--include/drm/drm_mipi_dsi.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
index 66c254e81708..453150da24f2 100644
--- a/include/drm/drm_mipi_dsi.h
+++ b/include/drm/drm_mipi_dsi.h
@@ -228,6 +228,7 @@ devm_mipi_dsi_device_register_full(struct device *dev, struct mipi_dsi_host *hos
struct mipi_dsi_device *of_find_mipi_dsi_device_by_node(struct device_node *np);
int mipi_dsi_attach(struct mipi_dsi_device *dsi);
int mipi_dsi_detach(struct mipi_dsi_device *dsi);
+int devm_mipi_dsi_attach(struct device *dev, struct mipi_dsi_device *dsi);
int mipi_dsi_shutdown_peripheral(struct mipi_dsi_device *dsi);
int mipi_dsi_turn_on_peripheral(struct mipi_dsi_device *dsi);
int mipi_dsi_set_maximum_return_packet_size(struct mipi_dsi_device *dsi,