summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2026-09-20 18:12:46 +0300
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2026-09-21 23:25:37 +0200
commitb968be9e719302c6d74beb16224e9d956d26433d (patch)
tree3cde9a94efb9eaa29ebda6a78753c03739c3c001 /tools/lib/python
parentb7e849313eba3c6ecadb89961b0abb431278a5ac (diff)
downloadlinux-next-b968be9e719302c6d74beb16224e9d956d26433d.tar.gz
linux-next-b968be9e719302c6d74beb16224e9d956d26433d.zip
i3c: Restrict HDR modes to those supported by the bus and target
I3C v1.1.1 Table 9 defines which HDR Modes are permitted for each Bus Configuration. A Mixed Slow / Limited Bus permits no HDR Modes because Legacy I2C Devices without a 50 ns SCL spike filter cannot be shielded from HDR traffic. A Mixed Fast Bus permits HDR-DDR and HDR-TSL, but not HDR-TSP, since of the two Ternary Modes only HDR-TSL is defined for a Bus that also has Legacy I2C Devices. However, both i3c_device_get_supported_xfer_mode() and the transfer validation in i3c_dev_do_xfers_locked() currently consider only the controller's hdr_cap. Since hdr_cap reflects controller capability rather than bus or target constraints, HDR Modes can be advertised and used even when the bus configuration forbids them. Likewise, HDR Modes unsupported by the target may be reported as available. Add i3c_dev_supported_xfer_modes_locked(), which derives the usable transfer modes from the intersection of: - HDR Modes supported by the controller - HDR Modes allowed by the bus configuration - HDR Modes supported by the target Use this helper both when reporting supported transfer modes and when validating transfers, ensuring that the advertised and permitted modes remain consistent. GETHDRCAP is queried only when I3C_BCR_HDR_CAP is set, so a target without that bit is treated as supporting no HDR Modes. i3c_device_get_supported_xfer_mode() now takes the normal-use bus lock in order to access the device descriptor, matching i3c_device_get_info(). Also fix the kernel-doc reference to enum i3c_xfer_mode. Fixes: 256a21743d91 ("i3c: Add HDR API support") Assisted-by: GitHub-Copilot:claude-opus-5 Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20260920151248.46936-17-adrian.hunter@intel.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions