From: Rob Herring <robh@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org, phone-devel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH 2/3] dt-bindings: input: Add bindings for Immersion ISA1200
Date: Mon, 21 Mar 2022 14:10:11 -0500 [thread overview]
Message-ID: <YjjNkyChcJcaJi11@robh.at.kernel.org> (raw)
In-Reply-To: <20220315233528.1204930-2-linus.walleij@linaro.org>
On Wed, Mar 16, 2022 at 12:35:27AM +0100, Linus Walleij wrote:
> This adds device tree bindings for the Immersion ISA1200
> haptic feedback unit.
>
> Cc: phone-devel@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> .../bindings/input/immersion,isa1200.yaml | 74 +++++++++++++++++++
> 1 file changed, 74 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/input/immersion,isa1200.yaml
>
> diff --git a/Documentation/devicetree/bindings/input/immersion,isa1200.yaml b/Documentation/devicetree/bindings/input/immersion,isa1200.yaml
> new file mode 100644
> index 000000000000..e6bbefce74a8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/immersion,isa1200.yaml
> @@ -0,0 +1,74 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/input/immersion,isa1200.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Immersion ISA1200 Haptic Feedback Unit
> +
> +maintainers:
> + - Linus Walleij <linus.walleij@linaro.org>
> +
> +description:
> + The Immersion ISA1200 is a haptic feedback chip using two motors of
> + LRA or ERM type. It can generate a PWM signal to control the motors from
> + a fixed input clock, or it can amplify and modify an existing PWM
> + input. It is communicating with the host system using I2C.
> +
> +properties:
> + compatible:
> + description: One compatible per product using this chip. Each product
> + need deliberate custom values for things such as LRA resonance
> + frequency and these are not stored in the device tree, rather we
> + let the operating system look up the appropriate parameters from a
> + table.
> + enum:
> + - immersion,isa1200-janice
> + - immersion,isa1200-gavini
Same device, different boards. I think I would put necessary properties
in the DT.
> +
> + reg:
> + description: I2C address for the ISA1200
> +
> + hen-gpios:
> + description: GPIO line that drives the HEN (Motor Hardware Enable) pin
> + on the chip.
> + maxItems: 1
> +
> + len-gpios:
> + description: GPIO line that drives the LEN (LDO Enable) pin on the chip.
> + maxItems: 1
> +
> + clocks:
> + description: Clock that drives the chip if using the chip to generate a
> + PWM from a clock. Either clocks or pwms must be defined.
> + maxItems: 1
> +
> + pwms:
> + description: PWM that drives the chip if using an external PWM generator.
> + Either pwms or clocks must be defined.
That can be expressed as:
oneOf:
- required: [ clocks ]
- required: [ pwms ]
(or 'anyOf' if you want to allow both)
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> + - hen-gpios
> + - len-gpios
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> +
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + haptic@49 {
> + compatible = "immersion,isa1200-janice";
> + reg = <0x49>;
> + hen-gpios = <&gpio6 2 GPIO_ACTIVE_HIGH>;
> + len-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>;
> + clocks = <&clkout_clk>;
> + };
> + };
> --
> 2.35.1
>
>
next prev parent reply other threads:[~2022-03-21 19:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-15 23:35 [PATCH 1/3] dt-bindings: Add Immersion Corporation prefix Linus Walleij
2022-03-15 23:35 ` [PATCH 2/3] dt-bindings: input: Add bindings for Immersion ISA1200 Linus Walleij
2022-03-21 19:10 ` Rob Herring [this message]
2022-03-23 14:57 ` Linus Walleij
2022-03-23 22:07 ` Rob Herring
2022-03-15 23:35 ` [PATCH 3/3] Input: isa1200 - new driver " Linus Walleij
2022-03-22 0:03 ` Jeff LaBundy
2022-03-21 19:01 ` [PATCH 1/3] dt-bindings: Add Immersion Corporation prefix Rob Herring
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=YjjNkyChcJcaJi11@robh.at.kernel.org \
--to=robh@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-input@vger.kernel.org \
--cc=phone-devel@vger.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;
as well as URLs for NNTP newsgroup(s).