OSDN Git Service

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)
commitfc801750b197d0f00c09e01e59a7dcd240fddcb5
tree8ae8a55ca50bc4623f35973415faec5717fa58d7
parent7d188c521d9ec3650136e9b9c81c61b22a544ab3
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