From nobody Thu Dec 18 20:07:03 2025 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A41D7442F for ; Wed, 4 Dec 2024 10:54:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733309680; cv=none; b=ExJ2EBLtli/n+JkU0lge6u39REXxrSPLAPFBTmSByQDr16kkRC/3CnXmpYLKPkBBw/TcskxfARbuu3o10b7keYrrLrkzNQho0VaSkvw/I2jXXS40GYm9t+8zyqKEmEXI7CDTK6WrVc4Ca8viFWq/0J/7cwC9ikJle7p1zIsI7jE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733309680; c=relaxed/simple; bh=IVTuEF9PfaQpMp54Wh8h+mUp8nHxErDQUanmDJ3asS8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=gzJe26oRXrcSxmGcHukizgkttkEso5q/yEHZJ5jVobnnRtbHcNvlPssLwHF+E8SXSMNRix7w0FWt8plKRiH412IZcc79+ki0jWdxEbedtkN3yEHgYD+0H4Hpwfa/uHPDKwPBvOtbRzemeAlJ8Uf1p1l0NhVdr3S6Z+9Z5N6rgPE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=qJBkbQca; arc=none smtp.client-ip=209.85.221.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="qJBkbQca" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-385ddcfc97bso4531206f8f.1 for ; Wed, 04 Dec 2024 02:54:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733309677; x=1733914477; darn=vger.kernel.org; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=kXonveUFexqTc7GT+APSjcQQ2kmHpkmDVElwWyFI8sM=; b=qJBkbQca9QqgHJLshrWNgZwhgF8RxG48uCSNWr/UKwFtLkF/r6LlzU2IjeAeiE9QXR jhw0RkyMp53XY/lpUsPJZKZFVi4miOIaXxLkR/epSNAKmUAHN02hD/9juXc9ZE7q6qjl yx1gkvk5U25ZMbyuDzOIcCTpcJPHstjPuEYDKdISYhRfzum8ufm3c640Y+KAFY3dYFZN 8tVUpn1KeUTtYP+qzkQ8g95axBluRZAaj78+v5cHKkFuj9EiT6V/d339ZBne8mAdMVd5 7b29sHz/Yd9hcQrP67SAKL5ehhIRQlxr9QGSMWv/LR3u8YaYyQIQPjO/V5EHcajTSx3S PPwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733309677; x=1733914477; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kXonveUFexqTc7GT+APSjcQQ2kmHpkmDVElwWyFI8sM=; b=EPG2GBj1hrvOkq5H4j+uah2nu5DUqpHw+QLcx9Fb2Fb17v5FsWtyf6LRKxPcZbZQo7 cgfsN/s47CdmkEFkZ1wK6g/+f8ToEkZVbyJNrXthWNfYta12wF2dGcaJJQ17SZYVjphy DTme4Yy1RV34VU1gjbPMC9pQ6dmRYxnuoRcgL7JOhpMuhAO+mNEMvRS6B0t50Lxt1DRx hYSf5hHv3c/iuJgtw+W289I3JNUcrxtt8fUkbISkZNzEC1sEuCNXNdq1eLPDiRmjPfS/ qiVVigX86eAiANrYAwRoE/l1Na3IbZBBF4Y0Efw7SGmqb/Ure0u/lbVzpy0JcPcmgfPX t4fA== X-Forwarded-Encrypted: i=1; AJvYcCUUeDrdTO2B7cycYIoQnWu+YuLK5ZbGqD0eMFJwvoetvREu6tjw/iUY+KHtLul54pwjxWwTU42ifa+TTdk=@vger.kernel.org X-Gm-Message-State: AOJu0YzTnmq+kGEfwn+uLwaVjapBomlahd4WvUkyeqgn2KIqzIzD+uQy UdsuDdqdeCFeElQalrW8Lq+w7IY9wmDJvGmsZAHM5yDVvRUFXYXpgB9dn3ZCC4I= X-Gm-Gg: ASbGncsjpm4qEFZKBrJRAWgsGwZ1V5NfZCi9ewjkGhRUGzK+JJ40zAfavJnqFRpP/eY qx78rGyoSNgYO25DudEfrw1OgHgFwO8HSvmkVncxOoMzRC+wQify8YsPqC6v3i2MajKtYKbnNMP d/pU4OsfGQZ/IvO3fR9nIuD69XBxIaB3BU8pdPkHxoQBaWxLwqm085zhIC/U4IsZQBWHUpmzdHm 3lUPkroAA++Ri1sBhy6fIUIyC9/UIBAuc+agGpOM9xPiIsHgjvrh4NijYrrcIxYBQHAFVg= X-Google-Smtp-Source: AGHT+IFxXc7jugmydClMLmH2aMVRNjy7vMWMUU7Gkxp4tlOusBPtmbXIutfsZ7afJdnn0+kcLkW5hQ== X-Received: by 2002:a5d:6485:0:b0:382:d7a:315b with SMTP id ffacd0b85a97d-385fd3c699amr4776065f8f.11.1733309676973; Wed, 04 Dec 2024 02:54:36 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-385e940fef3sm11678665f8f.42.2024.12.04.02.54.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Dec 2024 02:54:36 -0800 (PST) From: Neil Armstrong Date: Wed, 04 Dec 2024 11:54:35 +0100 Subject: [PATCH] dt-bindings: input: convert dlg,da7280.txt to dt-schema Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241204-topic-misc-da7280-convert-v1-1-0f89971beca9@linaro.org> X-B4-Tracking: v=1; b=H4sIAOo0UGcC/x3MMQrDMAxA0asEzRXYIiWmVykdhKw0GmoH24RC8 N1jMr7h/xOqFtMKr+mEoodVy2nAPyaQjdNX0eIwkKPZk5ux5d0Ef1YFIy8UHEpOh5aG5HRljs8 QhGH0e9HV/vf7/en9AoKMfJJrAAAA X-Change-ID: 20241204-topic-misc-da7280-convert-20efaad588ca To: Support Opensource , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Roy Im Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=12701; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=IVTuEF9PfaQpMp54Wh8h+mUp8nHxErDQUanmDJ3asS8=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBnUDTr0gpJ1D3jjhcoV8hRd7mpVPmC+m8DpxEUydRC mIt9sxGJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZ1A06wAKCRB33NvayMhJ0SQdEA DOFLHiHYkKYMt7iwFTcMBFn86YCzIX26JBTzC2ZDQ88e9WINatmsHISiPu/61UnvNZkbNA8EuOfuFK CHODacCAEPWMLfV21zqxlne2d3rrfkztmrIYlANj546GR541xRsj/bfLxDw+gehP891UB5OGX0x72S XYFHOF38q1st529KdvsCYbCMMTNUXv6qU9ALbZ0SUAyki5TGbbN4/XJFv7OcjLv1FcbdNAEKjwGoS5 Sqz7GcxAL1YbZVfCE9gnfHe8p5pIYvpcz4Le2GhEYqFRH1fBbBVucb08xBWrtiUSA9KcvddH1x9Yp2 sYI2wONwXoOQAv0dHwrbshbomqYKtoQoGAQdQIjjXGhFW+eOC0J4zJYp5V0NefvhcW7PM5IM4FYHTH 77mMZZ9WOkg6oLaEju+ch2KB0XgdyJoQfN3eqYv850G25OplVV2K6MuKSTtEK1R/rupcQGOI6Weldo iIwc0jNI309xCM9xX8Oqg85BG8DTWgx5b17EriV1mHWJha3tvCDefLKL0OSx8uO7hiJESX4DAwC6lU f+mbNZqgRc1RpWAnRbIOjyCddUW8st+yrUqBJS7SIYtsaz98gLIKtryKevPuUCVYN5FDyAEPwg+bjU pSY5NGEXWRoKVqSLPjHuCJxZUfhvSh0w1xBoBgDQjo8KoI0gXWDqxbSXYkUA== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Convert the Dialog Semiconductor DA7280 Low Power High-Definition Haptic Driver bindings to dt-schema. Signed-off-by: Neil Armstrong --- .../devicetree/bindings/input/dlg,da7280.txt | 108 ---------- .../devicetree/bindings/input/dlg,da7280.yaml | 238 +++++++++++++++++= ++++ 2 files changed, 238 insertions(+), 108 deletions(-) diff --git a/Documentation/devicetree/bindings/input/dlg,da7280.txt b/Docum= entation/devicetree/bindings/input/dlg,da7280.txt deleted file mode 100644 index 96ee5d50e111b85ce680eadd0276280e706bb4cf..000000000000000000000000000= 0000000000000 --- a/Documentation/devicetree/bindings/input/dlg,da7280.txt +++ /dev/null @@ -1,108 +0,0 @@ -Dialog Semiconductor DA7280 Haptics bindings - -Required properties: -- compatible: Should be "dlg,da7280". -- reg: Specifies the I2C slave address. - -- interrupt-parent : Specifies the phandle of the interrupt controller to - which the IRQs from DA7280 are delivered to. - -- dlg,actuator-type: Set Actuator type. it should be one of: - "LRA" - Linear Resonance Actuator type. - "ERM-bar" - Bar type Eccentric Rotating Mass. - "ERM-coin" - Coin type Eccentric Rotating Mass. - -- dlg,const-op-mode: Haptic operation mode for FF_CONSTANT. - Possible values: - 1 - Direct register override(DRO) mode triggered by i2c(default), - 2 - PWM data source mode controlled by PWM duty, -- dlg,periodic-op-mode: Haptic operation mode for FF_PERIODIC. - Possible values: - 1 - Register triggered waveform memory(RTWM) mode, the pattern - assigned to the PS_SEQ_ID played as much times as PS_SEQ_LOOP, - 2 - Edge triggered waveform memory(ETWM) mode, external GPI(N) - control are required to enable/disable and it needs to keep - device enabled by sending magnitude (X > 0), - the pattern is assigned to the GPI(N)_SEQUENCE_ID below. - The default value is 1 for both of the operation modes. - For more details, please see the datasheet. - -- dlg,nom-microvolt: Nominal actuator voltage rating. - Valid values: 0 - 6000000. -- dlg,abs-max-microvolt: Absolute actuator maximum voltage rating. - Valid values: 0 - 6000000. -- dlg,imax-microamp: Actuator max current rating. - Valid values: 0 - 252000. - Default: 130000. -- dlg,impd-micro-ohms: the impedance of the actuator in micro ohms. - Valid values: 0 - 1500000000. - -Optional properties: -- pwms : phandle to the physical PWM(Pulse Width Modulation) device. - PWM properties should be named "pwms". And number of cell is different - for each pwm device. - (See Documentation/devicetree/bindings/pwm/pwm.txt - for further information relating to pwm properties) - -- dlg,ps-seq-id: the PS_SEQ_ID(pattern ID in waveform memory inside chip) - to play back when RTWM-MODE is enabled. - Valid range: 0 - 15. -- dlg,ps-seq-loop: the PS_SEQ_LOOP, Number of times the pre-stored sequence - pointed to by PS_SEQ_ID or GPI(N)_SEQUENCE_ID is repeated. - Valid range: 0 - 15. -- dlg,gpiN-seq-id: the GPI(N)_SEQUENCE_ID, pattern to play - when gpi0 is triggered, 'N' must be 0 - 2. - Valid range: 0 - 15. -- dlg,gpiN-mode: the pattern mode which can select either - "Single-pattern" or "Multi-pattern", 'N' must be 0 - 2. -- dlg,gpiN-polarity: gpiN polarity which can be chosen among - "Rising-edge", "Falling-edge" and "Both-edge", - 'N' must be 0 - 2 - Haptic will work by this edge option in case of ETWM mode. - -- dlg,resonant-freq-hz: use in case of LRA. - the frequency range: 50 - 300. - Default: 205. - -- dlg,bemf-sens-enable: Enable for internal loop computations. -- dlg,freq-track-enable: Enable for resonant frequency tracking. -- dlg,acc-enable: Enable for active acceleration. -- dlg,rapid-stop-enable: Enable for rapid stop. -- dlg,amp-pid-enable: Enable for the amplitude PID. -- dlg,mem-array: Customized waveform memory(patterns) data downloaded to - the device during initialization. This is an array of 100 values(u8). - -For further information, see device datasheet. - -=3D=3D=3D=3D=3D=3D - -Example: - - haptics: da7280-haptics@4a { - compatible =3D "dlg,da7280"; - reg =3D <0x4a>; - interrupt-parent =3D <&gpio6>; - interrupts =3D <11 IRQ_TYPE_LEVEL_LOW>; - dlg,actuator-type =3D "LRA"; - dlg,dlg,const-op-mode =3D <1>; - dlg,dlg,periodic-op-mode =3D <1>; - dlg,nom-microvolt =3D <2000000>; - dlg,abs-max-microvolt =3D <2000000>; - dlg,imax-microamp =3D <170000>; - dlg,resonant-freq-hz =3D <180>; - dlg,impd-micro-ohms =3D <10500000>; - dlg,freq-track-enable; - dlg,rapid-stop-enable; - dlg,mem-array =3D < - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 - >; - }; diff --git a/Documentation/devicetree/bindings/input/dlg,da7280.yaml b/Docu= mentation/devicetree/bindings/input/dlg,da7280.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b9cdf4543598cc1637061a63a11= 43f541bf22b88 --- /dev/null +++ b/Documentation/devicetree/bindings/input/dlg,da7280.yaml @@ -0,0 +1,238 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/dlg,da7280.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Dialog Semiconductor DA7280 Low Power High-Definition Haptic Driver + +maintainers: + - Roy Im + +properties: + compatible: + const: dlg,da7280 + + reg: + maxItems: 1 + description: I2C address of the device. + + interrupts: + maxItems: 1 + + dlg,actuator-type: + enum: + - LRA # Linear Resonance Actuator type + - ERM-bar # Bar type Eccentric Rotating Mass + - ERM-coin # Coin type Eccentric Rotating Mass + + dlg,const-op-mode: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: + - 0 # Direct register override (DRO) mode triggered by i2c (default) + - 1 # PWM data source mode controlled by PWM duty + description: + Haptic operation mode for FF_CONSTANT + + dlg,periodic-op-mode: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: + - 1 # Register triggered waveform memory(RTWM) mode, the pattern + # assigned to the PS_SEQ_ID played as much times as PS_SEQ_LOOP + - 2 # Edge triggered waveform memory(ETWM) mode, external GPI(N) + # control are required to enable/disable and it needs to keep + # device enabled by sending magnitude (X > 0), + # the pattern is assigned to the GPI(N)_SEQUENCE_ID below + default: 1 + description: + Haptic operation mode for FF_PERIODIC. + The default value is 1 for both of the operation modes. + For more details, please see the datasheet + + dlg,nom-microvolt: + minimum: 0 + maximum: 6000000 + description: + Nominal actuator voltage rating + + dlg,abs-max-microvolt: + minimum: 0 + maximum: 6000000 + description: + Absolute actuator maximum voltage rating + + dlg,imax-microamp: + minimum: 0 + maximum: 252000 + default: 130000 + description: + Actuator max current rating + + dlg,impd-micro-ohms: + minimum: 0 + maximum: 1500000000 + description: + Impedance of the actuator + + pwms: + maxItems: 1 + + dlg,ps-seq-id: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 15 + description: + The PS_SEQ_ID(pattern ID in waveform memory inside chip) + to play back when RTWM-MODE is enabled + + dlg,ps-seq-loop: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 15 + description: + The PS_SEQ_LOOP, Number of times the pre-stored sequence pointed to = by + PS_SEQ_ID or GPI(N)_SEQUENCE_ID is repeated + + dlg,gpi0-seq-id: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 15 + description: + the GPI0_SEQUENCE_ID, pattern to play when gpi0 is triggered + + dlg,gpi1-seq-id: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 15 + description: + the GPI1_SEQUENCE_ID, pattern to play when gpi1 is triggered + + dlg,gpi2-seq-id: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 15 + description: + the GPI2_SEQUENCE_ID, pattern to play when gpi2 is triggered + + dlg,gpi0-mode: + enum: + - Single-pattern + - Multi-pattern + description: + Pattern mode for gpi0 + + dlg,gpi1-mode: + enum: + - Single-pattern + - Multi-pattern + description: + Pattern mode for gpi1 + + dlg,gpi2-mode: + enum: + - Single-pattern + - Multi-pattern + description: + Pattern mode for gpi2 + + dlg,gpi0-polarity: + enum: + - Rising-edge + - Falling-edge + - Both-edge + description: + gpi0 polarity, Haptic will work by this edge option in case of ETWM = mode + + dlg,gpi1-polarity: + enum: + - Rising-edge + - Falling-edge + - Both-edge + description: + gpi1 polarity, Haptic will work by this edge option in case of ETWM = mode + + dlg,gpi2-polarity: + enum: + - Rising-edge + - Falling-edge + - Both-edge + description: + gpi2 polarity, Haptic will work by this edge option in case of ETWM = mode + + dlg,resonant-freq-hz: + minimum: 50 + maximum: 300 + default: 205 + + dlg,bemf-sens-enable: + type: boolean + description: + Enable for internal loop computations + + dlg,freq-track-enable: + type: boolean + description: + Enable for resonant frequency tracking + + dlg,acc-enable: + type: boolean + description: + Enable for active acceleration + + dlg,rapid-stop-enable: + type: boolean + description: + Enable for rapid stop + + dlg,amp-pid-enable: + type: boolean + description: + Enable for the amplitude PID + + dlg,mem-array: + $ref: /schemas/types.yaml#/definitions/uint8-array + minItems: 100 + description: + Customized waveform memory (patterns) data downloaded to the device = during initialization + +required: + - compatible + +additionalProperties: false + +examples: + - | + #include + #include + + i2c { + #address-cells =3D <1>; + #size-cells =3D <0>; + + haptics@4a { + compatible =3D "dlg,da7280"; + reg =3D <0x4a>; + interrupt-parent =3D <&gpio6>; + interrupts =3D <11 IRQ_TYPE_LEVEL_LOW>; + dlg,actuator-type =3D "LRA"; + dlg,const-op-mode =3D <1>; + dlg,periodic-op-mode =3D <1>; + dlg,nom-microvolt =3D <2000000>; + dlg,abs-max-microvolt =3D <2000000>; + dlg,imax-microamp =3D <170000>; + dlg,resonant-freq-hz =3D <180>; + dlg,impd-micro-ohms =3D <10500000>; + dlg,freq-track-enable; + dlg,rapid-stop-enable; + dlg,mem-array =3D /bits/ 8 <0x00 0x00 0x00 0x00 0x00 0x00 0x00= 0x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0= x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0= x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0= x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0= x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0= x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0= x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0= x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0= x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0= x00 0x00 0x00>; + }; + }; --- base-commit: c245a7a79602ccbee780c004c1e4abcda66aec32 change-id: 20241204-topic-misc-da7280-convert-20efaad588ca Best regards, --=20 Neil Armstrong