Fixing broken patch
This commit is contained in:
parent
4bba1d3c5e
commit
803ea84d8b
@ -51,13 +51,18 @@ index 111111111111..222222222222 100644
|
|||||||
/* Determining the initial pin assignment. */
|
/* Determining the initial pin assignment. */
|
||||||
if (!DP_CONF_GET_PIN_ASSIGN(dp->data.conf)) {
|
if (!DP_CONF_GET_PIN_ASSIGN(dp->data.conf)) {
|
||||||
/* Is USB together with DP preferred */
|
/* Is USB together with DP preferred */
|
||||||
@@ -814,15 +832,37 @@ int dp_altmode_probe(struct typec_altmode *alt)
|
@@ -757,16 +775,40 @@ int dp_altmode_probe(struct typec_altmode *alt)
|
||||||
struct typec_altmode *plug = typec_altmode_get_plug(alt, TYPEC_PLUG_SOP_P);
|
struct typec_altmode *plug = typec_altmode_get_plug(alt, TYPEC_PLUG_SOP_P);
|
||||||
struct fwnode_handle *fwnode;
|
struct fwnode_handle *fwnode;
|
||||||
struct dp_altmode *dp;
|
struct dp_altmode *dp;
|
||||||
+ u32 port_pins, alt_pins;
|
+ u32 port_pins, alt_pins;
|
||||||
|
|
||||||
/* FIXME: Port can only be DFP_U. */
|
/* Port can only be DFP_U. */
|
||||||
|
- if (typec_altmode_get_data_role(alt) != TYPEC_HOST)
|
||||||
|
+ if (typec_altmode_get_data_role(alt) != TYPEC_HOST) {+
|
||||||
|
+ typec_altmode_put_plug(plug);
|
||||||
|
return -EPROTO;
|
||||||
|
+ }
|
||||||
|
|
||||||
- /* Make sure we have compatible pin configurations */
|
- /* Make sure we have compatible pin configurations */
|
||||||
- if (!(DP_CAP_PIN_ASSIGN_DFP_D(port->vdo) &
|
- if (!(DP_CAP_PIN_ASSIGN_DFP_D(port->vdo) &
|
||||||
@ -82,6 +87,7 @@ index 111111111111..222222222222 100644
|
|||||||
+ if (!(port->vdo & DP_CAP_RECEPTACLE) && !(alt->vdo & DP_CAP_RECEPTACLE)) {
|
+ if (!(port->vdo & DP_CAP_RECEPTACLE) && !(alt->vdo & DP_CAP_RECEPTACLE)) {
|
||||||
+ dev_warn(&alt->dev, "Our Alt-DP VDO 0x%06x and peer port VDO 0x%06x are not compatible (both are reported as plugs!)\n",
|
+ dev_warn(&alt->dev, "Our Alt-DP VDO 0x%06x and peer port VDO 0x%06x are not compatible (both are reported as plugs!)\n",
|
||||||
+ port->vdo, alt->vdo);
|
+ port->vdo, alt->vdo);
|
||||||
|
+ typec_altmode_put_plug(plug);
|
||||||
+ return -ENODEV;
|
+ return -ENODEV;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -89,11 +95,9 @@ index 111111111111..222222222222 100644
|
|||||||
+ if (!(port_pins & alt_pins)) {
|
+ if (!(port_pins & alt_pins)) {
|
||||||
+ dev_warn(&alt->dev, "Our Alt-DP VDO 0x%06x and peer port VDO 0x%06x are not compatible (no shared pinconf %04x<->%04x (UUDD))\n",
|
+ dev_warn(&alt->dev, "Our Alt-DP VDO 0x%06x and peer port VDO 0x%06x are not compatible (no shared pinconf %04x<->%04x (UUDD))\n",
|
||||||
+ port->vdo, alt->vdo, port_pins, alt_pins);
|
+ port->vdo, alt->vdo, port_pins, alt_pins);
|
||||||
|
typec_altmode_put_plug(plug);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
+ }
|
}
|
||||||
|
|
||||||
dp = devm_kzalloc(&alt->dev, sizeof(*dp), GFP_KERNEL);
|
|
||||||
if (!dp)
|
|
||||||
--
|
--
|
||||||
Armbian
|
Armbian
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user