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. 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>
This commit is contained in:
parent
7b458a4c5d
commit
55d8b34772
@ -6143,6 +6143,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);
|
||||
|
Loading…
Reference in New Issue
Block a user