All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Brian Norris <briannorris@chromium.org>
Cc: Emil Renner Berthing <kernel@esmil.dk>,
	Heiko Stuebner <heiko@sntech.de>,
	Doug Anderson <dianders@chromium.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: dts: rockchip: enable touchpad button for rk3399-gru-kevin
Date: Tue, 10 Oct 2017 10:25:16 -0700	[thread overview]
Message-ID: <20171010172516.GA1681@dtor-ws> (raw)
In-Reply-To: <20171010170355.GA136735@google.com>

On Tue, Oct 10, 2017 at 10:03:57AM -0700, Brian Norris wrote:
> + Dmitry, who can probably answer better than I can
> 
> On Tue, Oct 10, 2017 at 01:04:20PM +0200, Emil Renner Berthing wrote:
> > On 10 October 2017 at 11:33, Heiko Stuebner <heiko@sntech.de> wrote:
> > > Am Montag, 9. Oktober 2017, 20:40:28 CEST schrieb Emil Renner Berthing:
> > >> Adding the linux,gpio-keymap entry also has
> > >> the side-effect of making the driver register
> > >> the touchpad as a touchpad rather than another
> > >> touchscreen.
> > >>
> > >> The index for BTN_LEFT was found by trial and error.
> > >>
> > >> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
> > >
> > > looks good to me. I'll just give the ChromeOS people a chance to
> > > respond before applying [maybe they can even tell what the other
> > > keys are :-) ]

They are not connected.

> > 
> > Good plan. As far as I can tell their kernel doesn't send anything but
> > BTN_LEFT either. It's just that the controller supports multiple
> > buttons, but not all are necessarily connected to any button.
> > Their version of the driver has logic to detect the proper keymap
> > whereas the mainline driver gets it from this devicetree entry.
> 
> I believe Emil is mostly correct. We only are using a BTN_LEFT in our
> copy of the driver, and I'm not sure the others are connected to
> anything. As Dmitry has explained to me (when I also wondered about
> "detect[ing] the proper keymap"), we don't exactly "auto"discover
> things; we just heuristically determine the configurations we know are
> used on Chrome devices.

Right, we had a "legacy" GPIO/button mapping on original Pixels that
used T9 multitouch reports, then we switched to a bit different mapping
for newer devices that use T100 multitouch reports.

We should really have explicit map, like we have in upstream driver.

> 
> So from the sound of it, this keymap property is reasonable. I haven't
> actually checked what our driver "auto" detects on gru-kevin, but if
> this works then I'll bet it's correct :)
> 
> IOW, I don't know enough to ACK this patch, but I'm certainly not going
> to NAK it.

I think I can ACK it:

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Thanks.

-- 
Dmitry

WARNING: multiple messages have this Message-ID (diff)
From: dmitry.torokhov@gmail.com (Dmitry Torokhov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: dts: rockchip: enable touchpad button for rk3399-gru-kevin
Date: Tue, 10 Oct 2017 10:25:16 -0700	[thread overview]
Message-ID: <20171010172516.GA1681@dtor-ws> (raw)
In-Reply-To: <20171010170355.GA136735@google.com>

On Tue, Oct 10, 2017 at 10:03:57AM -0700, Brian Norris wrote:
> + Dmitry, who can probably answer better than I can
> 
> On Tue, Oct 10, 2017 at 01:04:20PM +0200, Emil Renner Berthing wrote:
> > On 10 October 2017 at 11:33, Heiko Stuebner <heiko@sntech.de> wrote:
> > > Am Montag, 9. Oktober 2017, 20:40:28 CEST schrieb Emil Renner Berthing:
> > >> Adding the linux,gpio-keymap entry also has
> > >> the side-effect of making the driver register
> > >> the touchpad as a touchpad rather than another
> > >> touchscreen.
> > >>
> > >> The index for BTN_LEFT was found by trial and error.
> > >>
> > >> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
> > >
> > > looks good to me. I'll just give the ChromeOS people a chance to
> > > respond before applying [maybe they can even tell what the other
> > > keys are :-) ]

They are not connected.

> > 
> > Good plan. As far as I can tell their kernel doesn't send anything but
> > BTN_LEFT either. It's just that the controller supports multiple
> > buttons, but not all are necessarily connected to any button.
> > Their version of the driver has logic to detect the proper keymap
> > whereas the mainline driver gets it from this devicetree entry.
> 
> I believe Emil is mostly correct. We only are using a BTN_LEFT in our
> copy of the driver, and I'm not sure the others are connected to
> anything. As Dmitry has explained to me (when I also wondered about
> "detect[ing] the proper keymap"), we don't exactly "auto"discover
> things; we just heuristically determine the configurations we know are
> used on Chrome devices.

Right, we had a "legacy" GPIO/button mapping on original Pixels that
used T9 multitouch reports, then we switched to a bit different mapping
for newer devices that use T100 multitouch reports.

We should really have explicit map, like we have in upstream driver.

> 
> So from the sound of it, this keymap property is reasonable. I haven't
> actually checked what our driver "auto" detects on gru-kevin, but if
> this works then I'll bet it's correct :)
> 
> IOW, I don't know enough to ACK this patch, but I'm certainly not going
> to NAK it.

I think I can ACK it:

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Thanks.

-- 
Dmitry

  reply	other threads:[~2017-10-10 17:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-09 18:40 [PATCH] arm64: dts: rockchip: enable touchpad button for rk3399-gru-kevin Emil Renner Berthing
2017-10-09 18:40 ` Emil Renner Berthing
2017-10-10  9:33 ` Heiko Stuebner
2017-10-10  9:33   ` Heiko Stuebner
2017-10-10 11:04   ` Emil Renner Berthing
2017-10-10 11:04     ` Emil Renner Berthing
     [not found]     ` <CANBLGcx187QrX3pgUAjvBmPbyJsX7ZiYdWXhamM-atEe+Mqe3A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-10 17:03       ` Brian Norris
2017-10-10 17:03         ` Brian Norris
2017-10-10 17:03         ` Brian Norris
2017-10-10 17:25         ` Dmitry Torokhov [this message]
2017-10-10 17:25           ` Dmitry Torokhov
2017-10-14 19:14 ` Heiko Stuebner
2017-10-14 19:14   ` Heiko Stuebner
2017-10-14 19:14   ` Heiko Stuebner

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=20171010172516.GA1681@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=briannorris@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=heiko@sntech.de \
    --cc=kernel@esmil.dk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.