mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
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 <Adam.Thomson.Opensource@diasemi.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 38c6528d40)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user