i3c: Add fallback method for GETMXDS CCC
authorJoshua Yeong <joshua.yeong@starfivetech.com>
Tue, 14 Nov 2023 08:55:25 +0000 (16:55 +0800)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 16 Nov 2023 22:37:56 +0000 (23:37 +0100)
commit2aac0bf4ebc8e09941bb2a40c0ce725437d9a82c
treede9a0af3a3e8586ee57615a4d0eb85b640b16e4f
parent4afd72876942f2ab1e97e79082464a46ab40a485
i3c: Add fallback method for GETMXDS CCC

Some I3C hardware will report error when an incorrect length is received from
device. GETMXDS CCC are available in 2 formats: without turnaround time (format
1) and with turnaround time (format 2). There is no mechanics to determine which
format is supported by device. So in case sending GETMXDS CCC format 2 resulted
in a failure, try sending GETMXDS CCC format 1 instead.

Signed-off-by: Joshua Yeong <joshua.yeong@starfivetech.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20231114085525.6271-2-joshua.yeong@starfivetech.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/i3c/master.c