[PATCH v11 5/9] drm/bridge: anx7625: Check for Type-C during panel registration

Andy Shevchenko andriy.shevchenko at linux.intel.com
Mon Feb 6 12:11:08 UTC 2023


On Sat, Feb 04, 2023 at 09:30:36PM +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.

...

> +	/*
> +	 * Don't bother finding a panel if a Type-C `mode-switch` property is
> +	 * present in one of the endpoints.
> +	 */
> +	for_each_endpoint_of_node(np, sw) {
> +		if (of_property_read_bool(sw, "mode-switch")) {

Might be that the same helper can be used here. Dunno if the endpoint traverse
should be used for the other driver as well.

> +			of_node_put(sw);
> +			return 0;
> +		}
> +	}

-- 
With Best Regards,
Andy Shevchenko




More information about the dri-devel mailing list