diff options
author | Archit Taneja <architt@codeaurora.org> | 2016-02-12 14:48:32 +0530 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2016-03-02 17:01:09 +0100 |
commit | bf4363ce3a67ba06042351f40841ef4da9b30787 (patch) | |
tree | 5e15709da138043973dcafd43a0933e3e600818f /include/drm/drm_mipi_dsi.h | |
parent | c63ae8a9686bb8c87154a31dc5ebadbda778a8e5 (diff) |
drm/dsi: Try to match non-DT DSI devices
Add a device name field in struct mipi_dsi_device. This name is not the
same as the device name (which is of the format "hostname.reg"). When
the device is created via DT, this name is set to the modalias string.
In the non-DT case, the driver creating the DSI device provides the
name by populating a field in struct mipi_dsi_device_info.
Matching for DT case would be as it was before. For the non-DT case, we
compare the device and driver names. Other buses (like I2C/SPI) perform
a non-DT match by comparing the device name and entries in the driver's
id_table. Such a mechanism isn't used for the DSI bus.
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'include/drm/drm_mipi_dsi.h')
-rw-r--r-- | include/drm/drm_mipi_dsi.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index ce5eae438fd1..a91411682e83 100644 --- a/include/drm/drm_mipi_dsi.h +++ b/include/drm/drm_mipi_dsi.h @@ -139,15 +139,19 @@ enum mipi_dsi_pixel_format { MIPI_DSI_FMT_RGB565, }; - /** +#define DSI_DEV_NAME_SIZE 20 + +/** * struct mipi_dsi_device_info - template for creating a mipi_dsi_device + * @type: DSI peripheral chip type * @channel: DSI virtual channel assigned to peripheral - * @node: pointer to OF device node + * @node: pointer to OF device node or NULL * * This is populated and passed to mipi_dsi_device_new to create a new * DSI device */ struct mipi_dsi_device_info { + char type[DSI_DEV_NAME_SIZE]; u32 channel; struct device_node *node; }; @@ -156,6 +160,7 @@ struct mipi_dsi_device_info { * struct mipi_dsi_device - DSI peripheral device * @host: DSI host for this peripheral * @dev: driver model device node for this peripheral + * @name: DSI peripheral chip type * @channel: virtual channel assigned to the peripheral * @format: pixel format for video mode * @lanes: number of active data lanes @@ -165,6 +170,7 @@ 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; |