Skip to content

usb: typec: API improvements

Heikki Krogerus linux-usb 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest18 patches 11 repliesIn review
  2. v318 patches 8 repliesSuperseded
  3. v218 patches 3 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v118 patches15 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18usb: typec: Copy everything from struct typec_capability during registrationdrivers/usb/typec/class.c+14 -60 replies
2/18usb: typec: Introduce typec_get_drvdata()drivers/usb/typec/class.c include/linux/usb/typec.h+15 -00 replies
3/18usb: typec: Separate the operations vectordrivers/usb/typec/class.c include/linux/usb/typec.h+49 -100 replies
4/18usb: typec: tcpm: Start using struct typec_operationsdrivers/usb/typec/tcpm/tcpm.c+20 -250 replies
5/18usb: typec: tps6598x: Start using struct typec_operationsdrivers/usb/typec/tps6598x.c+26 -230 replies
6/18usb: typec: ucsi: Start using struct typec_operationsdrivers/usb/typec/ucsi/ucsi.c+11 -110 replies
7/18usb: typec: hd3ss3220: Start using struct typec_operationsdrivers/usb/typec/hd3ss3220.c+13 -110 replies
8/18usb: typec: Remove the callback members from struct typec_capabilitydrivers/usb/typec/class.c include/linux/usb/typec.h+11 -460 replies
9/18usb: typec: Remove unused members from struct typec_capabilityinclude/linux/usb/typec.h+0 -20 replies
10/18usb: typec: hd3ss3220: Give the connector fwnode to the port devicedrivers/usb/typec/hd3ss3220.c+9 -30 replies
11/18usb: typec: ucsi: Simplified registration and I/O APIdrivers/usb/typec/ucsi/ucsi.c drivers/usb/typec/ucsi/ucsi.h+359 -290 replies
12/18usb: typec: ucsi: acpi: Move to the new APIdrivers/usb/typec/ucsi/ucsi_acpi.c+72 -193 replies
13/18usb: typec: ucsi: ccg: Move to the new APIdrivers/usb/typec/ucsi/ucsi_ccg.c+81 -851 reply
14/18usb: typec: ucsi: Remove the old APIdrivers/usb/typec/ucsi/displayport.c drivers/usb/typec/ucsi/trace.h drivers/usb/typec/ucsi/ucsi.c +1 more+43 -3851 reply
15/18usb: typec: ucsi: Remove struct ucsi_controldrivers/usb/typec/ucsi/displayport.c drivers/usb/typec/ucsi/trace.c drivers/usb/typec/ucsi/trace.h +2 more+115 -3000 replies
16/18usb: typec: ucsi: Remove all bit-fieldsdrivers/usb/typec/ucsi/trace.h drivers/usb/typec/ucsi/ucsi.c drivers/usb/typec/ucsi/ucsi.h+85 -720 replies
17/18usb: typec: ucsi: New error codesdrivers/usb/typec/ucsi/ucsi.c drivers/usb/typec/ucsi/ucsi.h+26 -51 reply
18/18usb: typec: ucsi: Optimise ucsi_unregister()drivers/usb/typec/ucsi/ucsi.c+3 -61 reply

Reviews trailers per patch

17 of 18 patches have a Reviewed-by or Acked-by.

PatchGuenter RoeckBiju DasAjay Gupta
1/18R-b
2/18R-b
3/18R-b
4/18R-b
5/18R-b
6/18R-b
7/18R-b
8/18R-b
9/18R-b
10/18R-b T-b
11/18R-b T-b
12/18R-b
13/18R-b T-b
14/18R-b T-b
15/18R-b T-b
16/18T-b
17/18R-b T-b
18/18R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [PATCH v4 00/18] usb: typec: API improvements

Hi,

I removed the extra error messages from ucsi_acpi.c and ucsi_ccg.c as requested by Guenter.

The cover letter from v2:

I modified ucsi_acpi.c so that the behavior matches exactly the behaviour of the Connector Change Event handling before these patches.

The cover letter from v2:

There is now a check in ucsi_exec_command() that makes sure we do not call ucsi_read_error() with UCSI_GET_ERROR_STATUS command. That should prevent endless recursion from happening.

The original cover letter:

The first patches in this series (patches 1-8) introduce a small change to the USB Type-C Connector Class API. Guenter was kind enough to go over those already.

Patches 10-15 improve the ucsi driver API by introducing more traditional read and write routines, and the rest is more generic optimisations and improvements to the ucsi drivers.

Let me know if there is anything you want to be changed.

thanks,

Heikki Krogerus (18):
usb: typec: Copy everything from struct typec_capability during
registration
usb: typec: Introduce typec_get_drvdata()
usb: typec: Separate the operations vector
usb: typec: tcpm: Start using struct typec_operations
usb: typec: tps6598x: Start using struct typec_operations
usb: typec: ucsi: Start using struct typec_operations
usb: typec: hd3ss3220: Start using struct typec_operations
usb: typec: Remove the callback members from struct typec_capability
usb: typec: Remove unused members from struct typec_capability
usb: typec: hd3ss3220: Give the connector fwnode to the port device
usb: typec: ucsi: Simplified registration and I/O API
usb: typec: ucsi: acpi: Move to the new API
usb: typec: ucsi: ccg: Move to the new API
usb: typec: ucsi: Remove the old API
usb: typec: ucsi: Remove struct ucsi_control
usb: typec: ucsi: Remove all bit-fields
usb: typec: ucsi: New error codes
usb: typec: ucsi: Optimise ucsi_unregister()

 drivers/usb/typec/class.c            |  42 +-
 drivers/usb/typec/hd3ss3220.c        |  36 +-
 drivers/usb/typec/tcpm/tcpm.c        |  45 +-
 drivers/usb/typec/tps6598x.c         |  49 ++-
 drivers/usb/typec/ucsi/displayport.c |  40 +-
 drivers/usb/typec/ucsi/trace.c       |  11 -
 drivers/usb/typec/ucsi/trace.h       |  79 +---
 drivers/usb/typec/ucsi/ucsi.c        | 609 ++++++++++++++-------------
 drivers/usb/typec/ucsi/ucsi.h        | 417 +++++++-----------
 drivers/usb/typec/ucsi/ucsi_acpi.c   |  91 +++-
 drivers/usb/typec/ucsi/ucsi_ccg.c    | 166 ++++----
 include/linux/usb/typec.h            |  41 +-
 12 files changed, 770 insertions(+), 856 deletions(-)
Signature · 1 line
2.24.0.rc1