You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
UPSTREAM: usb: typec: tcpm: Add support for altmodes
Add support for altmodes described in the usb-connector fwnode
associated with the Type-C controller by calling the new
typec_port_register_altmodes_from_fwnode() helper for this.
Bug: 279314285
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210409134033.105834-3-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: I0d7de11b08f1c297e78c7f4cbea90b6d85f8abe5
Signed-off-by: yubing.zhang <yubing.zhang@rock-chips.com>
(cherry picked from commit 55d8b34772)
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
committed by
Treehugger Robot
parent
5bbc750d9e
commit
7513f3e148
@@ -6521,6 +6521,10 @@ struct tcpm_port *tcpm_register_port(struct device *dev, struct tcpc_dev *tcpc)
|
||||
goto out_role_sw_put;
|
||||
}
|
||||
|
||||
typec_port_register_altmodes(port->typec_port,
|
||||
&tcpm_altmode_ops, port,
|
||||
port->port_altmode, ALTMODE_DISCOVERY_MAX);
|
||||
|
||||
mutex_lock(&port->lock);
|
||||
tcpm_init(port);
|
||||
mutex_unlock(&port->lock);
|
||||
|
||||
Reference in New Issue
Block a user