]> git.baikalelectronics.ru Git - kernel.git/commit
drm: of: Add drm_of_get_data_lanes_count and drm_of_get_data_lanes_ep
authorMarek Vasut <marex@denx.de>
Tue, 24 May 2022 01:05:12 +0000 (03:05 +0200)
committerMarek Vasut <marex@denx.de>
Sun, 12 Jun 2022 10:22:22 +0000 (12:22 +0200)
commit8fbf544de3818896e1966b500c2687e0a6b53d41
tree8ae8a55ca50bc4623f35973415faec5717fa58d7
parent7389bcf7381869e8141f36a4749a3179e639c7a7
drm: of: Add drm_of_get_data_lanes_count and drm_of_get_data_lanes_ep

Add helper function to count and sanitize DT "data-lanes" property
and return either error or the data-lanes count. This is useful for
both DSI and (e)DP "data-lanes" property. The later version of the
function is an extra wrapper which handles the endpoint look up by
regs, that's what majority of the drivers duplicate too, but not all
of them.

Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Maxime Ripard <maxime@cerno.tech>
Cc: Robert Foss <robert.foss@linaro.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
To: dri-devel@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20220524010522.528569-1-marex@denx.de
drivers/gpu/drm/drm_of.c
include/drm/drm_of.h