lkml.org 
[lkml]   [2023]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v12 05/10] drm/bridge: anx7625: Check for Type-C during panel registration
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


\
 
 \ /
  Last update: 2023-03-27 00:30    [W:0.100 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site