linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] platform/chrome: cros_ec_typec: Link PD object to partner
@ 2022-11-22 22:05 Prashant Malani
  2022-11-22 22:05 ` [PATCH v2 1/2] usb: typec: Add partner PD object wrapper Prashant Malani
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Prashant Malani @ 2022-11-22 22:05 UTC (permalink / raw)
  To: linux-kernel, linux-usb, chrome-platform
  Cc: Prashant Malani, Benson Leung, Greg Kroah-Hartman, Guenter Roeck,
	Heikki Krogerus

This is a short series to link a registered USB PD object to its associated
partner device. This is helpful for userspace services (the ChromeOS Type-C
daemon, for example), to identify which Type-C peripheral a PD object belongs to,
when a uevent for the PD object arrives.

The first patch adds a wrapper to the Type-C class code to register a PD object
with a Type-C partner as its parent. The second patch uses that wrapper to
register the Type-C partner USB PD object in the port driver code.

There was an earlier patch[1] to solve this issue, but it's been jettisoned (on advice from
GregKH) in favor of the current approach.

[1] https://lore.kernel.org/linux-usb/Y3vNZEuNI3CWzZ0L@chromium.org/T/#m7521020f64d878313d7dd79903ec0e9421aa8737

Series submission suggestions (if the approach is OK):
- Patch 1 goes throug the USB tree and Patch 2 goes in the next release cycle
  through the chrome-platform tree.
- Patch 1 and 2 both go through the USB tree.

v1: https://lore.kernel.org/linux-usb/20221121201337.2772216-1-pmalani@chromium.org/

Changes since v1:
- Drop Patch 1 from v1, and instead introduce a new Patch 1 which uses the wrapper
  function suggested by Heikki Krogerus.
- Update Patch 2 to use the new wrapper.

Prashant Malani (2):
  usb: typec: Add partner PD object wrapper
  platform/chrome: cros_ec_typec: Set parent of partner PD object

 drivers/platform/chrome/cros_ec_typec.c |  2 +-
 drivers/usb/typec/class.c               | 19 +++++++++++++++++++
 include/linux/usb/typec.h               |  4 ++++
 3 files changed, 24 insertions(+), 1 deletion(-)

-- 
2.38.1.584.g0f3c55d4c2-goog


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

end of thread, other threads:[~2022-12-26  3:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-22 22:05 [PATCH v2 0/2] platform/chrome: cros_ec_typec: Link PD object to partner Prashant Malani
2022-11-22 22:05 ` [PATCH v2 1/2] usb: typec: Add partner PD object wrapper Prashant Malani
2022-11-23  8:53   ` Heikki Krogerus
2022-11-22 22:05 ` [PATCH v2 2/2] platform/chrome: cros_ec_typec: Set parent of partner PD object Prashant Malani
2022-11-23  8:54   ` Heikki Krogerus
2022-12-26  3:32 ` [PATCH v2 0/2] platform/chrome: cros_ec_typec: Link PD object to partner patchwork-bot+chrome-platform
2022-12-26  3:41 ` patchwork-bot+chrome-platform

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).