Re: [PATCH v4 2/3] dt-bindings: input: qcom,pm8xxx-vib: add new SPMI vibrator module

From: Fenglin Wu
Date: Mon Aug 14 2023 - 22:21:43 EST




On 8/14/2023 6:06 PM, Krzysztof Kozlowski wrote:
On 31/07/2023 07:37, Fenglin Wu wrote:
Add compatible string 'qcom,spmi-vib-gen2' to support vibrator module
inside PMI632, PMI7250B, PM7325B, PM7550BA.

Signed-off-by: Fenglin Wu <quic_fenglinw@xxxxxxxxxxx>
---
.../bindings/input/qcom,pm8xxx-vib.yaml | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/input/qcom,pm8xxx-vib.yaml b/Documentation/devicetree/bindings/input/qcom,pm8xxx-vib.yaml
index c8832cd0d7da..4a2319fc1e3f 100644
--- a/Documentation/devicetree/bindings/input/qcom,pm8xxx-vib.yaml
+++ b/Documentation/devicetree/bindings/input/qcom,pm8xxx-vib.yaml
@@ -11,10 +11,18 @@ maintainers:
properties:
compatible:
- enum:
- - qcom,pm8058-vib
- - qcom,pm8916-vib
- - qcom,pm8921-vib
+ oneOf:
+ - enum:
+ - qcom,pm8058-vib
+ - qcom,pm8916-vib
+ - qcom,pm8921-vib
+ - items:
+ - enum:
+ - qcom,pmi632-vib
+ - qcom,pm7250b-vib
+ - qcom,pm7325b-vib
+ - qcom,pm7550b-vib
+ - const: qcom,spmi-vib-gen2

This does not seem to implement my comment:

"Entirely remove qcom,spmi-vib-gen2 and
qcom,spmi-vib-gen1.

Use device specific compatibles names only. As fallback and as first
compatible."

It's nice to respond that you disagree with it. Therefore, I am not
going to Ack it.

I saw your comments and I replied your later comments in v2: https://lore.kernel.org/linux-arm-msm/b5e58172-beb5-0be3-834f-3f1db3e8b3b3@xxxxxxxxxxx/. It might not be a good place to follow the discussion though, I am pasting my last reply below:

'Sorry, I forgot to mention, in v3, I added the 'reg' value to the
register offset and no longer hard code the 16-bit register address,
that makes the vibrators inside PMI632/PM7250B/PM7325B/PM7550BA all
compatible, and that was another motivation of adding a generic
compatible string and make the others as the fallback.

This will be still the case in v4, I might keep it similar in v3 but
just drop "qcom,spmi-vib-gen1" '

Anyway, if this is still not a good reason to add a generic compatible string, I can revert it back to use device specific compatible string only in next patch.

Thanks


Best regards,
Krzysztof