Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
If/when pm4125 audio codec will be added to a device tree file, then dtbs
check will emit messages that pmic audio-codec@f000 doesn't match any
of the regexes: '^pinctrl-[0-9]+$'.
Add the compatibles for two possible audio codecs so the devicetree for
such audio blocks of PMIC can be validated properly while also
removing reference to qcom,pm8916-wcd-analog-codec schema file.
Suggested-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
---
v5: implemented Krzysztof's suggestion, completely rewrote commit messasge
Previous version:
https://lore.kernel.org/linux-arm-msm/20250915-pm4125_audio_codec_v1-v4-2-b247b64eec52@linaro.org/
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
index 078a6886f8b1..2a7a92371b55 100644
--- a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
+++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
@@ -137,7 +137,11 @@ patternProperties:
"^audio-codec@[0-9a-f]+$":
type: object
- $ref: /schemas/sound/qcom,pm8916-wcd-analog-codec.yaml#
+ properties:
+ compatible:
+ enum:
+ - qcom,pm4125-codec
+ - qcom,pm8916-wcd-analog-codec
"^battery@[0-9a-f]+$":
type: object
--
2.47.3
On 17/10/2025 08:13, Alexey Klimov wrote: > If/when pm4125 audio codec will be added to a device tree file, then dtbs > check will emit messages that pmic audio-codec@f000 doesn't match any > of the regexes: '^pinctrl-[0-9]+$'. Future errors because of present mistakes are not a reason to do something. This makes no sense because there is no DTBs with that compatible, so drop this sentence. We never document compatibles, because in the future they will be errors (if I get it right?). > > Add the compatibles for two possible audio codecs so the devicetree for > such audio blocks of PMIC can be validated properly while also > removing reference to qcom,pm8916-wcd-analog-codec schema file. And that's now incomplete. You add new device here and because preferred and sufficient is to list compatibles, you change existing audio codec child schema reference into just list of compatibles. > > Suggested-by: Krzysztof Kozlowski <krzk@kernel.org> I don't think I suggested this patch. What's more, it wasn't here at v4. > Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> Best regards, Krzysztof
On Fri Oct 17, 2025 at 7:25 AM BST, Krzysztof Kozlowski wrote: > On 17/10/2025 08:13, Alexey Klimov wrote: >> If/when pm4125 audio codec will be added to a device tree file, then dtbs >> check will emit messages that pmic audio-codec@f000 doesn't match any >> of the regexes: '^pinctrl-[0-9]+$'. > > > Future errors because of present mistakes are not a reason to do > something. This makes no sense because there is no DTBs with that > compatible, so drop this sentence. We never document compatibles, > because in the future they will be errors (if I get it right?). Ok. I can hold it off till it will be started to be used then. >> Add the compatibles for two possible audio codecs so the devicetree for >> such audio blocks of PMIC can be validated properly while also >> removing reference to qcom,pm8916-wcd-analog-codec schema file. > > And that's now incomplete. You add new device here and because preferred > and sufficient is to list compatibles, you change existing audio codec > child schema reference into just list of compatibles. So the way I understand this is that commit description is incomplete. I can change it to your liking, okay. FWIW, "add new device here" is said as "Add the compatibles for two possible audio codecs" and removal of child schema reference is also mentioned as "while also removing reference to qcom,pm8916-wcd-analog-codec schema file". But I can change it, okay. >> Suggested-by: Krzysztof Kozlowski <krzk@kernel.org> > > > I don't think I suggested this patch. What's more, it wasn't here at v4. The original idea was to fix the warning or error emitted by dtbs check but now the whole body os the change is your suggestion. Now it seems it was not even needed at that point earlier which is a new finding. Your prefference -- drop it or keep it. >> Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> Best regards, Alexey
On 17/10/2025 08:45, Alexey Klimov wrote: > On Fri Oct 17, 2025 at 7:25 AM BST, Krzysztof Kozlowski wrote: >> On 17/10/2025 08:13, Alexey Klimov wrote: >>> If/when pm4125 audio codec will be added to a device tree file, then dtbs >>> check will emit messages that pmic audio-codec@f000 doesn't match any >>> of the regexes: '^pinctrl-[0-9]+$'. >> >> >> Future errors because of present mistakes are not a reason to do >> something. This makes no sense because there is no DTBs with that >> compatible, so drop this sentence. We never document compatibles, >> because in the future they will be errors (if I get it right?). > > Ok. I can hold it off till it will be started to be used then. No, you don't get the point. You invented fake (future) error as rationale... and want to wait till there is real error to commit this? This makes no sense. You need to provide rationale for this patch - look at every other commit. Best regards, Krzysztof
© 2016 - 2026 Red Hat, Inc.