Thread (21 messages) 21 messages, 2 authors, 2023-02-22

Re: [PATCH v12 05/10] drm/bridge: anx7625: Check for Type-C during panel registration

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2023-02-21 11:51:21
Also in: chrome-platform, dri-devel, linux-acpi, lkml

On Tue, Feb 21, 2023 at 05:50:49PM +0800, Pin-yen Lin wrote:
The output port endpoints can be connected to USB-C connectors.
Running drm_of_find_panel_or_bridge() with such endpoints leads to
a continuous return value of -EPROBE_DEFER, even though there is
no panel present.

To avoid this, check for the existence of a "mode-switch" property in
the port endpoint, and skip panel registration completely if so.
...
quoted hunk ↗ jump to hunk
+	port_node = of_graph_get_port_by_id(np, 1);
+	fwnode_for_each_typec_mode_switch(&port_node->fwnode, fwnode) {
+		fwnode_handle_put(fwnode);
+		return 0;
+	}
With the proposed count API:

	unsigned int count;
	...
	port_node = ...
	count = typec_mode_switch_node_count(&port_node->fwnode);
	if (count == 0)
		return 0;

-- 
With Best Regards,
Andy Shevchenko

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help