[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201008061556.1402293-2-badhri@google.com>
Date: Wed, 7 Oct 2020 23:15:42 -0700
From: Badhri Jagan Sridharan <badhri@...gle.com>
To: Guenter Roeck <linux@...ck-us.net>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Rob Herring <robh+dt@...nel.org>,
Lee Jones <lee.jones@...aro.org>,
Mark Brown <broonie@...nel.org>,
Maxime Ripard <mripard@...nel.org>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Thierry Reding <treding@...dia.com>,
Prashant Malani <pmalani@...omium.org>,
Badhri Jagan Sridharan <badhri@...gle.com>
Cc: devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org, Amelie Delaunay <amelie.delaunay@...com>
Subject: [PATCH v10 01/15] 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@...gle.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
---
Change since v1:
- Changing patch version to v6 to fix version number confusion.
Change since v6:
- Rebase on usb-next
- Added Reviewed-by from Heikki.
Change since v7:
- Rebase on usb-next
Change since v8:
- None
Change since v9:
- None
---
drivers/usb/typec/tcpm/tcpci.c | 6 ++++++
drivers/usb/typec/tcpm/tcpci.h | 2 ++
2 files changed, 8 insertions(+)
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);
diff --git a/drivers/usb/typec/tcpm/tcpci.h b/drivers/usb/typec/tcpm/tcpci.h
index cf9d8b63adcb..04c49a0b0368 100644
--- a/drivers/usb/typec/tcpm/tcpci.h
+++ b/drivers/usb/typec/tcpm/tcpci.h
@@ -150,4 +150,6 @@ struct tcpci *tcpci_register_port(struct device *dev, struct tcpci_data *data);
void tcpci_unregister_port(struct tcpci *tcpci);
irqreturn_t tcpci_irq(struct tcpci *tcpci);
+struct tcpm_port;
+struct tcpm_port *tcpci_get_tcpm_port(struct tcpci *tcpci);
#endif /* __LINUX_USB_TCPCI_H */
--
2.28.0.806.g8561365e88-goog
Powered by blists - more mailing lists