Lines Matching +full:dt +full:- +full:node
1 // SPDX-License-Identifier: GPL-2.0-only
17 * A set of helper functions to aid DRM drivers in parsing standard DT
27 * drm_of_crtc_port_mask - find the mask of a registered CRTC by port OF node
29 * @port: port OF node
31 * Given a port OF node, return the possible mask of the corresponding
41 if (tmp->port == port) in drm_of_crtc_port_mask()
52 * drm_of_find_possible_crtcs - find the possible CRTCs for an encoder port
85 * drm_of_component_match_add - Add a component helper OF node match rule
89 * @node: of_node
94 struct device_node *node) in drm_of_component_match_add() argument
96 of_node_get(node); in drm_of_component_match_add()
98 compare, node); in drm_of_component_match_add()
103 * drm_of_component_probe - Generic probe function for a component based master
104 * @dev: master device containing the OF node
108 * Parse the platform device OF node and bind all the components associated
123 if (!dev->of_node) in drm_of_component_probe()
124 return -EINVAL; in drm_of_component_probe()
131 port = of_parse_phandle(dev->of_node, "ports", i); in drm_of_component_probe()
135 if (of_device_is_available(port->parent)) in drm_of_component_probe()
144 return -ENODEV; in drm_of_component_probe()
149 return -ENODEV; in drm_of_component_probe()
156 port = of_parse_phandle(dev->of_node, "ports", i); in drm_of_component_probe()
160 if (!of_device_is_available(port->parent)) { in drm_of_component_probe()
170 } else if (!of_device_is_available(remote->parent)) { in drm_of_component_probe()
189 * drm_of_encoder_active_endpoint - return the active encoder endpoint
190 * @node: device tree node containing encoder input ports
193 * Given an encoder device node and a drm_encoder with a connected crtc,
196 int drm_of_encoder_active_endpoint(struct device_node *node, in drm_of_encoder_active_endpoint() argument
201 struct drm_crtc *crtc = encoder->crtc; in drm_of_encoder_active_endpoint()
205 if (!node || !crtc) in drm_of_encoder_active_endpoint()
206 return -EINVAL; in drm_of_encoder_active_endpoint()
208 for_each_endpoint_of_node(node, ep) { in drm_of_encoder_active_endpoint()
211 if (port == crtc->port) { in drm_of_encoder_active_endpoint()
218 return -EINVAL; in drm_of_encoder_active_endpoint()
223 * drm_of_find_panel_or_bridge - return connected panel or bridge device
224 * @np: device tree node containing encoder output ports
225 * @port: port in the device tree node
226 * @endpoint: endpoint in the device tree node
230 * Given a DT node's port and endpoint number, find the connected node and
241 int ret = -EPROBE_DEFER; in drm_of_find_panel_or_bridge()
245 return -EINVAL; in drm_of_find_panel_or_bridge()
251 * node isn't found and the absence of the port is a legit case here, in drm_of_find_panel_or_bridge()
253 * device-tree node. in drm_of_find_panel_or_bridge()
256 return -ENODEV; in drm_of_find_panel_or_bridge()
260 return -ENODEV; in drm_of_find_panel_or_bridge()
295 of_property_read_bool(port_node, "dual-lvds-even-pixels"); in drm_of_lvds_get_port_pixels_type()
297 of_property_read_bool(port_node, "dual-lvds-odd-pixels"); in drm_of_lvds_get_port_pixels_type()
307 int pixels_type = -EPIPE; in drm_of_lvds_get_remote_pixels_type()
319 return -EPIPE; in drm_of_lvds_get_remote_pixels_type()
330 * support multiple sinks with different dual-link in drm_of_lvds_get_remote_pixels_type()
335 return -EINVAL; in drm_of_lvds_get_remote_pixels_type()
342 * drm_of_lvds_get_dual_link_pixel_order - Get LVDS dual-link pixel order
343 * @port1: First DT port node of the Dual-link LVDS source
344 * @port2: Second DT port node of the Dual-link LVDS source
346 * An LVDS dual-link connection is made of two links, with even pixels
348 * returns, for two ports of an LVDS dual-link source, which port shall transmit
351 * The pixel order is determined from the dual-lvds-even-pixels and
352 * dual-lvds-odd-pixels properties in the sink's DT port nodes. If those
354 * returns -EINVAL.
356 * If either port is not connected, this function returns -EPIPE.
358 * @port1 and @port2 are typically DT sibling nodes, but may have different
363 * * DRM_LVDS_DUAL_LINK_EVEN_ODD_PIXELS - @port1 carries even pixels and @port2
365 * * DRM_LVDS_DUAL_LINK_ODD_EVEN_PIXELS - @port1 carries odd pixels and @port2
367 * * -EINVAL - @port1 and @port2 are not connected to a dual-link LVDS sink, or
369 * * -EPIPE - when @port1 or @port2 are not connected
377 return -EINVAL; in drm_of_lvds_get_dual_link_pixel_order()
388 * A valid dual-lVDS bus is found when one remote port is marked with in drm_of_lvds_get_dual_link_pixel_order()
389 * "dual-lvds-even-pixels", and the other remote port is marked with in drm_of_lvds_get_dual_link_pixel_order()
390 * "dual-lvds-odd-pixels", bail out if the markers are not right. in drm_of_lvds_get_dual_link_pixel_order()
393 return -EINVAL; in drm_of_lvds_get_dual_link_pixel_order()