Skip to contentSkip to conversation

usb: typec: fusb302: Populate tcpc fwnode for TCPM property handling

PATCH New Heikki Krogerus 1 participant 1 message Sep 20, 2018

Subsystems (2)
lore
Share & tools
lore

Heikki Krogerus

author maintainer
#0 lore raw

PATCH 3/12 usb: typec: fusb302: Populate tcpc fwnode for TCPM property handling

From: Adam Thomson <[email protected]>

This update populates the tcpc handle's fwnode pointer with the child usb-connector node, if it exists, so that TCPM can perform generic property handling to define the ports capabilities.

---
 drivers/usb/typec/fusb302/fusb302.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/usb/typec/fusb302/fusb302.c +3 -0
index 82bed9810be6..1b464c948d76 100644
@@ -1736,6 +1736,9 @@ static int fusb302_probe(struct i2c_client *client,
 	chip->tcpc_dev.config = &chip->tcpc_config;
 	mutex_init(&chip->lock);
 
+	chip->tcpc_dev.fwnode =
+		device_get_named_child_node(dev, "connector");
+
 	if (!device_property_read_u32(dev, "fcs,operating-sink-microwatt", &v))
 		chip->tcpc_config.operating_snk_mw = v / 1000;