From: <Mario.Limonciello@dell.com>
To: <pali.rohar@gmail.com>, <dmitry.torokhov@gmail.com>
Cc: <linux-kernel@vger.kernel.org>, <mjg59@srcf.ucam.org>,
<dvhart@infradead.org>, <andy@infradead.org>, <bhush94@gmail.com>,
<platform-driver-x86@vger.kernel.org>, <notmart@gmail.com>
Subject: RE: [PATCH] Support tablet mode switch for Dell laptops
Date: Fri, 19 Jan 2018 16:09:09 +0000 [thread overview]
Message-ID: <abfbf75104c84a88bfc4b41789f41c66@ausx13mpc120.AMER.DELL.COM> (raw)
In-Reply-To: <20180119160123.onn7w36hmhrxoaq6@pali>
> -----Original Message-----
> From: platform-driver-x86-owner@vger.kernel.org [mailto:platform-driver-x86-
> owner@vger.kernel.org] On Behalf Of Pali Rohár
> Sent: Friday, January 19, 2018 10:01 AM
> To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: linux-kernel@vger.kernel.org; mjg59@srcf.ucam.org; dvhart@infradead.org;
> andy@infradead.org; bhush94@gmail.com; platform-driver-x86@vger.kernel.org;
> Marco Martin <notmart@gmail.com>
> Subject: Re: [PATCH] Support tablet mode switch for Dell laptops
>
> On Thursday 18 January 2018 16:44:08 Pali Rohár wrote:
> > On Thursday 18 January 2018 14:59:50 Marco Martin wrote:
> > > - if (!sparse_keymap_report_event(priv->input_dev, event, 1, true))
> > > + if (event == 0xCC) {
> > > + input_report_switch(priv->input_dev, SW_TABLET_MODE, 1);
> > > + input_sync(priv->input_dev);
> > > + } else if (event == 0xCD) {
> > > + input_report_switch(priv->input_dev, SW_TABLET_MODE, 0);
> > > + input_sync(priv->input_dev);
> > > + } else if (!sparse_keymap_report_event(priv->input_dev, event, 1, true))
> >
> > Is not it possible to put 0xCC and 0xCD into sparse keymap table?
> > Because IIRC sparse keymap was created just to avoid that big
> > if-elseif-elseif-else blocks.
>
> Dmitry, can you comment above part? I think that there should be better
> way how to handle above switches and sparse keymap via one input device.
>
> > > dev_info(&device->dev, "unknown event index 0x%x\n",
> > > event);
> > > }
> >
>
> --
> Pali Rohár
> pali.rohar@gmail.com
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.
Assuming that works I'm expecting him to resubmit soon with that and some other
changes I recommended on the bug.
next prev parent reply other threads:[~2018-01-19 16:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-18 13:59 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 [this message]
2018-01-19 17:29 ` Dmitry Torokhov
2018-01-22 11:59 ` Marco Martin
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=abfbf75104c84a88bfc4b41789f41c66@ausx13mpc120.AMER.DELL.COM \
--to=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=notmart@gmail.com \
--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
all inboxes | Powered by JetHome®