aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorArchit Taneja <architt@codeaurora.org>2015-08-19 16:14:09 +0530
committerSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2015-11-17 09:22:30 +0000
commit8ebd0d988d9ed23c46322797108412f35149199a (patch)
treee437870616f375da010bf6aeab6b1f3bbeccbe3d /include
parent6a13feb9c82803e2b815eca72fa7a9f5561d7861 (diff)
drm/mipi_dsi: refactor device creation
Create a helper function mipi_dsi_device_new which takes in struct mipi_dsi_device_info and the mipi_dsi_host. This will be called by of_mipi_dsi_device_add. Instead of calling device_initialize and device_add separately, merge it into a single device_register call. This will remove the need of having two separate funcs mipi_dsi_device_alloc and mipi_dsi_device_add. The reason for creating mipi_dsi_device_new is that it can also be used as a standalone way for creating a dsi device that isn't available via DT. Signed-off-by: Archit Taneja <architt@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/drm/drm_mipi_dsi.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
index f1d8d0dbb4f1..5a35c6fd9b09 100644
--- a/include/drm/drm_mipi_dsi.h
+++ b/include/drm/drm_mipi_dsi.h
@@ -139,10 +139,13 @@ enum mipi_dsi_pixel_format {
MIPI_DSI_FMT_RGB565,
};
+#define DSI_DEV_NAME_SIZE 20
+
/**
* struct mipi_dsi_device - DSI peripheral device
* @host: DSI host for this peripheral
* @dev: driver model device node for this peripheral
+ * @name: name of the dsi peripheral
* @channel: virtual channel assigned to the peripheral
* @format: pixel format for video mode
* @lanes: number of active data lanes
@@ -152,6 +155,8 @@ struct mipi_dsi_device {
struct mipi_dsi_host *host;
struct device dev;
+ char name[DSI_DEV_NAME_SIZE];
+
unsigned int channel;
unsigned int lanes;
enum mipi_dsi_pixel_format format;