1
0
Fork 0
Commit Graph

9 Commits (63c82997f5c0f3e1b914af43d82f712a86bc5f3a)

Author SHA1 Message Date
Hans de Goede f6c7b8031d platform/x86: peaq-wmi: Remove unnecessary checks from peaq_wmi_exit
peaq_wmi_exit will only ever get called if peaq_wmi_init succeeds, so
there is no need to repeat the checks from peaq_wmi_init.

Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-11-03 13:32:09 +02:00
Hans de Goede d6fa71f1c0 platform/x86: peaq_wmi: Fix missing terminating entry for peaq_dmi_table
Add missing terminating entry to peaq_dmi_table.

Fixes: 3b95206110 ("platform/x86: peaq-wmi: Add DMI check before ...")
Cc: stable@vger.kernel.org
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-11-03 13:32:09 +02:00
Hans de Goede 3b95206110 platform/x86: peaq-wmi: Add DMI check before binding to the WMI interface
It seems that the WMI GUID used by the PEAQ 2-in-1 WMI hotkeys is not
as unique as a GUID should be and is used on some other devices too.

This is causing spurious key-press reports on these other devices.

This commits adds a DMI check to the PEAQ 2-in-1 WMI hotkeys driver to
ensure that it is actually running on a PEAQ 2-in-1, fixing the
spurious key-presses on these other devices.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1497861
BugLink: https://bugzilla.suse.com/attachment.cgi?id=743182
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-08 21:07:12 +03:00
Andy Shevchenko dfea7e1827 platform/x86: peaq-wmi: Revert Blacklist Lenovo ideapad 700-15ISK
In favour of new approach this reverts commit
ff74972e96.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-08 21:06:43 +03:00
Kai Heng Feng ff74972e96 platform/x86: peaq-wmi: Blacklist Lenovo ideapad 700-15ISK
peaq-wmi on Lenovo ideapad 700-15ISK keeps sending KEY_SOUND,
which makes user's repeated keys gets interrupted.

The system does not have Dolby button, let's blacklist it.

BugLink: https://bugs.launchpad.net/bugs/1720219
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-04 15:28:06 +03:00
Pali Rohár 2cf7bdec2d platform/x86: peaq-wmi: Evaluate wmi method with instance number 0x0
According to Hans de Goede, WMI interface of thh peaq-wmi module has 10
instances but corresponding ACPI WMBC method does not check Arg0 (instance
number) at all. Therefore evaluate WMI method with first instance number
(0x0) instead of second (0x1).

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-08-13 15:55:06 +03:00
Dan Carpenter 890f658c10 platform/x86: peaq-wmi: silence a static checker warning
There is a harmless static checker warning here that unsigned values are
always >= 0.  The code looks like:

	if (peaq_ignore_events_counter && --peaq_ignore_events_counter >= 0)

The first part of the condition ensures that we never wrap around so the
code works as intended.  I've tweaked it slightly to avoid the warning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-07-25 09:56:37 -07:00
Hans de Goede c1bda752fd platform/x86: peaq-wmi: Fix peaq_ignore_events_counter handling off by 1
If peaq_ignore_events_counter gets set to 1 we should skip polling 1
time, rather then ignoring it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-07-11 09:08:04 -07:00
Hans de Goede 13bb0fd551 platform/x86: peaq-wmi: Add new peaq-wmi driver
PEAQ is a new European OEM, I've bought one of their 2-in-1 x86 devices,
which is actually quite a nice device. Under Windows it has Dolby
software for "better" sound and you can select different equalizer
presets using a special button.

This WMI interface for this button is not really nice, as it does not do
notifies (it really does not I triple checked), but since I had already
figured out the entire WMI interface for this I decided to go the full
mile anyway and implement a WMI based input driver for this using
input_polldev since, well, we need to poll.

This commit adds support for this button making it report KEY_SOUND
input events. KEY_SOUND is already used in various places to switch
sound into theatre mode and things like that so it seems appropriate
here.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
[dvhart: minor declaration ordering and commit log typo fixes]
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-05-15 12:12:14 +03:00