From: Rob Herring <robh@kernel.org>
To: Dmitry Antipov <daantipov@gmail.com>
Cc: Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Mark Brown <broonie@kernel.org>, Felipe Balbi <balbi@kernel.org>,
linux-input@vger.kernel.org, devicetree@vger.kernel.org,
linux-spi@vger.kernel.org, Dmitry Antipov <dmanti@microsoft.com>
Subject: Re: [PATCH v4 3/6] Documentation: DT bindings for Microsoft G6 Touch Digitizer
Date: Fri, 25 Feb 2022 08:58:31 -0600 [thread overview]
Message-ID: <Yhjul21OnmFWMfqj@robh.at.kernel.org> (raw)
In-Reply-To: <20220225005936.3485405-4-dmanti@microsoft.com>
On Thu, Feb 24, 2022 at 04:59:33PM -0800, Dmitry Antipov wrote:
> From: Dmitry Antipov <dmanti@microsoft.com>
Please follow the conventions of the subsystem for the subject:
dt-bindings: input: ...
>
> Documentation describes the required and optional properties for
> implementing Device Tree for a Microsoft G6 Touch Digitizer that
> supports HID over SPI Protocol 1.0 specification.
>
> Signed-off-by: Dmitry Antipov <dmanti@microsoft.com>
> ---
> .../input/microsoft,g6-touch-digitizer.yaml | 105 ++++++++++++++++++
> 1 file changed, 105 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/input/microsoft,g6-touch-digitizer.yaml
>
> diff --git a/Documentation/devicetree/bindings/input/microsoft,g6-touch-digitizer.yaml b/Documentation/devicetree/bindings/input/microsoft,g6-touch-digitizer.yaml
> new file mode 100644
> index 000000000000..e516717527e9
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/microsoft,g6-touch-digitizer.yaml
> @@ -0,0 +1,105 @@
> +# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/input/microsoft,g6-touch-digitizer.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Microsoft G6 Touch Digitizer
> +
> +maintainers:
> + - Dmitry Antipov <dmanti@microsoft.com>
> +
> +description: |
> + Microsoft G6 touch digitizer is a HID over SPI device supporting HID Over SPI
> + Protocol Specification 1.0, available at
> + https://www.microsoft.com/en-us/download/details.aspx?id=103325.
> +
> +properties:
> + compatible:
> + oneOf:
> + - const: microsoft,g6-touch-digitizer
> + - items:
> + - const: microsoft,g6-touch-digitizer
> + - const: hid-over-spi
Why are both cases needed?
Assuming you keep the 2nd case, you will need a custom 'select' to avoid
applying this schema to another binding using 'hid-over-spi':
select:
properties:
compatible:
contains:
const: microsoft,g6-touch-digitizer
required:
- compatible
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + reset-gpios:
> + maxItems: 1
> + description:
> + GPIO specifier for the digitizer's reset pin (active low). The line must
> + be flagged with GPIO_ACTIVE_LOW.
> +
> + vdd-supply:
> + description:
> + Regulator for the VDD supply voltage.
> +
> + input-report-header-address:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description:
> + This property and the rest are described in HID Over SPI Protocol Spec 1.0
Each property needs a description and a more specific spec location.
No constraints on the values? 0 - 2^32 is valid?
> +
> + input-report-body-address:
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> + output-report-address:
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> + read-opcode:
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> + write-opcode:
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> + hid-over-spi-flags:
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> + post-power-on-delay-ms:
> + description:
> + Optional time in ms required by the device after enabling its regulators
> + or powering it on, before it is ready for communication.
> +
> + minimal-reset-delay-ms:
> + description:
> + Optional minimum amount of time in ms that device needs to be in reset
> + state for the reset to take effect.
These should be implied by the compatible string.
> +
> +required:
> + - compatible
> + - interrupts
> + - reset-gpios
It's not allowed to have reset under h/w control?
> + - vdd-supply
> + - input-report-header-address
> + - input-report-body-address
> + - output-report-address
> + - read-opcode
> + - write-opcode
> + - hid-over-spi-flags
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/irq.h>
> + #include <dt-bindings/gpio/gpio.h>
> + spi-hid-dev0 {
hid@0
And you'll need to define a spi bus.
> + compatible = "microsoft,g6-touch-digitizer", "hid-over-spi";
> + reg = <0>;
> + interrupts-extended = <&gpio 42 IRQ_TYPE_EDGE_FALLING>;
> + reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
> + vdd-supply = <&pm8350c_l3>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&ts_d6_reset_assert &ts_d6_int_bias>;
> + input-report-header-address = <0x1000>;
> + input-report-body-address = <0x1004>;
> + output-report-address = <0x2000>;
> + read-opcode = <0x0b>;
> + write-opcode = <0x02>;
> + hid-over-spi-flags = <0x00>;
> + post-power-on-delay-ms = <5>;
> + minimal-reset-delay-ms = <5>;
> + };
> --
> 2.25.1
>
>
next prev parent reply other threads:[~2022-02-25 14:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-25 0:59 [PATCH v4 0/6] Add spi-hid, transport for HID over SPI bus Dmitry Antipov
2022-02-25 0:59 ` [PATCH v4 1/6] HID: Add BUS_SPI support when printing out device info in hid_connect() Dmitry Antipov
2022-02-25 0:59 ` [PATCH v4 2/6] HID: define HID_SPI_DEVICE macro in hid.h Dmitry Antipov
2022-02-25 0:59 ` [PATCH v4 3/6] Documentation: DT bindings for Microsoft G6 Touch Digitizer Dmitry Antipov
2022-02-25 14:16 ` Rob Herring
2022-02-25 14:58 ` Rob Herring [this message]
2022-02-25 0:59 ` [PATCH v4 4/6] Documentation: Correction in HID output_report callback description Dmitry Antipov
2022-02-25 0:59 ` [PATCH v4 5/6] HID: add spi-hid, transport driver for HID over SPI bus Dmitry Antipov
2022-02-25 0:59 ` [PATCH v4 6/6] Defconfig: add CONFIG_SPI_HID=m Dmitry Antipov
-- strict thread matches above, loose matches on Subject: below --
2022-06-16 18:14 [PATCH v4 3/6] Documentation: DT bindings for Microsoft G6 Touch Digitizer Dmitry Antipov
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=Yhjul21OnmFWMfqj@robh.at.kernel.org \
--to=robh@kernel.org \
--cc=balbi@kernel.org \
--cc=benjamin.tissoires@redhat.com \
--cc=broonie@kernel.org \
--cc=daantipov@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dmanti@microsoft.com \
--cc=dmitry.torokhov@gmail.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-spi@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).