Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/mipi-dsi: Add dev_is_mipi_dsi function

This will be especially useful for generic panels (like panel-simple)
which can take different code path depending on if they are MIPI-DSI
devices or platform devices.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Tested-by: Francesco Dolcini <francesco.dolcini@toradex.com> # Toradex Colibri iMX6
Link: https://lore.kernel.org/r/20250626-drm-panel-simple-fixes-v2-1-5afcaa608bdc@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org>

+5 -1
+2 -1
drivers/gpu/drm/drm_mipi_dsi.c
··· 91 91 .restore = pm_generic_restore, 92 92 }; 93 93 94 - static const struct bus_type mipi_dsi_bus_type = { 94 + const struct bus_type mipi_dsi_bus_type = { 95 95 .name = "mipi-dsi", 96 96 .match = mipi_dsi_device_match, 97 97 .uevent = mipi_dsi_uevent, 98 98 .pm = &mipi_dsi_device_pm_ops, 99 99 }; 100 + EXPORT_SYMBOL_GPL(mipi_dsi_bus_type); 100 101 101 102 /** 102 103 * of_find_mipi_dsi_device_by_node() - find the MIPI DSI device matching a
+3
include/drm/drm_mipi_dsi.h
··· 223 223 224 224 #define to_mipi_dsi_device(__dev) container_of_const(__dev, struct mipi_dsi_device, dev) 225 225 226 + extern const struct bus_type mipi_dsi_bus_type; 227 + #define dev_is_mipi_dsi(dev) ((dev)->bus == &mipi_dsi_bus_type) 228 + 226 229 /** 227 230 * mipi_dsi_pixel_format_to_bpp - obtain the number of bits per pixel for any 228 231 * given pixel format defined by the MIPI DSI