summaryrefslogtreecommitdiff
path: root/drivers/i3c
diff options
context:
space:
mode:
authorFrank Li <Frank.Li@nxp.com>2024-05-06 12:40:07 -0400
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2024-05-23 00:29:19 +0200
commit0d25965082013a3743972ca1887380b66de47dd3 (patch)
treeb753ccb22d4ba52aa452162a5713f8d95f667ed0 /drivers/i3c
parent4cece764965020c22cff7665b18a012006359095 (diff)
i3c: Add comment for -EAGAIN in i3c_device_do_priv_xfers()
In accordance with I3C spec ver 1.1.1 09-Jun-2021, section: 5.1.2.2.3, if a target requests hot join (HJ), In-Band Interrupt (IBI), or controller role request (CRR) during the emission of an I3C address in i3c_device_do_priv_xfers(), the target may win bus arbitration. In such cases, it is imperative to notify the I3C client driver and retry i3c_device_do_priv_xfers() after some delay. Signed-off-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/r/20240506164009.21375-1-Frank.Li@nxp.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/i3c')
-rw-r--r--drivers/i3c/device.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/i3c/device.c b/drivers/i3c/device.c
index 1a6a8703dbc3..e80e48756914 100644
--- a/drivers/i3c/device.c
+++ b/drivers/i3c/device.c
@@ -27,6 +27,10 @@
* This function can sleep and thus cannot be called in atomic context.
*
* Return: 0 in case of success, a negative error core otherwise.
+ * -EAGAIN: controller lost address arbitration. Target
+ * (IBI, HJ or controller role request) win the bus. Client
+ * driver needs to resend the 'xfers' some time later.
+ * See I3C spec ver 1.1.1 09-Jun-2021. Section: 5.1.2.2.3.
*/
int i3c_device_do_priv_xfers(struct i3c_device *dev,
struct i3c_priv_xfer *xfers,