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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

...

> +	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





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux