Re: [PATCH] platform/x86: peaq-wmi: Blacklist Lenovo ideapad 700-15ISK
On Mon, Oct 2, 2017 at 6:56 AM, Kai-Heng Fengwrote: > 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. Pushed to my review queue, thanks! P.S. It's not going to stable per se since it wasn't working from the beginning correctly AFAIU. If it's not true, update a patch with correct Fixes tag (apparently not against peaq-wmi.c itself). > > BugLink: https://bugs.launchpad.net/bugs/1720219 > Signed-off-by: Kai-Heng Feng > --- > drivers/platform/x86/peaq-wmi.c | 19 +-- > 1 file changed, 17 insertions(+), 2 deletions(-) > > diff --git a/drivers/platform/x86/peaq-wmi.c b/drivers/platform/x86/peaq-wmi.c > index bc98ef95514a..5673d5daebc3 100644 > --- a/drivers/platform/x86/peaq-wmi.c > +++ b/drivers/platform/x86/peaq-wmi.c > @@ -11,6 +11,7 @@ > #include > #include > #include > +#include > > #define PEAQ_DOLBY_BUTTON_GUID "ABBC0F6F-8EA1-11D1-00A0-C9062910" > #define PEAQ_DOLBY_BUTTON_METHOD_ID5 > @@ -64,9 +65,22 @@ static void peaq_wmi_poll(struct input_polled_dev *dev) > } > } > > +static const struct dmi_system_id peaq_blacklist[] __initconst = { > + { > + /* Lenovo ideapad 700-15ISK does not have Dolby button */ > + .ident = "Lenovo ideapad 700-15ISK", > + .matches = { > + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), > + DMI_MATCH(DMI_PRODUCT_NAME, "80RU"), > + }, > + }, > + {} > +}; > + > static int __init peaq_wmi_init(void) > { > - if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID)) > + if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID) || > + dmi_check_system(peaq_blacklist)) > return -ENODEV; > > peaq_poll_dev = input_allocate_polled_device(); > @@ -86,7 +100,8 @@ static int __init peaq_wmi_init(void) > > static void __exit peaq_wmi_exit(void) > { > - if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID)) > + if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID) || > + dmi_check_system(peaq_blacklist)) > return; > > input_unregister_polled_device(peaq_poll_dev); > -- > 2.14.1 > -- With Best Regards, Andy Shevchenko
Re: [PATCH] platform/x86: peaq-wmi: Blacklist Lenovo ideapad 700-15ISK
On Mon, Oct 2, 2017 at 6:56 AM, Kai-Heng Feng wrote: > 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. Pushed to my review queue, thanks! P.S. It's not going to stable per se since it wasn't working from the beginning correctly AFAIU. If it's not true, update a patch with correct Fixes tag (apparently not against peaq-wmi.c itself). > > BugLink: https://bugs.launchpad.net/bugs/1720219 > Signed-off-by: Kai-Heng Feng > --- > drivers/platform/x86/peaq-wmi.c | 19 +-- > 1 file changed, 17 insertions(+), 2 deletions(-) > > diff --git a/drivers/platform/x86/peaq-wmi.c b/drivers/platform/x86/peaq-wmi.c > index bc98ef95514a..5673d5daebc3 100644 > --- a/drivers/platform/x86/peaq-wmi.c > +++ b/drivers/platform/x86/peaq-wmi.c > @@ -11,6 +11,7 @@ > #include > #include > #include > +#include > > #define PEAQ_DOLBY_BUTTON_GUID "ABBC0F6F-8EA1-11D1-00A0-C9062910" > #define PEAQ_DOLBY_BUTTON_METHOD_ID5 > @@ -64,9 +65,22 @@ static void peaq_wmi_poll(struct input_polled_dev *dev) > } > } > > +static const struct dmi_system_id peaq_blacklist[] __initconst = { > + { > + /* Lenovo ideapad 700-15ISK does not have Dolby button */ > + .ident = "Lenovo ideapad 700-15ISK", > + .matches = { > + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), > + DMI_MATCH(DMI_PRODUCT_NAME, "80RU"), > + }, > + }, > + {} > +}; > + > static int __init peaq_wmi_init(void) > { > - if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID)) > + if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID) || > + dmi_check_system(peaq_blacklist)) > return -ENODEV; > > peaq_poll_dev = input_allocate_polled_device(); > @@ -86,7 +100,8 @@ static int __init peaq_wmi_init(void) > > static void __exit peaq_wmi_exit(void) > { > - if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID)) > + if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID) || > + dmi_check_system(peaq_blacklist)) > return; > > input_unregister_polled_device(peaq_poll_dev); > -- > 2.14.1 > -- With Best Regards, Andy Shevchenko
[PATCH] 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--- drivers/platform/x86/peaq-wmi.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/peaq-wmi.c b/drivers/platform/x86/peaq-wmi.c index bc98ef95514a..5673d5daebc3 100644 --- a/drivers/platform/x86/peaq-wmi.c +++ b/drivers/platform/x86/peaq-wmi.c @@ -11,6 +11,7 @@ #include #include #include +#include #define PEAQ_DOLBY_BUTTON_GUID "ABBC0F6F-8EA1-11D1-00A0-C9062910" #define PEAQ_DOLBY_BUTTON_METHOD_ID5 @@ -64,9 +65,22 @@ static void peaq_wmi_poll(struct input_polled_dev *dev) } } +static const struct dmi_system_id peaq_blacklist[] __initconst = { + { + /* Lenovo ideapad 700-15ISK does not have Dolby button */ + .ident = "Lenovo ideapad 700-15ISK", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "80RU"), + }, + }, + {} +}; + static int __init peaq_wmi_init(void) { - if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID)) + if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID) || + dmi_check_system(peaq_blacklist)) return -ENODEV; peaq_poll_dev = input_allocate_polled_device(); @@ -86,7 +100,8 @@ static int __init peaq_wmi_init(void) static void __exit peaq_wmi_exit(void) { - if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID)) + if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID) || + dmi_check_system(peaq_blacklist)) return; input_unregister_polled_device(peaq_poll_dev); -- 2.14.1
[PATCH] 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 --- drivers/platform/x86/peaq-wmi.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/peaq-wmi.c b/drivers/platform/x86/peaq-wmi.c index bc98ef95514a..5673d5daebc3 100644 --- a/drivers/platform/x86/peaq-wmi.c +++ b/drivers/platform/x86/peaq-wmi.c @@ -11,6 +11,7 @@ #include #include #include +#include #define PEAQ_DOLBY_BUTTON_GUID "ABBC0F6F-8EA1-11D1-00A0-C9062910" #define PEAQ_DOLBY_BUTTON_METHOD_ID5 @@ -64,9 +65,22 @@ static void peaq_wmi_poll(struct input_polled_dev *dev) } } +static const struct dmi_system_id peaq_blacklist[] __initconst = { + { + /* Lenovo ideapad 700-15ISK does not have Dolby button */ + .ident = "Lenovo ideapad 700-15ISK", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "80RU"), + }, + }, + {} +}; + static int __init peaq_wmi_init(void) { - if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID)) + if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID) || + dmi_check_system(peaq_blacklist)) return -ENODEV; peaq_poll_dev = input_allocate_polled_device(); @@ -86,7 +100,8 @@ static int __init peaq_wmi_init(void) static void __exit peaq_wmi_exit(void) { - if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID)) + if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID) || + dmi_check_system(peaq_blacklist)) return; input_unregister_polled_device(peaq_poll_dev); -- 2.14.1