From 44d0361b097cbd7976d3ba53f748c07424e5b301 Mon Sep 17 00:00:00 2001 From: Adam Thomson Date: Tue, 21 Aug 2018 13:28:23 +0100 Subject: [PATCH] UPSTREAM: usb: typec: fusb302: Populate tcpc fwnode for TCPM property handling 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. Change-Id: Ifaad94abeab5bca8e381f445e00e5c248a340877 Signed-off-by: Adam Thomson Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman Signed-off-by: Frank Wang (cherry picked from commit 38c6528d40d8085183916b3ef851ddea66fd84dd) --- drivers/usb/typec/fusb302/fusb302.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/typec/fusb302/fusb302.c b/drivers/usb/typec/fusb302/fusb302.c index de9dca25ff8e..5793b0d92cf6 100644 --- a/drivers/usb/typec/fusb302/fusb302.c +++ b/drivers/usb/typec/fusb302/fusb302.c @@ -1731,6 +1731,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;