Re: [PATCH 1/4] dt-bindings: input: Add binding for Qualcomm SPMI PMIC haptics

From: Krzysztof Kozlowski

Date: Wed Jun 17 2026 - 06:46:52 EST


On Tue, Jun 16, 2026 at 03:08:24AM -0700, Fenglin Wu wrote:
> Add binding document for the haptics module inside Qualcomm PMIH010X.

A nit, subject: drop second/last, redundant "binding for". The
"dt-bindings" prefix is already stating that these are bindings.
See also:
https://elixir.bootlin.com/linux/v7.1-rc7/source/Documentation/devicetree/bindings/submitting-patches.rst#L23

>
> Assisted-by: Claude:claude-4-6-sonnet
> Signed-off-by: Fenglin Wu <fenglin.wu@xxxxxxxxxxxxxxxx>
> ---
> .../bindings/input/qcom,spmi-haptics.yaml | 119 +++++++++++++++++++++
> 1 file changed, 119 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/input/qcom,spmi-haptics.yaml b/Documentation/devicetree/bindings/input/qcom,spmi-haptics.yaml
> new file mode 100644
> index 000000000000..0e26d68563dc
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/qcom,spmi-haptics.yaml

Filenamem should match compatible.

> @@ -0,0 +1,119 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/input/qcom,spmi-haptics.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Haptics device inside Qualcomm Technologies, Inc. PMIH010X
> +
> +maintainers:
> + - Fenglin Wu <fenglin.wu@xxxxxxxxxxxxxxxx>
> +

...

> +properties:
> + compatible:
> + const: qcom,pmih010x-haptics

Don't use Claude. It does not understand DT. Please read writing
bindings document or DTS101 slides. You cannot have wildcards.

> +
> + reg:
> + items:
> + - description: HAP_CFG module base address
> + - description: HAP_PTN module base address
> +
> + reg-names:
> + items:
> + - const: hap-cfg

cfg

> + - const: hap-ptn

ptn

> +
> + interrupts:
> + maxItems: 1
> +
> + interrupt-names:
> + items:
> + - const: fifo-empty
> +
> + qcom,vmax-mv:

And claude did not tell you that this is not correct? If so, please
don't use it. It's crap tool if it cannot get the basics of DT (was
mentioned on talks many times, is documented etc).

You need proper suffix.


> + description:
> + Maximum allowed output driving voltage in millivolts, rounded to the
> + nearest 50 mV step. This is the peak driving voltage in DIRECT_PLAY mode
> + which outputs sinusoidal waveforms. The value should be equal to the square
> + root of 2 times the Vrms voltage of the LRA.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + minimum: 50
> + maximum: 10000
> +
> + qcom,lra-period-us:
> + description:
> + LRA actuator initial resonance period in microseconds
> + (1,000,000 / resonant_freq_hz). Used to configure T_LRA-based play
> + rates and the auto-resonance zero-crossing window.

This does not feel like static characteristic. Isn't period depending on
intensity of vibration you want to have? Why would that be fixed per
board?

> + minimum: 5
> + maximum: 20475
> +
> +required:
> + - compatible
> + - reg
> + - reg-names
> + - interrupts
> + - interrupt-names
> + - qcom,vmax-mv
> + - qcom,lra-period-us
> +

Best regards,
Krzysztof