linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] toshiba_acpi: Add Satellite L845 to alternative keymap.
@ 2015-03-04 21:52 Joseph Salisbury
  2015-03-04 21:52 ` [PATCH 2/2] toshiba_acpi: Add Satellite P50W-B to alternative keymap and create new mappings Joseph Salisbury
  0 siblings, 1 reply; 7+ messages in thread
From: Joseph Salisbury @ 2015-03-04 21:52 UTC (permalink / raw)
  To: linux-kernel; +Cc: dvhart, platform-driver-x86, stable

BugLink: http://bugs.launchpad.net/bugs/1428302

The Toshiba Satellite L845 is required in the alternate keymap for all
keys to properly function.  Specifically the KEY_WLAN mapped as 0x158.
Without being in the alternate keymap, the L845 will report 'Unknown key 158'.

Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Reported-and-tested-by: zcappa@gmail.com
Cc: stable@vger.kernel.org
---
 drivers/platform/x86/toshiba_acpi.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index dbcb7a8..333aaca 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -263,6 +263,12 @@ static const struct dmi_system_id toshiba_alt_keymap_dmi[] = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "TECRA A50-A"),
 		},
 	},
+	{
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Satellite-L845"),
+		},
+	},
 	{}
 };
 
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] toshiba_acpi: Add Satellite P50W-B to alternative keymap and create new mappings.
  2015-03-04 21:52 [PATCH 1/2] toshiba_acpi: Add Satellite L845 to alternative keymap Joseph Salisbury
@ 2015-03-04 21:52 ` Joseph Salisbury
  2015-03-05  0:05   ` Azael Avalos
  0 siblings, 1 reply; 7+ messages in thread
From: Joseph Salisbury @ 2015-03-04 21:52 UTC (permalink / raw)
  To: linux-kernel; +Cc: dvhart, platform-driver-x86, stable

BugLink: http://bugs.launchpad.net/bugs/1416277

The Toshiba Satellite P50W-B is required in the alternate keymap for all
keys to properly function.  There are also some new key ids that need to
be added(PREVIOUSSONG, NEXTSONG and PLAYPAUSE).  Also, the alt keymap has changed the key ids for
mute, brightness up/down.  Adding those key ids to the alternate keymap as well(MUTE, BRIGHTNESSDOWN
and BRIGHTNESSUP).

Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Reported-and-tested-by: robert.ancell@canonical.com
Cc: stable@vger.kernel.org
---
 drivers/platform/x86/toshiba_acpi.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index 333aaca..fe0d2b2 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -269,11 +269,18 @@ static const struct dmi_system_id toshiba_alt_keymap_dmi[] = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "Satellite-L845"),
 		},
 	},
+	{
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Satellite P50W-B"),
+		},
+	},
 	{}
 };
 
 static const struct key_entry toshiba_acpi_alt_keymap[] = {
-	{ KE_KEY, 0x157, { KEY_MUTE } },
+	{ KE_KEY, 0x9e, { KEY_RFKILL } },
+	{ KE_KEY, 0x101, { KEY_MUTE } },
 	{ KE_KEY, 0x102, { KEY_ZOOMOUT } },
 	{ KE_KEY, 0x103, { KEY_ZOOMIN } },
 	{ KE_KEY, 0x12c, { KEY_KBDILLUMTOGGLE } },
@@ -281,8 +288,14 @@ static const struct key_entry toshiba_acpi_alt_keymap[] = {
 	{ KE_KEY, 0x13e, { KEY_SWITCHVIDEOMODE } },
 	{ KE_KEY, 0x13c, { KEY_BRIGHTNESSDOWN } },
 	{ KE_KEY, 0x13d, { KEY_BRIGHTNESSUP } },
+	{ KE_KEY, 0x140, { KEY_BRIGHTNESSDOWN } },
+	{ KE_KEY, 0x141, { KEY_BRIGHTNESSUP } },
+	{ KE_KEY, 0x157, { KEY_MUTE } },
 	{ KE_KEY, 0x158, { KEY_WLAN } },
 	{ KE_KEY, 0x13f, { KEY_TOUCHPAD_TOGGLE } },
+	{ KE_KEY, 0xb31, { KEY_PREVIOUSSONG } },
+	{ KE_KEY, 0xb32, { KEY_NEXTSONG } },
+	{ KE_KEY, 0xb33, { KEY_PLAYPAUSE } },
 	{ KE_END, 0 },
 };
 
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] toshiba_acpi: Add Satellite P50W-B to alternative keymap and create new mappings.
  2015-03-04 21:52 ` [PATCH 2/2] toshiba_acpi: Add Satellite P50W-B to alternative keymap and create new mappings Joseph Salisbury
@ 2015-03-05  0:05   ` Azael Avalos
  2015-03-05 12:57     ` Joseph Salisbury
  2015-03-05 20:59     ` Joseph Salisbury
  0 siblings, 2 replies; 7+ messages in thread
From: Azael Avalos @ 2015-03-05  0:05 UTC (permalink / raw)
  To: Joseph Salisbury; +Cc: linux-kernel, Darren Hart, platform-driver-x86, stable

Hi there,

2015-03-04 14:52 GMT-07:00 Joseph Salisbury <joseph.salisbury@canonical.com>:
...
> +       { KE_KEY, 0x140, { KEY_BRIGHTNESSDOWN } },
> +       { KE_KEY, 0x141, { KEY_BRIGHTNESSUP } },
...

These two are not neccesary, as they may collide with "previous song"
and "playpause" in case Toshiba (or its manufacturers) decide to use
those keys.

If you can, please test the first two patches from the gmane archive [1],
they eliminate the need of the DMI matching list. And it would be great
to have more laptops tested.

[1] http://comments.gmane.org/gmane.linux.drivers.platform.x86.devel/6602


Cheers
Azael


-- 
-- El mundo apesta y vosotros apestais tambien --

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] toshiba_acpi: Add Satellite P50W-B to alternative keymap and create new mappings.
  2015-03-05  0:05   ` Azael Avalos
@ 2015-03-05 12:57     ` Joseph Salisbury
  2015-03-05 20:59     ` Joseph Salisbury
  1 sibling, 0 replies; 7+ messages in thread
From: Joseph Salisbury @ 2015-03-05 12:57 UTC (permalink / raw)
  To: Azael Avalos; +Cc: linux-kernel, Darren Hart, platform-driver-x86, stable

On 03/04/2015 07:05 PM, Azael Avalos wrote:
> Hi there,
>
> 2015-03-04 14:52 GMT-07:00 Joseph Salisbury <joseph.salisbury@canonical.com>:
> ...
>> +       { KE_KEY, 0x140, { KEY_BRIGHTNESSDOWN } },
>> +       { KE_KEY, 0x141, { KEY_BRIGHTNESSUP } },
> ...
>
> These two are not neccesary, as they may collide with "previous song"
> and "playpause" in case Toshiba (or its manufacturers) decide to use
> those keys.
>
> If you can, please test the first two patches from the gmane archive [1],
> they eliminate the need of the DMI matching list. And it would be great
> to have more laptops tested.
>
> [1] http://comments.gmane.org/gmane.linux.drivers.platform.x86.devel/6602
>
>
> Cheers
> Azael
>
>
Thanks for the feedback, Azael.  I'll spin up a kernel with the first
two patches in that archive, and have them testing.  I'll reply with the
results.

Thanks again,

Joe

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] toshiba_acpi: Add Satellite P50W-B to alternative keymap and create new mappings.
  2015-03-05  0:05   ` Azael Avalos
  2015-03-05 12:57     ` Joseph Salisbury
@ 2015-03-05 20:59     ` Joseph Salisbury
  2015-03-05 21:04       ` Azael Avalos
  1 sibling, 1 reply; 7+ messages in thread
From: Joseph Salisbury @ 2015-03-05 20:59 UTC (permalink / raw)
  To: Azael Avalos; +Cc: linux-kernel, Darren Hart, platform-driver-x86, stable

On 03/04/2015 07:05 PM, Azael Avalos wrote:
> Hi there,
>
> 2015-03-04 14:52 GMT-07:00 Joseph Salisbury <joseph.salisbury@canonical.com>:
> ...
>> +       { KE_KEY, 0x140, { KEY_BRIGHTNESSDOWN } },
>> +       { KE_KEY, 0x141, { KEY_BRIGHTNESSUP } },
> ...
>
> These two are not neccesary, as they may collide with "previous song"
> and "playpause" in case Toshiba (or its manufacturers) decide to use
> those keys.
>
> If you can, please test the first two patches from the gmane archive [1],
> they eliminate the need of the DMI matching list. And it would be great
> to have more laptops tested.
>
> [1] http://comments.gmane.org/gmane.linux.drivers.platform.x86.devel/6602
>
>
> Cheers
> Azael
>
>
Hi Azael,

There is some positive feedback with the first two patches:
toshiba_acpi: Add Hotkey Event Type function and definitions
toshiba_acpi: Use the Hotkey Event Type function for keymap choosing

$ uname -r
4.0.0-040000rc2-generic
$ acpi_listen
video/brightnessdown BRTDN 00000087 00000000
video/brightnessup BRTUP 00000086 00000000
video/switchmode VMOD 00000080 00000000 K
cd/prev CDPREV 00000080 00000000 K
cd/play CDPLAY 00000080 00000000 K
cd/next CDNEXT 00000080 00000000 K
button/volumedown VOLDN 00000080 00000000 K
button/volumeup VOLUP 00000080 00000000 K
button/mute MUTE 00000080 00000000 K
button/mute MUTE 00000080 00000000 K
button/wlan WLAN 00000080 00000000 K
button/volumedown VOLDN 00000080 00000000 K
button/volumeup VOLUP 00000080 00000000 K



Can you also cc this patch to stable when submitting it to mainline?

All the keys are working and the patch is allot cleaner!

Thanks again,

Joe


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] toshiba_acpi: Add Satellite P50W-B to alternative keymap and create new mappings.
  2015-03-05 20:59     ` Joseph Salisbury
@ 2015-03-05 21:04       ` Azael Avalos
  2015-03-05 21:06         ` Joseph Salisbury
  0 siblings, 1 reply; 7+ messages in thread
From: Azael Avalos @ 2015-03-05 21:04 UTC (permalink / raw)
  To: Joseph Salisbury; +Cc: linux-kernel, Darren Hart, platform-driver-x86, stable

Hi Joe,

2015-03-05 13:59 GMT-07:00 Joseph Salisbury <joseph.salisbury@canonical.com>:
> On 03/04/2015 07:05 PM, Azael Avalos wrote:
>> Hi there,
>>
>> 2015-03-04 14:52 GMT-07:00 Joseph Salisbury <joseph.salisbury@canonical.com>:
>> ...
>>> +       { KE_KEY, 0x140, { KEY_BRIGHTNESSDOWN } },
>>> +       { KE_KEY, 0x141, { KEY_BRIGHTNESSUP } },
>> ...
>>
>> These two are not neccesary, as they may collide with "previous song"
>> and "playpause" in case Toshiba (or its manufacturers) decide to use
>> those keys.
>>
>> If you can, please test the first two patches from the gmane archive [1],
>> they eliminate the need of the DMI matching list. And it would be great
>> to have more laptops tested.
>>
>> [1] http://comments.gmane.org/gmane.linux.drivers.platform.x86.devel/6602
>>
>>
>> Cheers
>> Azael
>>
>>
> Hi Azael,
>
> There is some positive feedback with the first two patches:
> toshiba_acpi: Add Hotkey Event Type function and definitions
> toshiba_acpi: Use the Hotkey Event Type function for keymap choosing
>
> $ uname -r
> 4.0.0-040000rc2-generic
> $ acpi_listen
> video/brightnessdown BRTDN 00000087 00000000
> video/brightnessup BRTUP 00000086 00000000
> video/switchmode VMOD 00000080 00000000 K
> cd/prev CDPREV 00000080 00000000 K
> cd/play CDPLAY 00000080 00000000 K
> cd/next CDNEXT 00000080 00000000 K
> button/volumedown VOLDN 00000080 00000000 K
> button/volumeup VOLUP 00000080 00000000 K
> button/mute MUTE 00000080 00000000 K
> button/mute MUTE 00000080 00000000 K
> button/wlan WLAN 00000080 00000000 K
> button/volumedown VOLDN 00000080 00000000 K
> button/volumeup VOLUP 00000080 00000000 K
>
>
>
> Can you also cc this patch to stable when submitting it to mainline?

Right now I'm conducting some tests with the help
of Tom Mannerhagen as he has access to more
laptops, so I will probably need to send an updated
revision of the series.

But will do once we have those tests results and patches ready.

>
> All the keys are working and the patch is allot cleaner!
>
> Thanks again,

Ohh, and thanks to you too for testing.

>
> Joe
>

Cheers
Azael


-- 
-- El mundo apesta y vosotros apestais tambien --

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] toshiba_acpi: Add Satellite P50W-B to alternative keymap and create new mappings.
  2015-03-05 21:04       ` Azael Avalos
@ 2015-03-05 21:06         ` Joseph Salisbury
  0 siblings, 0 replies; 7+ messages in thread
From: Joseph Salisbury @ 2015-03-05 21:06 UTC (permalink / raw)
  To: Azael Avalos; +Cc: linux-kernel, Darren Hart, platform-driver-x86, stable

On 03/05/2015 04:04 PM, Azael Avalos wrote:
> Hi Joe,
>
> 2015-03-05 13:59 GMT-07:00 Joseph Salisbury <joseph.salisbury@canonical.com>:
>> On 03/04/2015 07:05 PM, Azael Avalos wrote:
>>> Hi there,
>>>
>>> 2015-03-04 14:52 GMT-07:00 Joseph Salisbury <joseph.salisbury@canonical.com>:
>>> ...
>>>> +       { KE_KEY, 0x140, { KEY_BRIGHTNESSDOWN } },
>>>> +       { KE_KEY, 0x141, { KEY_BRIGHTNESSUP } },
>>> ...
>>>
>>> These two are not neccesary, as they may collide with "previous song"
>>> and "playpause" in case Toshiba (or its manufacturers) decide to use
>>> those keys.
>>>
>>> If you can, please test the first two patches from the gmane archive [1],
>>> they eliminate the need of the DMI matching list. And it would be great
>>> to have more laptops tested.
>>>
>>> [1] http://comments.gmane.org/gmane.linux.drivers.platform.x86.devel/6602
>>>
>>>
>>> Cheers
>>> Azael
>>>
>>>
>> Hi Azael,
>>
>> There is some positive feedback with the first two patches:
>> toshiba_acpi: Add Hotkey Event Type function and definitions
>> toshiba_acpi: Use the Hotkey Event Type function for keymap choosing
>>
>> $ uname -r
>> 4.0.0-040000rc2-generic
>> $ acpi_listen
>> video/brightnessdown BRTDN 00000087 00000000
>> video/brightnessup BRTUP 00000086 00000000
>> video/switchmode VMOD 00000080 00000000 K
>> cd/prev CDPREV 00000080 00000000 K
>> cd/play CDPLAY 00000080 00000000 K
>> cd/next CDNEXT 00000080 00000000 K
>> button/volumedown VOLDN 00000080 00000000 K
>> button/volumeup VOLUP 00000080 00000000 K
>> button/mute MUTE 00000080 00000000 K
>> button/mute MUTE 00000080 00000000 K
>> button/wlan WLAN 00000080 00000000 K
>> button/volumedown VOLDN 00000080 00000000 K
>> button/volumeup VOLUP 00000080 00000000 K
>>
>>
>>
>> Can you also cc this patch to stable when submitting it to mainline?
> Right now I'm conducting some tests with the help
> of Tom Mannerhagen as he has access to more
> laptops, so I will probably need to send an updated
> revision of the series.

Thanks for the great work, Azael.  More than glad to assist with the
testing.

>
> But will do once we have those tests results and patches ready.
>
>> All the keys are working and the patch is allot cleaner!
>>
>> Thanks again,
> Ohh, and thanks to you too for testing.
>
>> Joe
>>
> Cheers
> Azael
>
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-03-05 21:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-04 21:52 [PATCH 1/2] toshiba_acpi: Add Satellite L845 to alternative keymap Joseph Salisbury
2015-03-04 21:52 ` [PATCH 2/2] toshiba_acpi: Add Satellite P50W-B to alternative keymap and create new mappings Joseph Salisbury
2015-03-05  0:05   ` Azael Avalos
2015-03-05 12:57     ` Joseph Salisbury
2015-03-05 20:59     ` Joseph Salisbury
2015-03-05 21:04       ` Azael Avalos
2015-03-05 21:06         ` Joseph Salisbury

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).