From: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Marek Vasut <marex@denx.de>, Jonathan Cameron <jic23@kernel.org>,
Sebastian Reichel <sebastian.reichel@collabora.com>
Subject: Re: [PATCH] dt-bindings: non-dt-devices: document ltr,ltrf216a used via ACPI PRP0001
Date: Tue, 9 Jul 2024 11:02:48 -0600 [thread overview]
Message-ID: <20240709170248.GA3803124-robh@kernel.org> (raw)
In-Reply-To: <20240709084401.21108-1-krzysztof.kozlowski@linaro.org>
On Tue, Jul 09, 2024 at 10:44:01AM +0200, Krzysztof Kozlowski wrote:
> There is a device in the wild with non-updatable firmware coming with
> ACPI tables with rejected "ltr,ltrf216a" compatible. Linux kernel still
> supports this device via ACPI PRP0001, however the compatible was never
> accepted to bindings. Lack of bindings causes checkpatch.pl warning
> about undocumented compatible.
Why do we care? For checkpatch.pl I really don't. That hack check I
wrote makes any string in binding docs a documented compatible. I have a
better check using the schema written, but that would make checkpatch
dependent on dtschema tools. So maybe just time to drop this check from
checkpatch as we have other ways to check and track this.
However, I do care about 'make dt_compatible_check'. Besides these ACPI
cases, there's a bunch of cases that we'll never have schemas for. Like
everything from Sparc... Old PowerMac stuff... So I would like to
'document' them just to exclude from dt_compatible_check. So perhaps
this should be generalized.
>
> Add a schema for such ACPI PRP0001 devices purely to satisfy
> checkpatch.pl and document consensus: ltr,ltrf216a compatible is allowed
> only via ACPI PRP0001, but not bindings.
>
> Link: https://lore.kernel.org/all/20240705095047.90558-1-marex@denx.de/
> Link: https://lore.kernel.org/lkml/20220731173446.7400bfa8@jic23-huawei/T/#me55be502302d70424a85368c2645c89f860b7b40
> Cc: Marek Vasut <marex@denx.de>
> Cc: Jonathan Cameron <jic23@kernel.org>
> Cc: Sebastian Reichel <sebastian.reichel@collabora.com>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> .../devicetree/bindings/non-dt-devices.yaml | 35 +++++++++++++++++++
> 1 file changed, 35 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/non-dt-devices.yaml
>
> diff --git a/Documentation/devicetree/bindings/non-dt-devices.yaml b/Documentation/devicetree/bindings/non-dt-devices.yaml
> new file mode 100644
> index 000000000000..206334693c7b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/non-dt-devices.yaml
> @@ -0,0 +1,35 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/non-dt-devices.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Non-devicetree Devices - Exception List
> +
> +maintainers:
> + - Rob Herring <robh@kernel.org>
> +
> +description:
> + Some devices using ACPI with non-updatable firmware/ACPI tables use
> + incorrect Devicetree compatibles via ACPI PRP0001. Developers want to
> + support these devices, thus use such compatibles in Linux drivers, however
> + usage of these within Devicetree sources was rejected.
> +
> + Following list of devices is an incomplete schema with a goal to pass Linux
> + kernel scripts/checkpatch.pl checks about undocumented compatibles but also
> + reject any DTS file using such un-approved compatible.
> +
> + Usage of any of following compatibles is not allowed in Devicetree sources,
> + even if they come from immutable firmware. New entries can be added
> + only on the basis of non-updatable ACPI firmware on the device.
> +
> +properties:
> + compatible:
> + enum:
> + - ltr,ltrf216a
> +
> +required:
> + - compatible
> + - broken-usage-of-incorrect-compatible
That's a neat trick...
> +
> +additionalProperties: false
> --
> 2.43.0
>
next prev parent reply other threads:[~2024-07-09 17:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-09 8:44 [PATCH] dt-bindings: non-dt-devices: document ltr,ltrf216a used via ACPI PRP0001 Krzysztof Kozlowski
2024-07-09 17:02 ` Rob Herring [this message]
2024-07-09 20:48 ` Rob Herring
2024-07-11 7:57 ` Krzysztof Kozlowski
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=20240709170248.GA3803124-robh@kernel.org \
--to=robh@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marex@denx.de \
--cc=sebastian.reichel@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).