linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: Charles Wang <charles.goodix@gmail.com>,
	dianders@chromium.org, dan.carpenter@linaro.org,
	conor@kernel.org, krzk+dt@kernel.org, jikos@kernel.org,
	bentiss@kernel.org, hbarnor@chromium.org,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Conor Dooley <conor.dooley@microchip.com>
Subject: Re: [PATCH v7 2/2] dt-bindings: input: Goodix SPI HID Touchscreen
Date: Wed, 25 Sep 2024 14:45:54 -0700	[thread overview]
Message-ID: <ZvSEkn66qNziJV0M@google.com> (raw)
In-Reply-To: <CAL_Jsq+6fvCaxLexo9c6zs+8vwyfPAOCCVsejw_uKURVU-Md9w@mail.gmail.com>

On Wed, Sep 25, 2024 at 12:40:56PM -0500, Rob Herring wrote:
> On Tue, Sep 10, 2024 at 5:41 PM Rob Herring <robh@kernel.org> wrote:
> >
> > On Fri, Sep 6, 2024 at 3:28 PM Rob Herring <robh@kernel.org> wrote:
> > >
> > > On Tue, Aug 13, 2024 at 9:45 PM Charles Wang <charles.goodix@gmail.com> wrote:
> > > >
> > > > The Goodix GT7986U touch controller report touch data according to the
> > > > HID protocol through the SPI bus. However, it is incompatible with
> > > > Microsoft's HID-over-SPI protocol.
> > > >
> > > > Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
> > > > Signed-off-by: Charles Wang <charles.goodix@gmail.com>
> > > > ---
> > > >  .../bindings/input/goodix,gt7986u.yaml        | 71 +++++++++++++++++++
> > > >  1 file changed, 71 insertions(+)
> > > >  create mode 100644 Documentation/devicetree/bindings/input/goodix,gt7986u.yaml
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/input/goodix,gt7986u.yaml b/Documentation/devicetree/bindings/input/goodix,gt7986u.yaml
> > > > new file mode 100644
> > > > index 000000000..a7d42a5d6
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/input/goodix,gt7986u.yaml
> > > > @@ -0,0 +1,71 @@
> > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > > +%YAML 1.2
> > > > +---
> > > > +$id: http://devicetree.org/schemas/input/goodix,gt7986u.yaml#
> > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > +
> > > > +title: GOODIX GT7986U SPI HID Touchscreen
> > > > +
> > > > +maintainers:
> > > > +  - Charles Wang <charles.goodix@gmail.com>
> > > > +
> > > > +description: Supports the Goodix GT7986U touchscreen.
> > > > +  This touch controller reports data packaged according to the HID protocol,
> > > > +  but is incompatible with Microsoft's HID-over-SPI protocol.
> > > > +
> > > > +allOf:
> > > > +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> > > > +
> > > > +properties:
> > > > +  compatible:
> > > > +    enum:
> > > > +      - goodix,gt7986u
> > >
> > > This is already documented in goodix,gt7375p.yaml. Now linux-next has warnings:
> > >
> > > /builds/robherring/linux-dt/Documentation/devicetree/bindings/input/goodix,gt7986u.example.dtb:
> > > touchscreen@0: compatible: 'oneOf' conditional failed, one must be
> > > fixed:
> > >         ['goodix,gt7986u'] is too short
> > >         'goodix,gt7375p' was expected
> > >         from schema $id:
> > > http://devicetree.org/schemas/input/goodix,gt7375p.yaml#
> > > /builds/robherring/linux-dt/Documentation/devicetree/bindings/input/goodix,gt7986u.example.dtb:
> > > touchscreen@0: reg:0:0: 0 is not one of [93, 20]
> > >         from schema $id:
> > > http://devicetree.org/schemas/input/goodix,gt7375p.yaml#
> > > /builds/robherring/linux-dt/Documentation/devicetree/bindings/input/goodix,gt7986u.example.dtb:
> > > touchscreen@0: 'vdd-supply' is a required property
> > >         from schema $id:
> > > http://devicetree.org/schemas/input/goodix,gt7375p.yaml#
> > > /builds/robherring/linux-dt/Documentation/devicetree/bindings/input/goodix,gt7986u.example.dtb:
> > > touchscreen@0: 'goodix,hid-report-addr', 'spi-max-frequency' do not
> > > match any of the regexes: 'pinctrl-[0-9]+'
> > >         from schema $id:
> > > http://devicetree.org/schemas/input/goodix,gt7375p.yaml#
> > >
> > > Please sort this out and send a fix.
> >
> > I should add that it is intermittent whether you see this error or
> > not. The tools select a single schema based on the compatible string
> > and it is undefined which of the 2 schemas you will get.
> 
> Still an issue and no response. Please fix or revert the series.

I see that Krzysztof sent a revert, but what a proper fix would be?
Apparently Goodix is using the same product ID gt7986u for both I2C and
SPI parts, and covering them in one binding is not really easy (well, I
guess it is possible with a big ugly "if"). Do we just slap "-spi"
suffix on the compatible, so it becomes "goodix,gt7986u-spi" and go on
on our merry way? Is there a better option for such products that
support multiple interfaces/transports?

Thanks.

-- 
Dmitry

  parent reply	other threads:[~2024-09-25 21:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-14  2:45 [PATCH v7 0/2] HID: add initial support for Goodix HID-over-SPI touchscreen Charles Wang
2024-08-14  2:45 ` [PATCH v7 1/2] HID: hid-goodix: Add Goodix HID-over-SPI driver Charles Wang
2024-08-14  2:45 ` [PATCH v7 2/2] dt-bindings: input: Goodix SPI HID Touchscreen Charles Wang
2024-09-06 20:28   ` Rob Herring
2024-09-10 22:41     ` Rob Herring
2024-09-25 17:40       ` Rob Herring
2024-09-25 20:51         ` Jiri Kosina
2024-09-25 21:45         ` Dmitry Torokhov [this message]
2024-09-25 21:48           ` Jiri Kosina
2024-09-25 21:57             ` Dmitry Torokhov
2024-09-26  1:51           ` Rob Herring
2024-09-26  4:54             ` Charles Wang
2024-08-19 19:17 ` [PATCH v7 0/2] HID: add initial support for Goodix HID-over-SPI touchscreen Jiri Kosina

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=ZvSEkn66qNziJV0M@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=bentiss@kernel.org \
    --cc=charles.goodix@gmail.com \
    --cc=conor.dooley@microchip.com \
    --cc=conor@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=hbarnor@chromium.org \
    --cc=jikos@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@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).