Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1335480 > unrolled thread

[PATCH v3 5/5] dell-wmi: support Dell Inspiron M5110

Started byMichał Kępień <kernel@kempniu.pl>
First post2016-02-16 16:00 +0100
Last post2016-02-18 09:30 +0100
Articles 7 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v3 5/5] dell-wmi: support Dell Inspiron M5110 Michał Kępień <kernel@kempniu.pl> - 2016-02-16 16:00 +0100
    Re: [PATCH v3 5/5] dell-wmi: support Dell Inspiron M5110 Pali Rohár <pali.rohar@gmail.com> - 2016-02-16 16:30 +0100
      Re: [PATCH v3 5/5] dell-wmi: support Dell Inspiron M5110 Michał Kępień <kernel@kempniu.pl> - 2016-02-16 23:10 +0100
        Re: [PATCH v3 5/5] dell-wmi: support Dell Inspiron M5110 Pali Rohár <pali.rohar@gmail.com> - 2016-02-17 12:50 +0100
          Re: [PATCH v3 5/5] dell-wmi: support Dell Inspiron M5110 Michał Kępień <kernel@kempniu.pl> - 2016-02-17 13:10 +0100
            Re: [PATCH v3 5/5] dell-wmi: support Dell Inspiron M5110 Pali Rohár <pali.rohar@gmail.com> - 2016-02-17 13:10 +0100
              Re: [PATCH v3 5/5] dell-wmi: support Dell Inspiron M5110 Michał Kępień <kernel@kempniu.pl> - 2016-02-18 09:30 +0100

#1335480 — [PATCH v3 5/5] dell-wmi: support Dell Inspiron M5110

FromMichał Kępień <kernel@kempniu.pl>
Date2016-02-16 16:00 +0100
Subject[PATCH v3 5/5] dell-wmi: support Dell Inspiron M5110
Message-ID<r2PgC-KD-9@gated-at.bofh.it>
Similarly to Dell Vostro V131, Dell Inspiron M5110 also requires an
SMBIOS request to be issued in order for WMI events to be generated and
does not raise an i8042 interrupt when the Dell Instant Launch hotkey is
pressed.  However, the event code for that hotkey on this machine is
0xe029, so add it to the legacy keymap.

Signed-off-by: Michał Kępień <kernel@kempniu.pl>
Tested-by: Darek Stojaczyk <darek.stojaczyk@gmail.com>
---
 drivers/platform/x86/dell-wmi.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c
index ad7504d..650ca45 100644
--- a/drivers/platform/x86/dell-wmi.c
+++ b/drivers/platform/x86/dell-wmi.c
@@ -62,6 +62,14 @@ static int __init dmi_matched(const struct dmi_system_id *dmi)
 static const struct dmi_system_id dell_wmi_smbios_list[] __initconst = {
 	{
 		.callback = dmi_matched,
+		.ident = "Dell Inspiron M5110",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron M5110"),
+		},
+	},
+	{
+		.callback = dmi_matched,
 		.ident = "Dell Vostro V131",
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
@@ -113,6 +121,7 @@ static const struct key_entry dell_wmi_legacy_keymap[] __initconst = {
 	/* Shortcut and audio panel keys */
 	{ KE_KEY, 0xe025, { KEY_PROG4 } },
 	{ KE_IGNORE, 0xe026, { KEY_RESERVED } },
+	{ KE_KEY, 0xe029, { KEY_PROG4 } },
 
 	{ KE_IGNORE, 0xe02e, { KEY_VOLUMEDOWN } },
 	{ KE_IGNORE, 0xe030, { KEY_VOLUMEUP } },
-- 
1.7.10.4

[toc] | [next] | [standalone]


#1335521

FromPali Rohár <pali.rohar@gmail.com>
Date2016-02-16 16:30 +0100
Message-ID<r2PJE-1c4-9@gated-at.bofh.it>
In reply to#1335480
On Tuesday 16 February 2016 15:50:30 Michał Kępień wrote:
>  	/* Shortcut and audio panel keys */
>  	{ KE_KEY, 0xe025, { KEY_PROG4 } },
>  	{ KE_IGNORE, 0xe026, { KEY_RESERVED } },
> +	{ KE_KEY, 0xe029, { KEY_PROG4 } },

Hi! Above comment (Shortcut and audio panel keys) is not relevant for
this 0xe029, right? Then please break this new key from above two and
adds useful comment what is that key.

-- 
Pali Rohár
pali.rohar@gmail.com

[toc] | [prev] | [next] | [standalone]


#1335885

FromMichał Kępień <kernel@kempniu.pl>
Date2016-02-16 23:10 +0100
Message-ID<r2VYJ-5w0-13@gated-at.bofh.it>
In reply to#1335521
> >  	/* Shortcut and audio panel keys */
> >  	{ KE_KEY, 0xe025, { KEY_PROG4 } },
> >  	{ KE_IGNORE, 0xe026, { KEY_RESERVED } },
> > +	{ KE_KEY, 0xe029, { KEY_PROG4 } },
> 
> Hi! Above comment (Shortcut and audio panel keys) is not relevant for
> this 0xe029, right?

I believe it is relevant.  The commit which added that comment
(f1566f0d) was made by Seth Forshee to support Dell XPS L502X.  The term
"shortcut key" is used in the bug report linked from that commit [1],
but the manual for that model [2] describes the hotkey in question as
"Instant launch control" (page 43), so I believe both Seth's commit and
my patch refer to the same thing.

[1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/815914/comments/6
[2] http://downloads.dell.com/Manuals/all-products/esuprt_laptop/esuprt_xps_laptop/xps-l502x_setup%20guide_en-us.pdf

-- 
Best regards,
Michał Kępień

[toc] | [prev] | [next] | [standalone]


#1336292

FromPali Rohár <pali.rohar@gmail.com>
Date2016-02-17 12:50 +0100
Message-ID<r38Mi-5Nt-33@gated-at.bofh.it>
In reply to#1335885
On Tuesday 16 February 2016 23:03:12 Michał Kępień wrote:
> > >  	/* Shortcut and audio panel keys */
> > >  	{ KE_KEY, 0xe025, { KEY_PROG4 } },
> > >  	{ KE_IGNORE, 0xe026, { KEY_RESERVED } },
> > > +	{ KE_KEY, 0xe029, { KEY_PROG4 } },
> > 
> > Hi! Above comment (Shortcut and audio panel keys) is not relevant for
> > this 0xe029, right?
> 
> I believe it is relevant.  The commit which added that comment
> (f1566f0d) was made by Seth Forshee to support Dell XPS L502X.  The term
> "shortcut key" is used in the bug report linked from that commit [1],
> but the manual for that model [2] describes the hotkey in question as
> "Instant launch control" (page 43), so I believe both Seth's commit and
> my patch refer to the same thing.
> 
> [1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/815914/comments/6
> [2] http://downloads.dell.com/Manuals/all-products/esuprt_laptop/esuprt_xps_laptop/xps-l502x_setup%20guide_en-us.pdf

Then please split above group of keys and add comment which key is
shortcut and which audio panel. Because now there will be three keys and
comment just for two -- in future will not know which code 0x... is
mapped to which key.

-- 
Pali Rohár
pali.rohar@gmail.com

[toc] | [prev] | [next] | [standalone]


#1336313

FromMichał Kępień <kernel@kempniu.pl>
Date2016-02-17 13:10 +0100
Message-ID<r395F-6eW-43@gated-at.bofh.it>
In reply to#1336292
> > > >  	/* Shortcut and audio panel keys */
> > > >  	{ KE_KEY, 0xe025, { KEY_PROG4 } },
> > > >  	{ KE_IGNORE, 0xe026, { KEY_RESERVED } },
> > > > +	{ KE_KEY, 0xe029, { KEY_PROG4 } },
> > > 
> > > Hi! Above comment (Shortcut and audio panel keys) is not relevant for
> > > this 0xe029, right?
> > 
> > I believe it is relevant.  The commit which added that comment
> > (f1566f0d) was made by Seth Forshee to support Dell XPS L502X.  The term
> > "shortcut key" is used in the bug report linked from that commit [1],
> > but the manual for that model [2] describes the hotkey in question as
> > "Instant launch control" (page 43), so I believe both Seth's commit and
> > my patch refer to the same thing.
> > 
> > [1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/815914/comments/6
> > [2] http://downloads.dell.com/Manuals/all-products/esuprt_laptop/esuprt_xps_laptop/xps-l502x_setup%20guide_en-us.pdf
> 
> Then please split above group of keys and add comment which key is
> shortcut and which audio panel. Because now there will be three keys and
> comment just for two -- in future will not know which code 0x... is
> mapped to which key.

Please note that except for the first 5 entries, the keymap is sorted by
event code in ascending order.  If I understand correctly, doing what
you ask would break that ordering:

    /* Dell Instant Launch key */
    { KE_KEY, 0xe025, { KEY_PROG4 } },
    { KE_KEY, 0xe029, { KEY_PROG4 } },

    /* Audio panel key */
    { KE_IGNORE, 0xe026, { KEY_RESERVED } },

Is this acceptable?  Or perhaps you had something else on your mind?

-- 
Best regards,
Michał Kępień

[toc] | [prev] | [next] | [standalone]


#1336315

FromPali Rohár <pali.rohar@gmail.com>
Date2016-02-17 13:10 +0100
Message-ID<r395F-6eW-47@gated-at.bofh.it>
In reply to#1336313
On Wednesday 17 February 2016 13:01:58 Michał Kępień wrote:
> > > > >  	/* Shortcut and audio panel keys */
> > > > >  	{ KE_KEY, 0xe025, { KEY_PROG4 } },
> > > > >  	{ KE_IGNORE, 0xe026, { KEY_RESERVED } },
> > > > > +	{ KE_KEY, 0xe029, { KEY_PROG4 } },
> > > > 
> > > > Hi! Above comment (Shortcut and audio panel keys) is not relevant for
> > > > this 0xe029, right?
> > > 
> > > I believe it is relevant.  The commit which added that comment
> > > (f1566f0d) was made by Seth Forshee to support Dell XPS L502X.  The term
> > > "shortcut key" is used in the bug report linked from that commit [1],
> > > but the manual for that model [2] describes the hotkey in question as
> > > "Instant launch control" (page 43), so I believe both Seth's commit and
> > > my patch refer to the same thing.
> > > 
> > > [1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/815914/comments/6
> > > [2] http://downloads.dell.com/Manuals/all-products/esuprt_laptop/esuprt_xps_laptop/xps-l502x_setup%20guide_en-us.pdf
> > 
> > Then please split above group of keys and add comment which key is
> > shortcut and which audio panel. Because now there will be three keys and
> > comment just for two -- in future will not know which code 0x... is
> > mapped to which key.
> 
> Please note that except for the first 5 entries, the keymap is sorted by
> event code in ascending order.

I have prepared some patches which sort all event codes plus adds
missing comments... So after all dell patches are in Darren tree, I will
rewrite/rebase my and can send them.

> If I understand correctly, doing what you ask would break that ordering:
> 
>     /* Dell Instant Launch key */
>     { KE_KEY, 0xe025, { KEY_PROG4 } },
>     { KE_KEY, 0xe029, { KEY_PROG4 } },
> 
>     /* Audio panel key */
>     { KE_IGNORE, 0xe026, { KEY_RESERVED } },
> 
> Is this acceptable?  Or perhaps you had something else on your mind?

Thats better, now we know which event is audio and which launch key.

-- 
Pali Rohár
pali.rohar@gmail.com

[toc] | [prev] | [next] | [standalone]


#1337142

FromMichał Kępień <kernel@kempniu.pl>
Date2016-02-18 09:30 +0100
Message-ID<r3s8k-2Pa-29@gated-at.bofh.it>
In reply to#1336315
> > Please note that except for the first 5 entries, the keymap is sorted by
> > event code in ascending order.
> 
> I have prepared some patches which sort all event codes plus adds
> missing comments... So after all dell patches are in Darren tree, I will
> rewrite/rebase my and can send them.
> 
> > If I understand correctly, doing what you ask would break that ordering:
> > 
> >     /* Dell Instant Launch key */
> >     { KE_KEY, 0xe025, { KEY_PROG4 } },
> >     { KE_KEY, 0xe029, { KEY_PROG4 } },
> > 
> >     /* Audio panel key */
> >     { KE_IGNORE, 0xe026, { KEY_RESERVED } },
> > 
> > Is this acceptable?  Or perhaps you had something else on your mind?
> 
> Thats better, now we know which event is audio and which launch key.

Ok, then I will do that in v4.

-- 
Best regards,
Michał Kępień

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web