linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: AngeloGioacchino Del Regno <kholk11@gmail.com>
Cc: dmitry.torokhov@gmail.com, Rob Herring <robh+dt@kernel.org>,
	rydberg@bitmath.org, priv.luk@gmail.com,
	linux-input@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	marijns95@gmail.com, konradybcio@gmail.com,
	martin.botka1@gmail.com, phone-devel@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v4 3/3] dt-bindings: touchscreen: Add binding for Novatek NT36xxx series driver
Date: Mon, 12 Oct 2020 18:52:08 +0200	[thread overview]
Message-ID: <20201012165208.GA3706@kozik-lap> (raw)
In-Reply-To: <CAK7fi1ZJN=AbkusWqDEbAkZ=AgKEPCvWH43hBpX0-EUDJWOC5g@mail.gmail.com>

On Thu, Oct 08, 2020 at 10:30:35PM +0200, AngeloGioacchino Del Regno wrote:
> Il giorno gio 8 ott 2020 alle ore 20:21 Krzysztof Kozlowski
> <krzk@kernel.org> ha scritto:
> >
> > On Thu, 8 Oct 2020 at 20:15, <kholk11@gmail.com> wrote:
> > >
> > > From: AngeloGioacchino Del Regno <kholk11@gmail.com>
> > >
> > > Add binding for the Novatek NT36xxx series touchscreen driver.
> > >
> > > Signed-off-by: AngeloGioacchino Del Regno <kholk11@gmail.com>
> > > ---
> > >  .../input/touchscreen/novatek,nt36xxx.yaml    | 59 +++++++++++++++++++
> > >  1 file changed, 59 insertions(+)
> > >  create mode 100644 Documentation/devicetree/bindings/input/touchscreen/novatek,nt36xxx.yaml
> > >
> > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/novatek,nt36xxx.yaml b/Documentation/devicetree/bindings/input/touchscreen/novatek,nt36xxx.yaml
> > > new file mode 100644
> > > index 000000000000..e747cacae036
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/input/touchscreen/novatek,nt36xxx.yaml
> > > @@ -0,0 +1,59 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/input/touchscreen/novatek,nt36xxx.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Novatek NT36xxx series touchscreen controller Bindings
> > > +
> > > +maintainers:
> > > +  - Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > > +
> > > +allOf:
> > > +  - $ref: touchscreen.yaml#
> > > +
> > > +properties:
> > > +  compatible:
> > > +    const: novatek,nt36xxx
> >
> > Thanks for the changes, they look good except this part here which I
> > missed before. The compatible should not contain wildcards. If all
> > devices are really compatible, just add here one const, e.g. "const:
> > novatek,nt36525". If they are different, you could add multiple
> > compatibles in enum.
> >
> > Best regards,
> > Krzysztof
> 
> They are all managed the same way, but the page addresses are
> changing between all of them... the driver is reading the chip ID
> while the TS MCU is in "boot mode", then checking in a ID table
> if the chip is supported and finally assigning a page address table.
> This is done for the entire NT36*** series.
> 
> If wildcards are not permitted, perhaps I can change it to something
> like "novatek,nt36" or "novatek,nt36-ts"... as then specifying the
> specific IC model into the DT means that I would have to logically
> change the driver itself to also crosscheck a DT-specified model
> with whatever gets recognized by reading the chip (which then would
> be a triple check of what's going on, imo overcomplicating the logic).
> 
> What would you propose, at this point?

If you want the autodetection based on chip ID, then use the
oldest/earliest device as compatible, so "novatek,nt36525" and keep
everything else as is. In your case the HW description for all devices
is the same, thus one compatible is enough.  This way if in future you
need to bring a difference for a new HW (let's say some imaginary
NT36999), you can simply add a new compatible.

Best regards,
Krzysztof

  reply	other threads:[~2020-10-12 16:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08 18:15 [PATCH v4 0/3] Add Novatek NT36xxx touchscreen driver kholk11
2020-10-08 18:15 ` [PATCH v4 1/3] dt-bindings: Add vendor prefix for Novatek Microelectronics Corp kholk11
2020-10-13 14:23   ` Rob Herring
2020-10-08 18:15 ` [PATCH v4 2/3] Input: Add Novatek NT36xxx touchscreen driver kholk11
2020-10-08 18:15 ` [PATCH v4 3/3] dt-bindings: touchscreen: Add binding for Novatek NT36xxx series driver kholk11
2020-10-08 18:21   ` Krzysztof Kozlowski
2020-10-08 20:30     ` AngeloGioacchino Del Regno
2020-10-12 16:52       ` Krzysztof Kozlowski [this message]
2020-10-13 14:42       ` Rob Herring
2020-10-13 14:45   ` 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=20201012165208.GA3706@kozik-lap \
    --to=krzk@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=kholk11@gmail.com \
    --cc=konradybcio@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marijns95@gmail.com \
    --cc=martin.botka1@gmail.com \
    --cc=phone-devel@vger.kernel.org \
    --cc=priv.luk@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=rydberg@bitmath.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).