diff options
author | Archit Taneja <architt@codeaurora.org> | 2016-02-12 09:18:31 (GMT) |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2016-03-02 16:00:18 (GMT) |
commit | c63ae8a9686bb8c87154a31dc5ebadbda778a8e5 (patch) | |
tree | c417cd6f3c7fab96c46e01bf5091a918611b458a /include/drm | |
parent | fc903ebd50d0396b5de1ff614a009c2ddcb3222c (diff) | |
download | linux-c63ae8a9686bb8c87154a31dc5ebadbda778a8e5.tar.xz |
drm/dsi: Use mipi_dsi_device_register_full() for DSI device creation
Use mipi_dsi_device_register_full() for device creation. This takes in
a struct mipi_dsi_device_info as a template to populate the DSI device
information.
The reason to introduce this is to have a way to create DSI devices not
available via DT. Drivers that want to create a DSI device can populate
a struct mipi_dsi_device_info and call this function. For DSI devices
available via DT, of_mipi_dsi_device_add() is used as before, but this
now calls mipi_dsi_device_register_full() internally.
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_mipi_dsi.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index 1b3b1f8..ce5eae43 100644 --- a/include/drm/drm_mipi_dsi.h +++ b/include/drm/drm_mipi_dsi.h @@ -139,6 +139,19 @@ enum mipi_dsi_pixel_format { MIPI_DSI_FMT_RGB565, }; + /** + * struct mipi_dsi_device_info - template for creating a mipi_dsi_device + * @channel: DSI virtual channel assigned to peripheral + * @node: pointer to OF device node + * + * This is populated and passed to mipi_dsi_device_new to create a new + * DSI device + */ +struct mipi_dsi_device_info { + u32 channel; + struct device_node *node; +}; + /** * struct mipi_dsi_device - DSI peripheral device * @host: DSI host for this peripheral @@ -188,6 +201,9 @@ static inline int mipi_dsi_pixel_format_to_bpp(enum mipi_dsi_pixel_format fmt) return -EINVAL; } +struct mipi_dsi_device * +mipi_dsi_device_register_full(struct mipi_dsi_host *host, + const struct mipi_dsi_device_info *info); 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); |