Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1280294 > unrolled thread
| Started by | Darren Hart <dvhart@infradead.org> |
|---|---|
| First post | 2015-11-30 22:20 +0100 |
| Last post | 2015-12-04 13:40 +0100 |
| Articles | 10 — 4 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.
Re: [PATCH] dell-wmi: add module param to control Dell Instant Launch hotkey processing Darren Hart <dvhart@infradead.org> - 2015-11-30 22:20 +0100
Re: [PATCH] dell-wmi: add module param to control Dell Instant Launch hotkey processing Michał Kępień <kernel@kempniu.pl> - 2015-12-01 09:50 +0100
[PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131 Michał Kępień <kernel@kempniu.pl> - 2015-12-01 21:00 +0100
Re: [PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131 Darren Hart <dvhart@infradead.org> - 2015-12-04 02:20 +0100
Re: [PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131 Pali Rohár <pali.rohar@gmail.com> - 2015-12-04 10:00 +0100
Re: [PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131 Michał Kępień <kernel@kempniu.pl> - 2015-12-04 14:30 +0100
Re: [PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131 Michał Kępień <kernel@kempniu.pl> - 2015-12-04 14:00 +0100
Re: [PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131 Andy Lutomirski <luto@amacapital.net> - 2015-12-04 17:10 +0100
Re: [PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131 Pali Rohár <pali.rohar@gmail.com> - 2015-12-04 09:50 +0100
Re: [PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131 Michał Kępień <kernel@kempniu.pl> - 2015-12-04 13:40 +0100
| From | Darren Hart <dvhart@infradead.org> |
|---|---|
| Date | 2015-11-30 22:20 +0100 |
| Subject | Re: [PATCH] dell-wmi: add module param to control Dell Instant Launch hotkey processing |
| Message-ID | <qAE1A-r5-17@gated-at.bofh.it> |
On Thu, Nov 26, 2015 at 03:18:32PM +0100, Michał Kępień wrote: > On some laptop models (e.g. Dell Vostro V131), pressing the Dell Instant > Launch hotkey does not raise an i8042 interrupt - only WMI event 0xe025 > is generated. As there is no flawless way to determine whether a given > machine is capable of simulating a keypress when this hotkey is pressed, > a new module parameter is added so that the user can decide whether the > WMI event should be processed or ignored. > > Signed-off-by: Michał Kępień <kernel@kempniu.pl> Module parameters are to be avoided wherever possible, especially for things like this which set precedent and don't scale well. If we cannot detect which machines use the EC and which only use WMI, then we can fall back to checking DMI for specific models. Per the above, and Pali's feedback. I'll be dropping this one in anticipation of a V2. Thanks, -- Darren Hart Intel Open Source Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Michał Kępień <kernel@kempniu.pl> |
|---|---|
| Date | 2015-12-01 09:50 +0100 |
| Message-ID | <qAONk-7gM-7@gated-at.bofh.it> |
| In reply to | #1280294 |
> Module parameters are to be avoided wherever possible, especially for things > like this which set precedent and don't scale well. If we cannot detect which > machines use the EC and which only use WMI, then we can fall back to checking > DMI for specific models. > > Per the above, and Pali's feedback. I'll be dropping this one in anticipation of > a V2. Thanks for reviewing, I'll prepare version 2 using DMI matching. -- Best regards, Michał Kępień -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Michał Kępień <kernel@kempniu.pl> |
|---|---|
| Date | 2015-12-01 21:00 +0100 |
| Subject | [PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131 |
| Message-ID | <qAZfJ-5yU-25@gated-at.bofh.it> |
| In reply to | #1280294 |
On some laptop models (e.g. Dell Vostro V131), pressing the Dell Instant
Launch hotkey does not raise an i8042 interrupt - only WMI event 0xe025
is generated. As there seems to be no ACPI method or SMI call to
determine without possible side effects whether a given machine is
capable of simulating a keypress when this hotkey is pressed, DMI
matching is used to whitelist the models for which an input event should
be generated when WMI event 0xe025 is received.
Signed-off-by: Michał Kępień <kernel@kempniu.pl>
---
Changes from v1:
- Use DMI matching instead of a module parameter
- Change flag name to improve readability
Darren, I am aware this patch conflicts with Andy's WMI rework series
posted yesterday, so please just let me know if you want me to rebase.
drivers/platform/x86/dell-wmi.c | 39 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 38 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c
index 8cb0f57..27c8f49 100644
--- a/drivers/platform/x86/dell-wmi.c
+++ b/drivers/platform/x86/dell-wmi.c
@@ -47,6 +47,38 @@ static int acpi_video;
MODULE_ALIAS("wmi:"DELL_EVENT_GUID);
+struct quirk_entry {
+ bool process_dell_instant_launch;
+};
+
+static struct quirk_entry *quirks;
+
+static struct quirk_entry quirk_unknown = {
+};
+
+static struct quirk_entry quirk_dell_vostro_v131 = {
+ .process_dell_instant_launch = true,
+};
+
+static int __init dmi_matched(const struct dmi_system_id *dmi)
+{
+ quirks = dmi->driver_data;
+ return 1;
+}
+
+static const struct dmi_system_id dell_wmi_quirks[] __initconst = {
+ {
+ .callback = dmi_matched,
+ .ident = "Dell Vostro V131",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Vostro V131"),
+ },
+ .driver_data = &quirk_dell_vostro_v131,
+ },
+ { }
+};
+
/*
* Certain keys are flagged as KE_IGNORE. All of these are either
* notifications (rather than requests for change) or are also sent
@@ -87,7 +119,7 @@ static const struct key_entry dell_wmi_legacy_keymap[] __initconst = {
{ KE_IGNORE, 0xe020, { KEY_MUTE } },
/* Shortcut and audio panel keys */
- { KE_IGNORE, 0xe025, { KEY_RESERVED } },
+ { KE_KEY, 0xe025, { KEY_PROG4 } },
{ KE_IGNORE, 0xe026, { KEY_RESERVED } },
{ KE_IGNORE, 0xe02e, { KEY_VOLUMEDOWN } },
@@ -183,6 +215,9 @@ static void dell_wmi_process_key(int reported_key)
key->keycode == KEY_BRIGHTNESSDOWN) && acpi_video)
return;
+ if (key->keycode == KEY_PROG4 && !quirks->process_dell_instant_launch)
+ return;
+
sparse_keymap_report_entry(dell_wmi_input_dev, key, 1, true);
}
@@ -432,6 +467,8 @@ static int __init dell_wmi_init(void)
return -ENODEV;
}
+ quirks = &quirk_unknown;
+ dmi_check_system(dell_wmi_quirks);
dmi_walk(find_hk_type, NULL);
acpi_video = acpi_video_get_backlight_type() != acpi_backlight_vendor;
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Darren Hart <dvhart@infradead.org> |
|---|---|
| Date | 2015-12-04 02:20 +0100 |
| Subject | Re: [PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131 |
| Message-ID | <qBNcv-4nR-47@gated-at.bofh.it> |
| In reply to | #1281165 |
On Tue, Dec 01, 2015 at 08:51:34PM +0100, Michał Kępień wrote: > On some laptop models (e.g. Dell Vostro V131), pressing the Dell Instant > Launch hotkey does not raise an i8042 interrupt - only WMI event 0xe025 > is generated. As there seems to be no ACPI method or SMI call to > determine without possible side effects whether a given machine is > capable of simulating a keypress when this hotkey is pressed, DMI > matching is used to whitelist the models for which an input event should > be generated when WMI event 0xe025 is received. > > Signed-off-by: Michał Kępień <kernel@kempniu.pl> > --- > Changes from v1: > > - Use DMI matching instead of a module parameter > - Change flag name to improve readability > > Darren, I am aware this patch conflicts with Andy's WMI rework series > posted yesterday, so please just let me know if you want me to rebase. Thanks for the heads' up. Andy's series is longer and likely going to need more review from more people, so I don't necessarily want to hold this one up on it - unless it makes sense to include it in that series so they can evolve together. I'll leave that to you and Andy to decide. This looks fine to me, and if Pali will ack it, I'll move it from for-review to testing and Andy will need to update patch 14/14 to accomodate - unless you guys decide to include this in his. For now, this is queued to for-review. Thanks! -- Darren Hart Intel Open Source Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Pali Rohár <pali.rohar@gmail.com> |
|---|---|
| Date | 2015-12-04 10:00 +0100 |
| Subject | Re: [PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131 |
| Message-ID | <qBUnF-nU-21@gated-at.bofh.it> |
| In reply to | #1283512 |
On Thursday 03 December 2015 17:16:06 Darren Hart wrote: > This looks fine to me, and if Pali will ack it, I'll move it from for-review to > testing and Andy will need to update patch 14/14 to accomodate - unless you guys > decide to include this in his. This patch is not enough for enabling 0xe025 key on that Vostro machine. Some extra SMBIOS call is needed, without them ACPI will not send WMI keypress event. Dell SMBIOS call can be done either via WMI or via SMI inb/outb instructions which implements dcdbas.ko driver. Module dell-laptop.ko uses only SMBIOS API for all functionality and uses dcdbas.ko. There is another driver which uses SMBIOS API, but use WMI calls. It is dell-led.ko in leds subsystem. So now I do not know where to put that needed SMBIOS call for enabling 0xe025 hotkey event and also I do not know if it is better to use WMI or dcdbas.ko. Maybe now it could make sense to unify Dell SMBIOS API in kernel and move common functions to one place and let drivers to use just common functions. According to older Dell ACPI WMI documentation in DMI is bit which specify if BIOS support SMBIOS via WMI or not. At least I think this one patch should not be included into kernel until there will be full support for 0xe025 key (adding that SMBIOS call). -- Pali Rohár pali.rohar@gmail.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Michał Kępień <kernel@kempniu.pl> |
|---|---|
| Date | 2015-12-04 14:30 +0100 |
| Subject | Re: [PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131 |
| Message-ID | <qBYAW-3bA-13@gated-at.bofh.it> |
| In reply to | #1283658 |
> This patch is not enough for enabling 0xe025 key on that Vostro machine. > Some extra SMBIOS call is needed, without them ACPI will not send WMI > keypress event. Indeed. But have you read the last e-mail I wrote before submitting the original patch [1]? Brightness control on the V131 is already broken "out of the box" with newer kernels (flickering upon brightness change), but if we do what you're suggesting and include the SMI call in the kernel, we'll break it even more, to the point where pressing one of the brightness control keys might not result in any brightness change at all. Sure, we can fix that by overriding an arbitrary ACPI method. Oh, wait, did I say "fix"? I posted the patch without the SMI call because that way if you want to use the Dell Instant Launch hotkey, you just fire up a userspace script (which uses libsmbios and takes care of overriding the ACPI method) and chances are you will end up with a fully functional system. Of course you need to understand that using this script is not an elegant solution and that it might break something else, but it's your choice, not the kernel's. And the patch itself does not change kernel's default behavior, so we're not risking breaking any other models out there. > At least I think this one patch should not be included into kernel until > there will be full support for 0xe025 key (adding that SMBIOS call). Again, fully supporting the Dell Instant Launch hotkey makes brightness control even more broken than it has to be. In other words, everything is terrible. The only real solution to all these issues is a BIOS fix and I'm pretty sure it's not happening. [1] http://www.spinics.net/lists/platform-driver-x86/msg07679.html -- Best regards, Michał Kępień -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Michał Kępień <kernel@kempniu.pl> |
|---|---|
| Date | 2015-12-04 14:00 +0100 |
| Subject | Re: [PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131 |
| Message-ID | <qBY7U-2M0-27@gated-at.bofh.it> |
| In reply to | #1283512 |
> > On some laptop models (e.g. Dell Vostro V131), pressing the Dell Instant > > Launch hotkey does not raise an i8042 interrupt - only WMI event 0xe025 > > is generated. As there seems to be no ACPI method or SMI call to > > determine without possible side effects whether a given machine is > > capable of simulating a keypress when this hotkey is pressed, DMI > > matching is used to whitelist the models for which an input event should > > be generated when WMI event 0xe025 is received. > > > > Signed-off-by: Michał Kępień <kernel@kempniu.pl> > > --- > > Changes from v1: > > > > - Use DMI matching instead of a module parameter > > - Change flag name to improve readability > > > > Darren, I am aware this patch conflicts with Andy's WMI rework series > > posted yesterday, so please just let me know if you want me to rebase. > > Thanks for the heads' up. Andy's series is longer and likely going to need more > review from more people, so I don't necessarily want to hold this one up on it - > unless it makes sense to include it in that series so they can evolve together. > I'll leave that to you and Andy to decide. As merging my patch with Andy's work is just a matter of moving code around, not actually changing it, personally I don't feel this patch should be somehow linked to the WMI rework. Andy, please let me know if you disagree, I don't really have any strong feelings about this. -- Best regards, Michał Kępień -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Andy Lutomirski <luto@amacapital.net> |
|---|---|
| Date | 2015-12-04 17:10 +0100 |
| Subject | Re: [PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131 |
| Message-ID | <qC15M-4Xp-21@gated-at.bofh.it> |
| In reply to | #1283799 |
On Fri, Dec 4, 2015 at 4:55 AM, Michał Kępień <kernel@kempniu.pl> wrote: >> > On some laptop models (e.g. Dell Vostro V131), pressing the Dell Instant >> > Launch hotkey does not raise an i8042 interrupt - only WMI event 0xe025 >> > is generated. As there seems to be no ACPI method or SMI call to >> > determine without possible side effects whether a given machine is >> > capable of simulating a keypress when this hotkey is pressed, DMI >> > matching is used to whitelist the models for which an input event should >> > be generated when WMI event 0xe025 is received. >> > >> > Signed-off-by: Michał Kępień <kernel@kempniu.pl> >> > --- >> > Changes from v1: >> > >> > - Use DMI matching instead of a module parameter >> > - Change flag name to improve readability >> > >> > Darren, I am aware this patch conflicts with Andy's WMI rework series >> > posted yesterday, so please just let me know if you want me to rebase. >> >> Thanks for the heads' up. Andy's series is longer and likely going to need more >> review from more people, so I don't necessarily want to hold this one up on it - >> unless it makes sense to include it in that series so they can evolve together. >> I'll leave that to you and Andy to decide. > > As merging my patch with Andy's work is just a matter of moving code > around, not actually changing it, personally I don't feel this patch > should be somehow linked to the WMI rework. Andy, please let me know if > you disagree, I don't really have any strong feelings about this. >' I think it's just a matter of which lands first. It shouldn't be a big deal. --Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Pali Rohár <pali.rohar@gmail.com> |
|---|---|
| Date | 2015-12-04 09:50 +0100 |
| Subject | Re: [PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131 |
| Message-ID | <qBUdY-kv-7@gated-at.bofh.it> |
| In reply to | #1281165 |
On Tuesday 01 December 2015 20:51:34 Michał Kępień wrote:
> On some laptop models (e.g. Dell Vostro V131), pressing the Dell Instant
> Launch hotkey does not raise an i8042 interrupt - only WMI event 0xe025
> is generated. As there seems to be no ACPI method or SMI call to
> determine without possible side effects whether a given machine is
> capable of simulating a keypress when this hotkey is pressed, DMI
> matching is used to whitelist the models for which an input event should
> be generated when WMI event 0xe025 is received.
>
> Signed-off-by: Michał Kępień <kernel@kempniu.pl>
> ---
> Changes from v1:
>
> - Use DMI matching instead of a module parameter
> - Change flag name to improve readability
>
> Darren, I am aware this patch conflicts with Andy's WMI rework series
> posted yesterday, so please just let me know if you want me to rebase.
>
> drivers/platform/x86/dell-wmi.c | 39 ++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 38 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c
> index 8cb0f57..27c8f49 100644
> --- a/drivers/platform/x86/dell-wmi.c
> +++ b/drivers/platform/x86/dell-wmi.c
> @@ -47,6 +47,38 @@ static int acpi_video;
>
> MODULE_ALIAS("wmi:"DELL_EVENT_GUID);
>
> +struct quirk_entry {
> + bool process_dell_instant_launch;
> +};
> +
> +static struct quirk_entry *quirks;
> +
> +static struct quirk_entry quirk_unknown = {
> +};
> +
> +static struct quirk_entry quirk_dell_vostro_v131 = {
> + .process_dell_instant_launch = true,
> +};
> +
> +static int __init dmi_matched(const struct dmi_system_id *dmi)
> +{
> + quirks = dmi->driver_data;
> + return 1;
> +}
> +
> +static const struct dmi_system_id dell_wmi_quirks[] __initconst = {
> + {
> + .callback = dmi_matched,
> + .ident = "Dell Vostro V131",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
> + DMI_MATCH(DMI_PRODUCT_NAME, "Vostro V131"),
> + },
> + .driver_data = &quirk_dell_vostro_v131,
> + },
> + { }
> +};
> +
It is not possible to simplify this part of code? Currently we only need
boolean variable: ignore 0xe025 event or not. I think that whole quirk
structure is not needed yet (and I would be happy if never in future).
> /*
> * Certain keys are flagged as KE_IGNORE. All of these are either
> * notifications (rather than requests for change) or are also sent
> @@ -87,7 +119,7 @@ static const struct key_entry dell_wmi_legacy_keymap[] __initconst = {
> { KE_IGNORE, 0xe020, { KEY_MUTE } },
>
> /* Shortcut and audio panel keys */
> - { KE_IGNORE, 0xe025, { KEY_RESERVED } },
> + { KE_KEY, 0xe025, { KEY_PROG4 } },
> { KE_IGNORE, 0xe026, { KEY_RESERVED } },
>
> { KE_IGNORE, 0xe02e, { KEY_VOLUMEDOWN } },
> @@ -183,6 +215,9 @@ static void dell_wmi_process_key(int reported_key)
> key->keycode == KEY_BRIGHTNESSDOWN) && acpi_video)
> return;
>
> + if (key->keycode == KEY_PROG4 && !quirks->process_dell_instant_launch)
> + return;
> +
> sparse_keymap_report_entry(dell_wmi_input_dev, key, 1, true);
> }
>
> @@ -432,6 +467,8 @@ static int __init dell_wmi_init(void)
> return -ENODEV;
> }
>
> + quirks = &quirk_unknown;
Unknown sounds like something is not know or we do not know what it is.
But here we know exactly what is needed (= ignore 0xe025 key).
> + dmi_check_system(dell_wmi_quirks);
> dmi_walk(find_hk_type, NULL);
> acpi_video = acpi_video_get_backlight_type() != acpi_backlight_vendor;
>
--
Pali Rohár
pali.rohar@gmail.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Michał Kępień <kernel@kempniu.pl> |
|---|---|
| Date | 2015-12-04 13:40 +0100 |
| Subject | Re: [PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131 |
| Message-ID | <qBXOy-2Eq-23@gated-at.bofh.it> |
| In reply to | #1283650 |
> > --- a/drivers/platform/x86/dell-wmi.c
> > +++ b/drivers/platform/x86/dell-wmi.c
> > @@ -47,6 +47,38 @@ static int acpi_video;
> >
> > MODULE_ALIAS("wmi:"DELL_EVENT_GUID);
> >
> > +struct quirk_entry {
> > + bool process_dell_instant_launch;
> > +};
> > +
> > +static struct quirk_entry *quirks;
> > +
> > +static struct quirk_entry quirk_unknown = {
> > +};
> > +
> > +static struct quirk_entry quirk_dell_vostro_v131 = {
> > + .process_dell_instant_launch = true,
> > +};
> > +
> > +static int __init dmi_matched(const struct dmi_system_id *dmi)
> > +{
> > + quirks = dmi->driver_data;
> > + return 1;
> > +}
> > +
> > +static const struct dmi_system_id dell_wmi_quirks[] __initconst = {
> > + {
> > + .callback = dmi_matched,
> > + .ident = "Dell Vostro V131",
> > + .matches = {
> > + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
> > + DMI_MATCH(DMI_PRODUCT_NAME, "Vostro V131"),
> > + },
> > + .driver_data = &quirk_dell_vostro_v131,
> > + },
> > + { }
> > +};
> > +
>
> It is not possible to simplify this part of code? Currently we only need
> boolean variable: ignore 0xe025 event or not. I think that whole quirk
> structure is not needed yet (and I would be happy if never in future).
Of course it is possible. I just got the feeling that using a quirk
structure is the way to go for this subsystem as it currently contains 7
drivers using something like this. Moreover, I saw that in some commits
initially adding a quirk structure to a driver (2d8b90be, a979e2e2) that
structure contained just one field.
So, between KISS and following the beaten path, I chose the latter. If
you still think this patch should be reworked to use a single global
boolean instead, please let me know and I'll prepare a v3.
> > @@ -432,6 +467,8 @@ static int __init dell_wmi_init(void)
> > return -ENODEV;
> > }
> >
> > + quirks = &quirk_unknown;
>
> Unknown sounds like something is not know or we do not know what it is.
> But here we know exactly what is needed (= ignore 0xe025 key).
Again, not my idea, I just thought it would be wise to follow what seems
to be an established pattern:
$ git grep 'quirk.*unknown' drivers/platform/x86/
--
Best regards,
Michał Kępień
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web