diff options
| author | Adam Thomson <[email protected]> | 2018-08-21 12:28:23 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2018-09-20 10:56:02 +0000 |
| commit | 38c6528d40d8085183916b3ef851ddea66fd84dd (patch) | |
| tree | 0548c4d1e640e40a492f8f2d1e50481de596c7f6 | |
| parent | dt-bindings: usb: fusb302: Use usb-connector bindings for configuration (diff) | |
| download | kernel-38c6528d40d8085183916b3ef851ddea66fd84dd.tar.gz kernel-38c6528d40d8085183916b3ef851ddea66fd84dd.zip | |
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.
Signed-off-by: Adam Thomson <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Reviewed-by: Heikki Krogerus <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
| -rw-r--r-- | drivers/usb/typec/fusb302/fusb302.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/typec/fusb302/fusb302.c b/drivers/usb/typec/fusb302/fusb302.c index ad7cfed1cea7..1cb0cd2a4e63 100644 --- a/drivers/usb/typec/fusb302/fusb302.c +++ b/drivers/usb/typec/fusb302/fusb302.c @@ -1725,6 +1725,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; |
