diff options
author | Badhri Jagan Sridharan <badhri@google.com> | 2020-10-08 09:15:42 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-08 10:27:42 +0300 |
commit | 58ea326b228c3525b234adcc49ba94e44ebf529b (patch) | |
tree | d5fb47c2c6a084db4832dee99448c0a8c83bc31e /drivers/usb/typec/tcpm/tcpci.c | |
parent | 9e8586827a7061fdb183e6571fac63af378be013 (diff) | |
download | linux-58ea326b228c3525b234adcc49ba94e44ebf529b.tar.xz |
usb: typec: tcpci: Add a getter method to retrieve tcpm_port reference
Allow chip level drivers to retrieve reference to tcpm_port.
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20201008061556.1402293-2-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec/tcpm/tcpci.c')
-rw-r--r-- | drivers/usb/typec/tcpm/tcpci.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c index 7d9491ba62fb..b960fe5a0f28 100644 --- a/drivers/usb/typec/tcpm/tcpci.c +++ b/drivers/usb/typec/tcpm/tcpci.c @@ -38,6 +38,12 @@ struct tcpci_chip { struct tcpci_data data; }; +struct tcpm_port *tcpci_get_tcpm_port(struct tcpci *tcpci) +{ + return tcpci->port; +} +EXPORT_SYMBOL_GPL(tcpci_get_tcpm_port); + static inline struct tcpci *tcpc_to_tcpci(struct tcpc_dev *tcpc) { return container_of(tcpc, struct tcpci, tcpc); |