* [PATCH] arm64: dts: rockchip: enable touchpad button for rk3399-gru-kevin
@ 2017-10-09 18:40 Emil Renner Berthing
2017-10-10 9:33 ` Heiko Stuebner
2017-10-14 19:14 ` Heiko Stuebner
0 siblings, 2 replies; 6+ messages in thread
From: Emil Renner Berthing @ 2017-10-09 18:40 UTC (permalink / raw)
To: Rob Herring, Mark Rutland
Cc: Heiko Stuebner, Brian Norris, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel, 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>
---
arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts b/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts
index 5c8621766908..1c58d12551f5 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts
@@ -278,6 +278,10 @@ ap_i2c_dig: &i2c2 {
pinctrl-0 = <&trackpad_int_l>;
interrupt-parent = <&gpio1>;
interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
+ linux,gpio-keymap = <KEY_RESERVED
+ KEY_RESERVED
+ KEY_RESERVED
+ BTN_LEFT>;
wakeup-source;
};
};
--
2.14.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: dts: rockchip: enable touchpad button for rk3399-gru-kevin
2017-10-09 18:40 [PATCH] arm64: dts: rockchip: enable touchpad button for rk3399-gru-kevin Emil Renner Berthing
@ 2017-10-10 9:33 ` Heiko Stuebner
2017-10-10 11:04 ` Emil Renner Berthing
2017-10-14 19:14 ` Heiko Stuebner
1 sibling, 1 reply; 6+ messages in thread
From: Heiko Stuebner @ 2017-10-10 9:33 UTC (permalink / raw)
To: Emil Renner Berthing, Doug Anderson
Cc: Rob Herring, Mark Rutland, Brian Norris, devicetree,
linux-arm-kernel, linux-rockchip, linux-kernel
Hi Emil,
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 :-) ]
Heiko
> ---
> arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts b/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts
> index 5c8621766908..1c58d12551f5 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts
> @@ -278,6 +278,10 @@ ap_i2c_dig: &i2c2 {
> pinctrl-0 = <&trackpad_int_l>;
> interrupt-parent = <&gpio1>;
> interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
> + linux,gpio-keymap = <KEY_RESERVED
> + KEY_RESERVED
> + KEY_RESERVED
> + BTN_LEFT>;
> wakeup-source;
> };
> };
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: dts: rockchip: enable touchpad button for rk3399-gru-kevin
2017-10-10 9:33 ` Heiko Stuebner
@ 2017-10-10 11:04 ` Emil Renner Berthing
[not found] ` <CANBLGcx187QrX3pgUAjvBmPbyJsX7ZiYdWXhamM-atEe+Mqe3A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Emil Renner Berthing @ 2017-10-10 11:04 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Doug Anderson, Rob Herring, Mark Rutland, Brian Norris,
devicetree, linux-arm-kernel, linux-rockchip, linux-kernel
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 :-) ]
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.
/Emil
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: dts: rockchip: enable touchpad button for rk3399-gru-kevin
[not found] ` <CANBLGcx187QrX3pgUAjvBmPbyJsX7ZiYdWXhamM-atEe+Mqe3A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-10-10 17:03 ` Brian Norris
2017-10-10 17:25 ` Dmitry Torokhov
0 siblings, 1 reply; 6+ messages in thread
From: Brian Norris @ 2017-10-10 17:03 UTC (permalink / raw)
To: Emil Renner Berthing
Cc: Heiko Stuebner, Doug Anderson, Rob Herring, Mark Rutland,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Dmitry Torokhov
+ 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-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org> 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-sKpHZLTYfq0@public.gmane.org>
> >
> > 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 :-) ]
>
> 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.
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.
Brian
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: dts: rockchip: enable touchpad button for rk3399-gru-kevin
2017-10-10 17:03 ` Brian Norris
@ 2017-10-10 17:25 ` Dmitry Torokhov
0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Torokhov @ 2017-10-10 17:25 UTC (permalink / raw)
To: Brian Norris
Cc: Emil Renner Berthing, Heiko Stuebner, Doug Anderson, Rob Herring,
Mark Rutland, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: dts: rockchip: enable touchpad button for rk3399-gru-kevin
2017-10-09 18:40 [PATCH] arm64: dts: rockchip: enable touchpad button for rk3399-gru-kevin Emil Renner Berthing
2017-10-10 9:33 ` Heiko Stuebner
@ 2017-10-14 19:14 ` Heiko Stuebner
1 sibling, 0 replies; 6+ messages in thread
From: Heiko Stuebner @ 2017-10-14 19:14 UTC (permalink / raw)
To: Emil Renner Berthing
Cc: Mark Rutland, devicetree, Brian Norris, linux-kernel,
linux-rockchip, Rob Herring, linux-arm-kernel
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>
applied for 4.15 with Dmitry's Ack
Thanks
Heiko
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-10-14 19:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-09 18:40 [PATCH] arm64: dts: rockchip: enable touchpad button for rk3399-gru-kevin Emil Renner Berthing
2017-10-10 9:33 ` Heiko Stuebner
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:25 ` Dmitry Torokhov
2017-10-14 19:14 ` Heiko Stuebner
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).