mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Amber Kao <amber.kao@ite.com.tw>
To: Jeson Yang <jeson.yang@ite.com.tw>,
	Yaode Fang <Yaode.Fang@ite.com.tw>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: <linux-usb@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, Amber Kao <amber.kao@ite.com.tw>,
	Bling Chiang <Bling.Chiang@ite.com.tw>,
	Eric Su <Eric.Su@ite.com.tw>, Doreen Lin <doreen.lin@ite.com.tw>
Subject: [PATCH v5 0/2] usb: typec: ucsi: Add ITE IT8851/IT8853 support
Date: Fri, 24 Jul 2026 18:09:18 +0800	[thread overview]
Message-ID: <20260724-ucsi-itepd-v5-0-d1a83e5c9c77@ite.com.tw> (raw)

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>


             reply	other threads:[~2026-07-24 10:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-24 10:09 Amber Kao [this message]
2026-07-24 10:09 ` [PATCH v5 1/2] dt-bindings: usb: Add ITE IT8851/IT8853 Type-C PD controllers Amber Kao
2026-07-27  8:40   ` Krzysztof Kozlowski
2026-07-24 10:09 ` [PATCH v5 2/2] usb: typec: ucsi: Add ITE IT8851/IT8853 Type-C PD controller driver Amber Kao
2026-07-27  8:41   ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260724-ucsi-itepd-v5-0-d1a83e5c9c77@ite.com.tw \
    --to=amber.kao@ite.com.tw \
    --cc=Bling.Chiang@ite.com.tw \
    --cc=Eric.Su@ite.com.tw \
    --cc=Yaode.Fang@ite.com.tw \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=doreen.lin@ite.com.tw \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=jeson.yang@ite.com.tw \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®