public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/2] usb: typec: ucsi: sysfs mailbox for commands
@ 2025-02-06 14:19 Heikki Krogerus
  2025-02-06 14:19 ` [PATCH v1 1/2] usb: typec: ucsi: Command mailbox interface for the userspace Heikki Krogerus
  2025-02-06 14:19 ` [PATCH v1 2/2] tools: usb: UCSI command testing tool Heikki Krogerus
  0 siblings, 2 replies; 8+ messages in thread
From: Heikki Krogerus @ 2025-02-06 14:19 UTC (permalink / raw)
  To: Łukasz Bartosik
  Cc: Abhishek Pandit-Subedi, Benson Leung, Pavan Holla,
	Dmitry Baryshkov, Christian A. Ehrhardt, Jameson Thies,
	Katiyar, Pooja, Pathak, Asutosh, Jayaraman, Venkat,
	Greg Kroah-Hartman, linux-usb, linux-kernel

Hi,

UCSI has commands that can be used to configure the platform policy
manager (PPM, which is the EC in most cases) on top of individual
connectors. That kind of commands are very UCSI specific, and because
of that, don't fit very well into any of our existing device classes
that are all designed to represent the connectors in generic fashion.

Nevertheless, the user space needs some way to configure also the
entire PPM with these commands. Exposing the UCSI data structure as a
mailbox file to the user space felt to me as the simplest way to do
that, so that's why this proposal.

This mailbox is of course not limited to those commands only - any
UCSI command can be send to the PPM with it. Łukasz, would this cover
also your debugging and testing needs that you were planning the
netlink for (although, for the ChromeOS UCSI driver only)?

Br,

Heikki Krogerus (2):
  usb: typec: ucsi: Command mailbox interface for the userspace
  tools: usb: UCSI command testing tool

 Documentation/ABI/testing/sysfs-driver-ucsi |  20 ++
 drivers/usb/typec/ucsi/Makefile             |   2 +-
 drivers/usb/typec/ucsi/sysfs.c              | 127 ++++++++++
 drivers/usb/typec/ucsi/ucsi.c               |  31 ++-
 drivers/usb/typec/ucsi/ucsi.h               |   7 +
 tools/usb/.gitignore                        |   1 +
 tools/usb/Build                             |   1 +
 tools/usb/Makefile                          |   8 +-
 tools/usb/ucsi.c                            | 250 ++++++++++++++++++++
 9 files changed, 432 insertions(+), 15 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-driver-ucsi
 create mode 100644 drivers/usb/typec/ucsi/sysfs.c
 create mode 100644 tools/usb/ucsi.c

-- 
2.47.2


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

end of thread, other threads:[~2025-02-12  7:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-06 14:19 [PATCH v1 0/2] usb: typec: ucsi: sysfs mailbox for commands Heikki Krogerus
2025-02-06 14:19 ` [PATCH v1 1/2] usb: typec: ucsi: Command mailbox interface for the userspace Heikki Krogerus
2025-02-06 14:51   ` Greg Kroah-Hartman
2025-02-07 13:04     ` Heikki Krogerus
2025-02-07 20:15       ` Dmitry Baryshkov
2025-02-11 21:21         ` Pathak, Asutosh
2025-02-12  7:44           ` Greg Kroah-Hartman
2025-02-06 14:19 ` [PATCH v1 2/2] tools: usb: UCSI command testing tool Heikki Krogerus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox