diff options
author | Marco Felsch <m.felsch@pengutronix.de> | 2024-02-22 22:09:02 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-03-05 13:29:30 +0000 |
commit | ac92ea6b656374abab230f9f38fd3f0ab6cd0d61 (patch) | |
tree | c206375a1919d81812fb83914a58247bb7e79a7f /drivers/usb | |
parent | 8774ea7a553e2aec323170d49365b59af0a2b7e0 (diff) | |
download | linux-ac92ea6b656374abab230f9f38fd3f0ab6cd0d61.tar.gz linux-ac92ea6b656374abab230f9f38fd3f0ab6cd0d61.tar.bz2 linux-ac92ea6b656374abab230f9f38fd3f0ab6cd0d61.zip |
usb: typec: tcpm: add support to set tcpc connector orientatition
This adds the support to set the connector orientation value
accordingly. This is part of the optional CONFIG_STANDARD_OUTPUT
register 0x18, specified within the USB port controller spsicification
rev. 2.0 [1].
[1] https://www.usb.org/sites/default/files/documents/usb-port_controller_specification_rev2.0_v1.0_0.pdf
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240222210903.208901-4-m.felsch@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/typec/tcpm/tcpm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index b6d7131228f9..3d505614bff1 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -1167,6 +1167,12 @@ static int tcpm_set_roles(struct tcpm_port *port, bool attached, if (ret < 0) return ret; + if (port->tcpc->set_orientation) { + ret = port->tcpc->set_orientation(port->tcpc, orientation); + if (ret < 0) + return ret; + } + port->pwr_role = role; port->data_role = data; typec_set_data_role(port->typec_port, data); |