lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAD6_BotNWGq5A_kz_MWgbMCETQxo-CBuRi-+i54V68qfNdzPJw@mail.gmail.com>
Date:   Mon, 22 Jan 2018 13:50:44 +0100
From:   Marco Martin <notmart@...il.com>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:     Mario.Limonciello@...l.com, pali.rohar@...il.com,
        linux-kernel@...r.kernel.org,
        Matthew Garrett <mjg59@...f.ucam.org>, dvhart@...radead.org,
        andy@...radead.org, Bhushan Shah <bhush94@...il.com>,
        platform-driver-x86@...r.kernel.org
Subject: Re: [PATCH] Support tablet mode switch for Dell laptops

On Mon, Jan 22, 2018 at 12:59 PM, Marco Martin <notmart@...il.com> wrote:
> On Fri, Jan 19, 2018 at 6:29 PM, Dmitry Torokhov
> <dmitry.torokhov@...il.com> wrote:
>>> We discussed a little more on the bug he filed with attached DSDT.  I think that in
>>> sparse keymap he can use KE_VSW for the entries and sparse keymap can handle.
>>
>> No it should be KE_SW I believe, as the "keycode" encodes the state.
>> See example in intel-hid.c.
>>
>> So you probably want:
>>
>>         ...
>>         { KE_SW, 0xCC, { .sw = { SW_TABLET_MODE, 1 } } }, /* Press */
>>         { KE_SW, 0xCD, { .sw = { SW_TABLET_MODE, 0 } } }, /* Release */
>>
>> Thanks.
>
> If I add those lines to intel_vbtn_keymap and remove the two special
> cases for 0xCC and 0xCD, it does work, but only if I explicitly call
> input_sync(priv->input_dev) after sparse_keymap_report_event()
> otherwise i don't get the event (cheching for instance with evtest)
> until a sync gets called (i tried to put the sync only for 0xcd and in
> that case i get both 0xcc and 0xcd when i go out of tablet mode)

with the caveat of an input_sync every event, new patch as a new
thread with Mario's
 and Dmitry's suggestions integrated in, and formatted to conform
checkpatch controls

--
Marco Martin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ