The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	Manivannan Sadhasivam <mani@kernel.org>
Cc: Rahul Samana <rahul.samana@oss.qualcomm.com>,
	Bartosz Golaszewski <brgl@kernel.org>,
	Marcel Holtmann <marcel@holtmann.org>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Balakrishna Godavarthi <quic_bgodavar@quicinc.com>,
	Rocky Liao <quic_rjliao@quicinc.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	linux-arm-msm@vger.kernel.org, linux-bluetooth@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org, linux-pm@vger.kernel.org,
	quic_mohamull@quicinc.com, quic_hbandi@quicinc.com,
	quic_anubhavg@quicinc.com
Subject: Re: [PATCH v2 1/6] dt-bindings: bluetooth: qca: add QCC2072
Date: Mon, 10 Aug 2026 12:28:36 +0200	[thread overview]
Message-ID: <5330838e-d3f0-454a-b856-bd8fc3e941aa@kernel.org> (raw)
In-Reply-To: <2iymaoj6ryayvsyfnrkwf6ldq57lkitoyqrazytxh7wxnpeoeo@vg6q35cua2oy>

On 07/08/2026 11:40, Dmitry Baryshkov wrote:
> On Wed, Aug 05, 2026 at 04:52:15PM +0200, Manivannan Sadhasivam wrote:
>> On Wed, Aug 05, 2026 at 04:36:31PM +0200, Krzysztof Kozlowski wrote:
>>> On 05/08/2026 16:12, Manivannan Sadhasivam wrote:
>>>> On Wed, Aug 05, 2026 at 02:33:51PM +0200, Krzysztof Kozlowski wrote:
>>>>> DT is not representation of internal device driver instantiation mechanism.
>>>>>
>>>>
>>>> Here, the driver is just creating compatible for a real device. What difference
>>>> does it make if the BT node was defined statically in the DT vs created
>>>> dynamically? Both nodes do represent a real BT device, not driver's own
>>>> representation. And by the time the node was created, the device is physically
>>>> attached to the system.
>>>
>>> What stops this power sequencing drivers, after more driver patches, the
>>> best if being part of some bigger series, to add properties like
>>> "linux,name-of-driver-to-bind" or whatever other SW properties?
>>>
>>> This is what happened in that linked thread:
>>> https://lore.kernel.org/all/20260326-pci-m2-e-v7-8-43324a7866e6@oss.qualcomm.com/
>>> The driver code is adding children under other nodes (references by
>>> graph) and it is nowhere documented. Maybe bindings of these other nodes
>>> allow it, maybe not. How do you even validate that?
>>>
>>
>> So the concern is validating the properties that get added dynamically and I get
>> that. How about inserting an overlay for the BT node instead of creating the
>> node on the fly? Like, drivers/misc/lan966x_pci.dtso
>>
>> This way, the overlay would be validated against a binding and the driver would
>> just be inserting it.
>>
>>> So answering your question - yes, there is a difference because:
>>> 1. DTS we validate but whatever you add to driver code we do not and we
>>> cannot,
>>> 2. DTS represents hardware but whatever you do in your driver code
>>> represents who knows what (maybe hardware, maybe not, can represent
>>> anything)
>>>
>>> And if you claim "I add hardware in the driver!", I respond - maybe
>>> true, maybe not, but look at this crap:
>>> https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=687bfbba5a1cb15cee51519c210141ed1c4b0ec7
>>>
>>> Since we DISALLOWED venus-decoder and venus-encoder DT nodes, what did
>>> Bryan do? Squeezed via driver code fake disallowed nodes and even gave
>>> them compatibles not looking like compatibles, so any regex won't work.
>>>
>>> This power sequencing work here has the same problem of sneaking ABI,
>>> which I pointed out here:
>>> https://lore.kernel.org/all/9cc5af16-d95e-4f10-8b4a-5e29c136079c@kernel.org/
>>>
>>> Look at above patch - nothing documents that ABI. The same as Bryan's
>>> fake venus-decoder and encore (not only fake but actually rejected). And
>>> to avoid ABI-check tools (or incoming tools), this power sequencing code
>>> does not even call a "compatible" a "compatible". No, it calls it
>>> "driver_data" nicely avoiding detection.
>>>
>>> This is terrible practice and I feel like allowing this patch is silent
>>> acknowledgment or agreement of such practice.
>>>
>>> It's about basic ABI principles - if you have DT ABI, it must be both
>>> clear in the drivers code and in DT bindings, instead of obfuscated
>>> calling a compatible driver data. If you don't, then this is not DT ABI
>>> and you are not allowed to use OF code to instantiate drivers. Use SW
>>> nodes or KHO-style whatever else is there.
>>>
>>
>> I did propose using SW nodes initially, but then it got changed to
> 
> If I remember previous discussions, SW nodes can be used to provide
> additional information about the existing devices. They should not be
> used for matching.

Yeah, matching is via standard driver name for example like MFD is doing
for platform bus.

This is not that different than MFD.

Best regards,
Krzysztof

  reply	other threads:[~2026-08-10 10:28 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-27 15:45 [PATCH v2 0/6] Bluetooth: qca: enable QCC2072 on RB3 Gen 2 Industrial Rahul Samana
2026-07-27 15:45 ` [PATCH v2 1/6] dt-bindings: bluetooth: qca: add QCC2072 Rahul Samana
2026-07-31  9:46   ` Krzysztof Kozlowski
2026-07-31 14:45     ` Rahul Samana
2026-07-31 15:04       ` Krzysztof Kozlowski
2026-07-31 15:51         ` Rahul Samana
2026-08-01 14:48           ` Krzysztof Kozlowski
2026-08-01 15:31             ` Rahul Samana
2026-08-01 15:49               ` Krzysztof Kozlowski
2026-08-05 12:09                 ` Manivannan Sadhasivam
2026-08-05 12:33                   ` Krzysztof Kozlowski
2026-08-05 14:12                     ` Manivannan Sadhasivam
2026-08-05 14:36                       ` Krzysztof Kozlowski
2026-08-05 14:52                         ` Manivannan Sadhasivam
2026-08-07  9:40                           ` Dmitry Baryshkov
2026-08-10 10:28                             ` Krzysztof Kozlowski [this message]
2026-08-07  9:57                 ` Dmitry Baryshkov
2026-08-10 10:27                   ` Krzysztof Kozlowski
2026-07-27 15:45 ` [PATCH v2 2/6] Bluetooth: qca: add QCC2072 support Rahul Samana
2026-07-31 15:09   ` Dmitry Baryshkov
2026-07-31 17:51     ` Rahul Samana
2026-07-27 15:45 ` [PATCH v2 3/6] power: sequencing: pwrseq-pcie-m2: add QCC2072 Rahul Samana
2026-07-27 15:45 ` [PATCH v2 4/6] arm64: dts: qcom: qcs6490-rb3gen2: label BT PMU and M.2 PCI node Rahul Samana
2026-07-31 15:30   ` Rahul Samana
2026-07-27 15:45 ` [PATCH v2 5/6] arm64: dts: qcom: kodiak: mark PCIe root port as bridge Rahul Samana
2026-07-27 15:57   ` Rahul Samana
2026-07-29 12:29   ` Konrad Dybcio
2026-07-27 15:45 ` [PATCH v2 6/6] arm64: dts: qcom: rb3gen2: add Industrial BT UART overlay Rahul Samana
2026-07-29 12:31   ` Konrad Dybcio
2026-07-31  6:53     ` Rahul Samana
2026-07-31 12:50       ` Konrad Dybcio
2026-07-31 14:48         ` Rahul Samana
2026-07-31 15:49           ` Konrad Dybcio
2026-07-31 17:50             ` Rahul Samana
2026-08-02  3:38               ` Bjorn Andersson
2026-08-05  6:18                 ` Rahul Samana
2026-08-06 23:02                   ` Bjorn Andersson

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=5330838e-d3f0-454a-b856-bd8fc3e941aa@kernel.org \
    --to=krzk@kernel.org \
    --cc=andersson@kernel.org \
    --cc=brgl@bgdev.pl \
    --cc=brgl@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=mani@kernel.org \
    --cc=marcel@holtmann.org \
    --cc=quic_anubhavg@quicinc.com \
    --cc=quic_bgodavar@quicinc.com \
    --cc=quic_hbandi@quicinc.com \
    --cc=quic_mohamull@quicinc.com \
    --cc=quic_rjliao@quicinc.com \
    --cc=rahul.samana@oss.qualcomm.com \
    --cc=robh@kernel.org \
    /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