]> www.infradead.org Git - users/jedix/linux-maple.git/commit
i3c: mipi-i3c-hci: Read HC_CONTROL_PIO_MODE only after i3c hci v1.1
authorShyam Sundar S K <Shyam-sundar.S-k@amd.com>
Thu, 29 Aug 2024 09:17:09 +0000 (14:47 +0530)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 5 Sep 2024 16:34:08 +0000 (18:34 +0200)
commit039b23609ff243497ea350200635985364da25ee
treeff9cabd80488db7d5510e31b7cd8ee3f04bfe507
parent8d2e56ef83ce944cc945d39f5ea7c875bba5c2ad
i3c: mipi-i3c-hci: Read HC_CONTROL_PIO_MODE only after i3c hci v1.1

The HC_CONTROL_PIO_MODE bit was introduced in the HC_CONTROL register
starting from version 1.1. Therefore, checking the HC_CONTROL_PIO_MODE bit
on hardware that adheres to older specification revisions (i.e., versions
earlier than 1.1) is incorrect. To address this, add an additional check
to read the HCI version before attempting to read the HC_CONTROL_PIO_MODE
status.

Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Reviewed-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Link: https://lore.kernel.org/r/20240829091713.736217-3-Shyam-sundar.S-k@amd.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/i3c/master/mipi-i3c-hci/core.c