From: Krzysztof Kozlowski <krzk@kernel.org>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Shreeya Patel <shreeya.patel@collabora.com>,
Marek Vasut <marex@denx.de>,
linux-iio@vger.kernel.org, Conor Dooley <conor+dt@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh@kernel.org>,
devicetree@vger.kernel.org, kernel@collabora.com,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH] iio: light: ltrf216a: Drop undocumented ltr,ltrf216a compatible string
Date: Mon, 8 Jul 2024 13:25:10 +0200 [thread overview]
Message-ID: <9db672d4-a305-45ed-95f1-402c70a15379@kernel.org> (raw)
In-Reply-To: <20240707150835.40db1897@jic23-huawei>
On 07/07/2024 16:08, Jonathan Cameron wrote:
>>
>>>
>>>>>
>>>>> We were very well aware that not documenting this was going to generate a warning so
>>>>
>>>> You *CANNOT* have undocumented compatibles.
>>>
>>> Why not? This corner case is a valid reason for that to be allowed.
>>> You cannot use that compatible with DT bindings. Absolutely. The compatible
>>> has other uses...
>>
>> Okay. With that approach what stops anyone from submitting DTS using
>> that compatible (claiming there is a driver for that compatible)?
>
> That's a good point. Perhaps we should just add a check for this?
> Easy to add a check on the firmware type. This is a rare enough case that
> just doing it in the driver seems fine to me (rather than more general
> infrastructure).
Another point of slippery slope:
1. We accept such undocumented compatible in OF device id for ACPI
(PRP0001).
2. Out-of-tree DTS uses it.
3. Whatever we decide to do now with that compatible, we have
undocumented ABI exposed and used by users.
That's the answer why we cannot have undocumented compatibles: because
we do not want to have implicit ABI. We want explicit ABI, which is:
1. Clearly documented,
2. Reviewed/accepted explicitly.
>
>>
>>>
>>>
>>>>
>>>>> we tried to fix that with a deprecated tag but it was NAKd by Rob. What we understood
>>>>
>>>> Because the driver was NAKed obviously as well.
>>>>
>>>>> from his last message was that it wasn't necessary to fix the DT warning.
>>>>
>>>> I am quite angry that maintainer tells you something, but you push your
>>>> patch through because apparently you need to fulfill your project
>>>> requirements.
>>>
>>> I think this is a fundamental misunderstanding of the situation and probably
>>> at least partly my fault for not clarifying my reading of the situation more
>>> fully at the time.
>>>
>>> As far as I am concerned. The situation is:
>>> 1) Existing shipping consumer device. We have 100s of cases of ACPI bindings
>>> that exist just to deal with garbage firmware's. The folk involved in
>>> reviewing these have pushed back hard for a long time, but sadly there
>>> is still a lot of garbage shipping because Windows lets it through and
>>> Linux support comes second. It's made even worse by Microsoft defining
>>> their own standards that aren't compliant with ACPI as they don't
>>> even bother with reserving the methods IDs. ROTM for example.
>>
>> Hm, and these devices do not provide normal ACPI IDs? They use Of-like
>> ones? I don't know that much about ACPI, but aren't they coming without
>> vendor prefix thus "ltr,ltrf216a" is just wrong and should be "lTRF216A"
>> alone?
>
> Yes, they come with the ID that is matched on by the ACPI core as PRP0001
> which basically means use the DT compatible.
> Then a device specific property that provides 'compatible' to look up against.
> The intent being to allow use of existing drivers without needing to modify
> them to add ACPI IDs to match against.
>
> LTRF216A is worse than using PRP0001 and DT vendor ID
> ACPI has it's own equivalent of vendor IDs and you have to apply for one from
> relevant committee in the UEFI forum (ASWG)
> https://uefi.org/ACPI_ID_List
> (there is a 3 letter form as well).
> It's easy to get an ID (takes a few weeks though) but many sensor companies
> etc don't bother. Sometimes they say it's because the OEMs should do this
> and sometimes those OEMs do, so the binding is under their vendor not the
> device manufacturer. That's when you see what looks like completely unrelated
> IDs being used.
>
> It would be good it liteon got a proper ID and started issuing device numbers
> to go with it though.
>
> There are a lot of old bindings that make IDs up. Some are based on cut and paste
> and we've been trying to scrub those, others are based on what Windows drivers
> bind against and so we are stuck with that set.
> For extra fun we have examples of hardware with a common ID for incompatible
> devices for which we have different drivers. That's a real pain when it happens
> but a few sensor manufacturers have 'one windows driver' for many years worth
> of unrelated devices and use horrible matching routines to figure out what is
> actually there...).
BTW, I really miss the information what sort of users they have for that
compatible. The explanation was vague. What are the "released devices"?
What ACPI tables do they have?
Best regards,
Krzysztof
next prev parent reply other threads:[~2024-07-08 11:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-05 9:50 [PATCH] iio: light: ltrf216a: Drop undocumented ltr,ltrf216a compatible string Marek Vasut
2024-07-05 9:55 ` Krzysztof Kozlowski
2024-07-05 10:42 ` Shreeya Patel
2024-07-05 14:52 ` Marek Vasut
2024-07-05 18:03 ` Shreeya Patel
2024-07-07 11:26 ` Jonathan Cameron
2024-07-07 12:06 ` Krzysztof Kozlowski
2024-07-07 13:43 ` Jonathan Cameron
2024-07-07 12:02 ` Krzysztof Kozlowski
2024-07-07 13:37 ` Jonathan Cameron
2024-07-07 13:46 ` Krzysztof Kozlowski
2024-07-07 14:08 ` Jonathan Cameron
2024-07-08 11:25 ` Krzysztof Kozlowski [this message]
2024-07-08 12:29 ` Sebastian Reichel
2024-07-08 12:13 ` Sebastian Reichel
2024-07-08 13:20 ` Shreeya Patel
2024-07-08 16:01 ` Jonathan Cameron
2024-08-12 13:24 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9db672d4-a305-45ed-95f1-402c70a15379@kernel.org \
--to=krzk@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=kernel@collabora.com \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=marex@denx.de \
--cc=robh@kernel.org \
--cc=shreeya.patel@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).