lkml.org 
[lkml]   [2018]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] Support intel-vbtn based tablet mode switch
On Tue, Jan 23, 2018 at 12:46 AM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
>> @@ -81,6 +86,7 @@ static void notify_handler(acpi_handle handle, u32 event, void *context)
>> return;
>> }
>> } else if (sparse_keymap_report_event(priv->input_dev, event, 1, true)) {
>> + input_sync(priv->input_dev);
>
> I do not understand why this is needed, as sparse keymap should issue
> sync for you. From sparse_keymap_report_entry():

indeed, I was testing on a 4.13 build, the sync there was pushed in
november only for 4.14, i've rebuilt it now on 4.14 and my sync is not
needed anymore

> Can be shorter:
>
> input_report_switch(priv->input_dev, SW_TABLET_MODE,
> obj->integer.value & TABLET_MODE_FLAG);
>
> You also need:
>
> input_sync(priv->input_dev);

in v3 this shorter version and doesn't report the capability if it's
the wrong type

--
Marco Martin

\
 
 \ /
  Last update: 2018-01-23 13:43    [W:0.063 / U:0.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site