linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v8 01/11] usb: typec: tcpci: Add a getter method to retrieve tcpm_port reference
@ 2020-09-21 19:55 Badhri Jagan Sridharan
  2020-09-21 19:55 ` [PATCH v8 02/11] usb: typec: tcpci: Add set_vbus tcpci callback Badhri Jagan Sridharan
                   ` (9 more replies)
  0 siblings, 10 replies; 19+ messages in thread
From: Badhri Jagan Sridharan @ 2020-09-21 19:55 UTC (permalink / raw)
  To: Guenter Roeck, Heikki Krogerus, Greg Kroah-Hartman, Rob Herring,
	Lee Jones, Mark Brown, Maxime Ripard, Alexandre Belloni,
	Thierry Reding, Prashant Malani, Badhri Jagan Sridharan
  Cc: devicetree, linux-kernel, linux-usb

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>
---
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
---
 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.681.g6f77f65b4e-goog


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2020-09-29  2:50 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 19:55 [PATCH v8 01/11] usb: typec: tcpci: Add a getter method to retrieve tcpm_port reference Badhri Jagan Sridharan
2020-09-21 19:55 ` [PATCH v8 02/11] usb: typec: tcpci: Add set_vbus tcpci callback Badhri Jagan Sridharan
2020-09-21 19:55 ` [PATCH v8 03/11] dt-bindings: usb: Maxim type-c controller device tree binding document Badhri Jagan Sridharan
2020-09-22 15:59   ` Rob Herring
2020-09-29  2:41     ` Badhri Jagan Sridharan
2020-09-21 19:55 ` [PATCH v8 04/11] usb: typec: tcpci_maxim: Chip level TCPC driver Badhri Jagan Sridharan
2020-09-21 19:55 ` [PATCH v8 05/11] dt-bindings: connector: Add property to set initial current cap for FRS Badhri Jagan Sridharan
2020-09-22 16:04   ` Rob Herring
2020-09-29  2:50     ` Badhri Jagan Sridharan
2020-09-23 10:43   ` Jun Li
2020-09-24 10:09     ` Badhri Jagan Sridharan
2020-09-28  8:57       ` Jun Li
2020-09-29  2:43         ` Badhri Jagan Sridharan
2020-09-21 19:55 ` [PATCH v8 06/11] usb: typec: tcpm: Add support for Sink Fast Role SWAP(FRS) Badhri Jagan Sridharan
2020-09-21 19:55 ` [PATCH v8 07/11] usb: typec: tcpci: Implement callbacks for FRS Badhri Jagan Sridharan
2020-09-21 19:55 ` [PATCH v8 08/11] usb: typec: tcpci_maxim: Add support for Sink FRS Badhri Jagan Sridharan
2020-09-21 19:55 ` [PATCH v8 09/11] usb: typec: tcpm: Implement enabling Auto Discharge disconnect support Badhri Jagan Sridharan
2020-09-21 19:55 ` [PATCH v8 10/11] usb: typec: tcpci: Implement Auto discharge disconnect callbacks Badhri Jagan Sridharan
2020-09-21 19:55 ` [PATCH v8 11/11] usb: typec: tcpci_maxim: Implemnent set_auto_vbus_discharge_threshold Badhri Jagan Sridharan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).