[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <034b5511-e3c2-443d-8bac-8e5ed7095236@linux.intel.com>
Date: Tue, 6 Aug 2024 10:09:28 +0300
From: Jarkko Nikula <jarkko.nikula@...ux.intel.com>
To: Shyam Sundar S K <Shyam-sundar.S-k@....com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>
Cc: Guruvendra Punugupati <Guruvendra.Punugupati@....com>,
Krishnamoorthi M <krishnamoorthi.m@....com>, linux-i3c@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/5] i3c: mipi-i3c-hci: Add a quirk to set PIO mode
On 8/5/24 12:26 PM, Shyam Sundar S K wrote:
> Hi,
>
> On 8/2/2024 19:28, Jarkko Nikula wrote:
>>
>> This is true, I see this now from pre-v1.0, v1.0. v1.1 and v1.2 specs
>> too, HC_CONTROL_PIO_MODE bit is present only after v1.0. And therefore
>> version != HCI_VERSION_V1 check is not fully correct since bit is not
>> present in pre-v1.0 HW versions either.
>>
>
> Agreed. HC_CONTROL_PIO_MODE is only present in v1.1 and v1.2.
>
> anything below v1.0, the version check handling is already present;
>
> switch (regval & ~0xf) {
> case 0x100: /* version 1.0 */
> case 0x110: /* version 1.1 */
> case 0x200: /* version 2.0 */
> break;
> default:
> dev_err(&hci->master.dev, "unsupported HCI version\n");
> return -EPROTONOSUPPORT;
> }
>
> Let me know your thoughts.
>
Yeah, true. I'd still use version > v1.0 check because that reflects the
current situation. Mostly to avoid confusion when reading the code but
also if someone adds support for pre-v1.0 HW (perhaps unlikely) and then
doesn't need to change version check here.
Powered by blists - more mailing lists