linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Rob Herring <robh@kernel.org>,
	Douglas Anderson <dianders@chromium.org>,
	Jiri Kosina <jkosina@suse.cz>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	andrea@borgia.bo.it, Kai Heng Feng <kai.heng.feng@canonical.com>,
	"open list:HID CORE LAYER" <linux-input@vger.kernel.org>,
	Stephen Boyd <swboyd@chromium.org>,
	Hans De Goede <hdegoede@redhat.com>,
	DTML <devicetree@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/3] dt-bindings: HID: i2c-hid: Label this binding as deprecated
Date: Fri, 30 Oct 2020 13:11:24 -0700	[thread overview]
Message-ID: <20201030201124.GG2547185@dtor-ws> (raw)
In-Reply-To: <CAO-hwJK8c+BrH3u5PMCndv6Jjj6K2z=4nyKMAojD09EcHjBROA@mail.gmail.com>

On Fri, Oct 30, 2020 at 08:12:06PM +0100, Benjamin Tissoires wrote:
> On Fri, Oct 30, 2020 at 7:00 PM Rob Herring <robh@kernel.org> wrote:
> >
> > On Fri, Oct 30, 2020 at 11:51:53AM +0100, Benjamin Tissoires wrote:
> > > Hi Doug,
> > >
> > > Foreword: I was about to say "yeah, whatever" to please Rob for once.
> >
> > Read my other reply first... I think we mostly agree.
> >
> > > But after re-reading this and more specifically patch 3 of the series,
> > > that won't do. More comments inlined.
> > >
> > > On Sat, Oct 24, 2020 at 1:23 AM Douglas Anderson <dianders@chromium.org> wrote:
> > > >
> > > > As pointed out by Rob Herring [1], we should have a device-specific
> > > > compatible string.  This means people shouldn't be using the
> > > > "i2c-over-hid" compatible string anymore, or at least not without a
> > > > more specific compatible string before it.  Specifically:
> > > >
> > > > 1. For newly added devices we should just have the device-specific
> > > >    device string (no "hid-over-i2c" fallback) and infer the timings
> > > >    and hid-descr-addr from there.
> > >
> > > And that's a big NACK from a maintainer point of view. I know in the
> > > device tree world these strings are important so that people can just
> > > say "I have a device compatible with X", and go on, but in the HID
> > > world that means we will have to implement one compatible struct per
> > > vendor/device, which is not something I want to do.
> >
> > It's not really any different than PCI and USB VID/PIDs.
> 
> Well, it is, because in the USB (HID) world, there is a specification
> that provides all of the entry points a device needs. In the i2c-hid
> case, the only entry point a device needs, in the ACPI world is one
> register address, and this is provided by ACPI itself. So in the ACPI
> world, for i2c-hid devices, we don't need to recompile the driver to
> support any current or new devices.
> 
> >
> > > You can think of it as if you are suddenly saying that because it
> > > would be easier for a few particular USB devices that need a quirk,
> > > you "just" need to add the list of *all* USB HID devices that are
> > > around. i2c-hid should be a driver that doesn't change unless 2 things
> > > happen:
> > > - there is a change in the spec
> > > - there is a specific quirk required for a device that doesn't follow the spec.
> >
> > Or does something outside of what the spec covers.
> 
> This is solved in the ACPI case by running ACPI callbacks, and I am
> more and more thinking we should mimic that for DT devices.

So this is the root of the problem. I2CHID spec was done for ACPI-based
systems, with very limited interface between hardware and the kernel and
all "unplesantness" such as powering up and down devices properly tucked
safely away into firmware. So there is still a lot of custom code, we
just do not see it and can pretend it does not exist.

So even in case of "standard" I2C one can not say they do not need to
recompile to use a new device, they just need to recompile different
thing (driver vs firmware).

I am still unsure if we want a flexible way of describing power up
sequence, or simply hard-code based on a given model. Given that here
are many I2C-HID compatible devices a flexible scheme would be nice IMO.

Thanks.

-- 
Dmitry

  reply	other threads:[~2020-10-30 20:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-23 23:22 [PATCH v2 1/3] dt-bindings: HID: i2c-hid: Label this binding as deprecated Douglas Anderson
2020-10-23 23:22 ` [PATCH v2 2/3] dt-bindings: HID: i2c-hid: Introduce bindings for the Goodix GT7375P Douglas Anderson
2020-10-23 23:30   ` Doug Anderson
2020-10-30 10:52   ` Benjamin Tissoires
2020-10-23 23:22 ` [PATCH v2 3/3] HID: i2c-hid: Support the Goodix GT7375P touchscreen Douglas Anderson
2020-10-30 11:01   ` Benjamin Tissoires
2020-10-30 10:51 ` [PATCH v2 1/3] dt-bindings: HID: i2c-hid: Label this binding as deprecated Benjamin Tissoires
2020-10-30 18:00   ` Rob Herring
2020-10-30 19:12     ` Benjamin Tissoires
2020-10-30 20:11       ` Dmitry Torokhov [this message]
2020-11-03  0:18       ` Doug Anderson
2020-10-30 16:47 ` Rob Herring
2020-11-03  0:16   ` Doug Anderson

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=20201030201124.GG2547185@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=andrea@borgia.bo.it \
    --cc=benjamin.tissoires@redhat.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=jkosina@suse.cz \
    --cc=kai.heng.feng@canonical.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=swboyd@chromium.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).