Devicetree
 help / color / mirror / Atom feed
* [PATCH v3 0/2] usb: typec: ucsi: Add ITE IT885x Type-C PD controller driver
@ 2026-07-09 19:25 Amber Kao
  2026-07-09 19:25 ` [PATCH v3 1/2] dt-bindings: usb: Add ITE IT885x support Amber Kao
  2026-07-09 19:25 ` [PATCH v3 2/2] usb: typec: ucsi: Add ITE IT885x Type-C PD controller driver Amber Kao
  0 siblings, 2 replies; 5+ messages in thread
From: Amber Kao @ 2026-07-09 19:25 UTC (permalink / raw)
  To: Jeson Yang, Yaode Fang, Bling Chiang, Doreen Lin, Eric Su,
	Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Heikki Krogerus
  Cc: linux-usb, devicetree, linux-kernel, Amber Kao

This series adds Device Tree bindings and minimal UCSI driver
support for the ITE IT885x USB Type-C Power Delivery controller
over I2C.

Per Heikki's review of v1, this series has been split into smaller,
self-contained patches. This version drops the Alternate Mode
support, the UCSI command-translation hook, and the auxiliary-bus
core/client split entirely. The driver now does nothing more than
register the UCSI ports and partners. Alternate Mode support and
the auxiliary-bus split will follow in later series, once each
feature can be reviewed on its own.

v2 also had two high-severity issues found by Sashiko review,
both fixed in this version: a use-after-free race in remove() where
free_irq() ran after ucsi_unregister() had already freed the 
ucsi->connector array a pending IRQ could still access, and a missing
check on the interrupt-clear write that could unconditionally return
IRQ_HANDLED even when the hardware interrupt was never actually cleared,
risking an IRQ storm.

Note: This driver has not been tested on physical hardware. Runtime
verification was performed by building the module out-of-tree
against the currently running kernel's headers and loading it on an
x86_64 virtual machine, using i2c-stub with manual device
instantiation to trigger probe().

Testing performed:
- checkpatch.pl --strict: no errors or warnings
- dt_binding_check / dtbs_check: no errors or warnings
- Sparse (C=2 CF="-D__CHECK_ENDIAN__"): no errors or warnings
- checkstack.pl: no functions exceed 512-byte stack limit on
  x86_64, arm64, arm32, and ppc64le
- Kconfig tristate: tested =m, =y, =n, allmodconfig, allnoconfig
- Cross-compilation: x86_64, arm64, arm32, ppc64le
- CONFIG_SMP and CONFIG_PREEMPT: both on and off
- Strict warning mode (W=1 EXTRA_CFLAGS=-W): no new warnings
- i2c-stub emulation with manual device instantiation: re-verified
  after the v3 fixes,probe() still correctly rejects devices with 
  no IRQ resource (-ENODEV), no crash, module load/unload cycle clean
- Fault injection (CONFIG_FAILSLAB, fail-nth): each reachable kzalloc()/
  devm_kzalloc() in probe() was individually failed and returned -ENOMEM
  cleanly with correct teardown; the runtime IRQ/UCSI paths were not
  reachable via i2c-stub.

Note: big-endian (ppc64) cross-compilation was not tested, as
TYPEC_UCSI currently depends on !CPU_BIG_ENDIAN upstream. Byte-order
correctness was instead verified via sparse.

Signed-off-by: Amber Kao <amber.kao@ite.com.tw>
---
Amber Kao (2):
      dt-bindings: usb: Add ITE IT885x support
      usb: typec: ucsi: Add ITE IT885x Type-C PD controller driver

 .../devicetree/bindings/usb/ite,itepd-it885x.yaml  | 105 ++++++
 MAINTAINERS                                        |  12 +
 drivers/usb/typec/ucsi/Kconfig                     |  10 +
 drivers/usb/typec/ucsi/Makefile                    |   1 +
 drivers/usb/typec/ucsi/ucsi_itepd.c                | 354 +++++++++++++++++++++
 5 files changed, 482 insertions(+)
---
base-commit: 8fde5d1d47f69db6082dfa34500c27f8485389a5
change-id: 20260605-ucsi-itepd-feature-95e6dcee4fc5

Best regards,
--  
Amber Kao <amber.kao@ite.com.tw>


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

end of thread, other threads:[~2026-07-09 12:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-09 19:25 [PATCH v3 0/2] usb: typec: ucsi: Add ITE IT885x Type-C PD controller driver Amber Kao
2026-07-09 19:25 ` [PATCH v3 1/2] dt-bindings: usb: Add ITE IT885x support Amber Kao
2026-07-09 12:14   ` Krzysztof Kozlowski
2026-07-09 19:25 ` [PATCH v3 2/2] usb: typec: ucsi: Add ITE IT885x Type-C PD controller driver Amber Kao
2026-07-09 11:36   ` sashiko-bot

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