linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marco Martin <notmart@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Mario.Limonciello@dell.com, pali.rohar@gmail.com,
	linux-kernel@vger.kernel.org,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	dvhart@infradead.org, andy@infradead.org,
	Bhushan Shah <bhush94@gmail.com>,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH] Support tablet mode switch for Dell laptops
Date: Mon, 22 Jan 2018 12:59:19 +0100	[thread overview]
Message-ID: <CAD6_BovkNuUZndLar=quX82GW_7-0NPYdvWPeMQt3L-c=uaP=Q@mail.gmail.com> (raw)
In-Reply-To: <20180119172902.wgmvlehbsrjesabd@dtor-ws>

On Fri, Jan 19, 2018 at 6:29 PM, Dmitry Torokhov
<dmitry.torokhov@gmail.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)
--
Marco Martin

  reply	other threads:[~2018-01-22 11:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18 13:59 [PATCH] Support tablet mode switch for Dell laptops Marco Martin
2018-01-18 15:13 ` Andy Shevchenko
2018-01-18 15:23   ` Mario.Limonciello
2018-01-18 15:59     ` Marco Martin
2018-01-18 15:44 ` Pali Rohár
2018-01-19 16:01   ` Pali Rohár
2018-01-19 16:09     ` Mario.Limonciello
2018-01-19 17:29       ` Dmitry Torokhov
2018-01-22 11:59         ` Marco Martin [this message]
2018-01-22 12:50           ` Marco Martin

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='CAD6_BovkNuUZndLar=quX82GW_7-0NPYdvWPeMQt3L-c=uaP=Q@mail.gmail.com' \
    --to=notmart@gmail.com \
    --cc=Mario.Limonciello@dell.com \
    --cc=andy@infradead.org \
    --cc=bhush94@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=pali.rohar@gmail.com \
    --cc=platform-driver-x86@vger.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 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).