From: adrianhoyin.ng@altera.com
To: alexandre.belloni@bootlin.com, Frank.Li@nxp.com,
linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: adrianhoyin.ng@altera.com
Subject: [PATCH v5 0/5] i3c: dw-i3c: Enable support for dw-i3c controller NACK retry sysfs and DAT restore fix
Date: Tue, 2 Dec 2025 16:26:08 +0800 [thread overview]
Message-ID: <cover.1764663888.git.adrianhoyin.ng@altera.com> (raw)
From: Adrian Ng Ho Yin <adrianhoyin.ng@altera.com>
This patch series adds a controller-wide sysfs attribute
dev_nack_retry_count for the DesignWare I3C controller, allowing runtime
control of the automatic retry mechanism when a device NACKs. Some I3C
slave devices may temporarily be busy and unable to respond immediately;
automatic retries improve robustness in such cases. Writes are clamped to
the hardware maximum of 3, and the value is applied to all active DAT
entries.
The series also fixes dw_i3c_master_restore_addrs() to preserve existing
DAT entry bits, preventing overwrites during runtime PM resume.
---
changelog:
v4->v5
* Revert changes that made bus_maintenance_lock and
bus_maintenance_unlock helpers public.
* Move dev_nack_retry sysfs attribute to master.c; create it only if
the master implements the dev_nack_retry callback.
* Add dev_nack_retry field to i3c_master_controller; updates are applied
under bus maintenance lock.
* Add optional ops to configure dev_nack_retry in the DAT entry in
dw-i3c-master.
v4 patch link:
https://lore.kernel.org/all/cover.1764571045.git.adrianhoyin.ng@altera.com/
v3->v4
* Make bus_maintenance_lock and bus_maintenance_unlock helpers public.
* Replace taking spinlock during DAT update with bus_maintenance_lock.
* Add macro for static and dynamic addr for device addr table.
* Replace GENMASK calls with the appropriate macros when updating addr
table.
v3 patch link:
https://lore.kernel.org/all/cover.1763747151.git.adrianhoyin.ng@altera.com/
v2->v3
* Update commit message for better clarity
* Update function name to maintain consistency.
* Update store function to return error when retry value exceeds hw limit.
* Add lock to protect DAT to avoid concurrent during transfers.
* Clear the address field in the DAT entry before setting new values to
ensure correct dynamic/static address configuration
v2 patch link:
https://lore.kernel.org/all/cover.1763703573.git.adrianhoyin.ng@altera.com/
v1->v2
* Drop dev_nack_retry_cnt binding and device tree changes.
* Update commit message for better clarity.
* Update to use controller wide sysfs attribute that configures
dev_nack_retry_cnt during runtime.
v1 patch link:
https://lore.kernel.org/all/cover.1762245890.git.adrianhoyin.ng@altera.com/
---
Adrian Ng Ho Yin (5):
i3c: add sysfs entry for Device NACK Retry count
i3c: add sysfs attribute for device NACK retry
i3c: dw: Add support for Device NACK Retry configuration
i3c: dw: use FIELD_PREP for device address table macros
i3c: dw: Preserve DAT entry bits when restoring addresses
Documentation/ABI/testing/sysfs-bus-i3c | 12 ++++++
drivers/i3c/master.c | 44 ++++++++++++++++++++
drivers/i3c/master/dw-i3c-master.c | 55 ++++++++++++++++++++++---
include/linux/i3c/master.h | 2 +
4 files changed, 107 insertions(+), 6 deletions(-)
--
2.49.GIT
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
next reply other threads:[~2025-12-02 8:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-02 8:26 adrianhoyin.ng [this message]
2025-12-02 8:26 ` [PATCH v5 1/5] i3c: add sysfs entry for Device NACK Retry count adrianhoyin.ng
2025-12-02 8:26 ` [PATCH v5 2/5] i3c: add sysfs attribute for device NACK retry adrianhoyin.ng
2025-12-02 21:12 ` Frank Li
2025-12-02 8:26 ` [PATCH v5 3/5] i3c: dw: Add support for Device NACK Retry configuration adrianhoyin.ng
2025-12-02 21:15 ` Frank Li
2025-12-02 8:26 ` [PATCH v5 4/5] i3c: dw: use FIELD_PREP for device address table macros adrianhoyin.ng
2025-12-02 21:16 ` Frank Li
2025-12-02 22:49 ` kernel test robot
2025-12-02 23:41 ` kernel test robot
2025-12-02 8:26 ` [PATCH v5 5/5] i3c: dw: Preserve DAT entry bits when restoring addresses adrianhoyin.ng
2025-12-02 21:19 ` Frank Li
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=cover.1764663888.git.adrianhoyin.ng@altera.com \
--to=adrianhoyin.ng@altera.com \
--cc=Frank.Li@nxp.com \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-i3c@lists.infradead.org \
--cc=linux-kernel@vger.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