This series adds Device Tree bindings and minimal UCSI driver support
for the ITE IT8851/IT8853 USB Type-C Power Delivery controller over I2C.
Changes in v5:
- dt-bindings: express compatible as ite,it8853 + ite,it8851 fallback
instead of a plain enum, since the driver treats both parts
identically (Krzysztof)
- dt-bindings: use consistent quoting for patternProperties key
(Krzysztof)
- dt-bindings: add anyOf requiring at least one of connector@0/
connector@1 (Krzysztof)
- Drop the unnecessary heap-allocated tx/rx buffers in
itepd_read_reg()/itepd_write_reg(); use the caller-supplied buffer
and a local variable directly instead (Heikki)
- Ack the interrupt in itepd_process_event() even when the CCI/
msg-in I2C read fails, instead of bailing out before acking, to
avoid an interrupt storm on transient I2C errors (Sashiko)
- Not changed: keep ucsi_unregister() before free_irq() in remove().
the IRQ handler is the only event consumer/acker on this device,
so freeing the IRQ first stalls in-flight commands until timeout.
ucsi_unregister() disables notifications via async_control() first,
narrowing the reported UAF window to the interval before free_irq()
masks the interrupt; IRQF_ONESHOT and free_irq()'s synchronous wait
mean only a newly-arriving event in that narrow window remains exposed
(Sashiko, not addressed)
- Not changed: keep itepd_read_reg()/itepd_write_reg() built on
i2c_transfer() rather than switching to
i2c_smbus_{read,write}_i2c_block_data(). The read path needs this
regardless, since the message-in register can return up to 40
bytes, exceeding the 32-byte SMBus block-read limit; write is kept
on the same helper style for consistency rather than mixing APIs
for a few lines of savings. (Heikki, not addressed)
Link to v4: https://lore.kernel.org/all/20260717-ucsi-itepd-v4-0-f3ba5addd0df@ite.com.tw/
Link to v3: https://lore.kernel.org/all/20260710-ucsi-itepd-feature-v3-0-8523e1e1c47a@ite.com.tw/
Link to v2: https://lore.kernel.org/all/20260710-ucsi-itepd-feature-v2-0-41943fd5df38@ite.com.tw/
Link to v1: https://lore.kernel.org/all/20260615-ucsi-itepd-feature-v1-0-a826cfd0df6a@ite.com.tw/
Signed-off-by: Amber Kao <amber.kao@ite.com.tw>
---
Amber Kao (2):
dt-bindings: usb: Add ITE IT8851/IT8853 Type-C PD controllers
usb: typec: ucsi: Add ITE IT8851/IT8853 Type-C PD controller driver
.../devicetree/bindings/usb/ite,it8851.yaml | 151 +++++++++
MAINTAINERS | 9 +
drivers/usb/typec/ucsi/Kconfig | 10 +
drivers/usb/typec/ucsi/Makefile | 1 +
drivers/usb/typec/ucsi/ucsi_itepd.c | 365 +++++++++++++++++++++
5 files changed, 536 insertions(+)
---
base-commit: 8fde5d1d47f69db6082dfa34500c27f8485389a5
change-id: 20260717-ucsi-itepd-4e943e1382f0
Best regards,
--
Amber Kao <amber.kao@ite.com.tw>