Skip to content

Commit 0bd9e02

Browse files
lumaggregkh
authored andcommitted
usb: typec: altmodes/displayport: add support for embedded DP cases
In the embedded cases, the DisplayPort connector is handled by the TCPM itself. It was proposed to add the "displayport" OF property to the DT bindings, but it was rejected in favour of properly describing the electrical signal path using of_graph. Fallback to the controller fwnode for HPD notifications to support such usecases without requiring additional DT properties. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20230817150824.14371-2-dmitry.baryshkov@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ae25761 commit 0bd9e02

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

drivers/usb/typec/altmodes/displayport.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,10 @@ int dp_altmode_probe(struct typec_altmode *alt)
594594
alt->ops = &dp_altmode_ops;
595595

596596
fwnode = dev_fwnode(alt->dev.parent->parent); /* typec_port fwnode */
597-
dp->connector_fwnode = fwnode_find_reference(fwnode, "displayport", 0);
597+
if (fwnode_property_present(fwnode, "displayport"))
598+
dp->connector_fwnode = fwnode_find_reference(fwnode, "displayport", 0);
599+
else
600+
dp->connector_fwnode = fwnode_handle_get(fwnode); /* embedded DP */
598601
if (IS_ERR(dp->connector_fwnode))
599602
dp->connector_fwnode = NULL;
600603

0 commit comments

Comments
 (0)