Re: [PATCH 8/9] Staging: lustre: llite_lib: Remove wrapper function

2015-11-09 Thread Michał Kępień
> Remove the function ll_finish_md_op_data() and replace all its calls > with the standrd function ll_finish_md_op_data(). I believe you meant to write "standard function kfree()". -- Best regards, Michał Kępień -- To unsubscribe from this list: send the line "uns

Re: [PATCH] Staging: fbtft: Use BIT macro

2015-10-06 Thread Michał Kępień
BIT(23) > +#define DEBUG_MKDIRTY BIT(24) > +#define DEBUG_UPDATE_DISPLAYBIT(25) > +#define DEBUG_INIT_DISPLAY BIT(26) > +#define DEBUG_BLANK BIT(27) > +#define DEBUG_REQUEST_GPIOS BIT(28) > +#define DEBUG_FREE_GPIOS

Re: [PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131

2015-12-04 Thread Michał Kępień
a v3. > > @@ -432,6 +467,8 @@ static int __init dell_wmi_init(void) > > return -ENODEV; > > } > > > > + quirks = _unknown; > > Unknown sounds like something is not know or we do not know what it is. > But here we know exactly what is

Re: [PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131

2015-12-04 Thread Michał Kępień
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ń --

Re: [PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131

2015-12-04 Thread Michał Kępień
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ń <ker...@

[PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131

2015-12-01 Thread Michał Kępień
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ń <ker...@kempniu.pl> --- Changes from v1: - Use DMI matching instead of a module parameter -

Re: [PATCH 0/2] Fixes for dell-wmi

2015-12-28 Thread Michał Kępień
attered around the web) has the WMI Interface Version field set to 1, as the first one of your patches correctly asserts. -- Best regards, Michał Kępień -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majo

Re: [PATCH 2/2] dell-wmi: Process only one event on devices with interface version 0

2015-12-28 Thread Michał Kępień
1 clears buffer and > sometimes send more events in buffer at one call. Are the explanations above based on your observations or perhaps some documentation? -- Best regards, Michał Kępień -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message

Re: [PATCH 1/2] dell-wmi: Check if Dell WMI descriptor structure is valid

2015-12-28 Thread Michał Kępień
again and I couldn't find any explicit statement urging the reader to check the structure in question before doing anything else. -- Best regards, Michał Kępień -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.

Re: [PATCH 1/2] dell-wmi: Check if Dell WMI descriptor structure is valid

2015-12-30 Thread Michał Kępień
t; parse and check WMI descriptor if contains expected data. It is because > WMI descriptor contains interface version number and it is needed to > know in next commit. > === I like it way more than the previous one. -- Best regards, Michał Kępień -- To unsubscribe from this list

Re: [PATCH 1/2] dell-wmi: Check if Dell WMI descriptor structure is valid

2015-12-29 Thread Michał Kępień
hich WMI Interface version is used on the machine we're running on. Perhaps with an additional word or two that it won't hurt to also check the WMI Descriptor object's correctness while we're at it. If you feel like I'm nit-picking and none of the above matters, please feel free to disregard my inp

Re: [PATCH 0/2] Fixes for dell-wmi

2015-12-29 Thread Michał Kępień
Can you post DEBUG output when receiving events before and > after patch (to check that processing is correct)? After applying your patches on my Vostro V131, the WMI events reported are exactly the same as they were when I originally posted them [1]. [1] http://www.spinics.net/lists/platform

Re: [PATCH] dell-wmi: add module param to control Dell Instant Launch hotkey processing

2015-11-30 Thread Michał Kępień
machines is needed > to collect. And via it decide if WMI event will be accepted or dropped. If you believe this is the way to go, I'm perfectly fine with that. [1] http://www.spinics.net/lists/platform-driver-x86/msg07220.html -- Best regards, Michał Kępień -- To unsubscribe from this list: s

Re: [PATCH] dell-wmi: add module param to control Dell Instant Launch hotkey processing

2015-12-01 Thread Michał Kępień
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

Re: [PATCH] dell-wmi: add module param to control Dell Instant Launch hotkey processing

2015-11-30 Thread Michał Kępień
at I please in my window manager. What I am really struggling to understand is why on earth would one employ something as complicated as ACPI/WMI for handling keypresses. Not to mention requiring cryptic SMI calls for enabling the notifications in the first place. -- Best regards, Michał Kęp

[PATCH] dell-wmi: add module param to control Dell Instant Launch hotkey processing

2015-11-26 Thread Michał Kępień
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ń <ker...@kempniu.pl> --- As my last message [1] in the rather lengthy thread failed to elicit any response, I guess I might just as well post the proposed pa

Re: [PATCH] dell-wmi: add module param to control Dell Instant Launch hotkey processing

2015-11-26 Thread Michał Kępień
rt > http://bugs.launchpad.net/bugs/815914 there is no information if those > two keys are really reported by keyboard controller or not. > > And if not our problem could be easier... That would indeed be sweet as this patch could then be shrinked to just changing the entry in

Re: [PATCH v2 4/4] dell-wmi: Rework code for generating sparse keymap and processing WMI events

2016-06-09 Thread Michał Kępień
dell_wmi_process_key(buffer_entry[1], > buffer_entry[i]); I believe it was Pali's intention to make a distinction between keys being pressed (0x0010) and other events occuring (0x0011), so perhaps a comment after the first case label could be useful? case 0x0010: /* Sequence of keys pressed; fall through */ case 0x0011: /* Sequence of events occurred */ for (i = 2; i < len; ++i) dell_wmi_process_key(buffer_entry[1], buffer_entry[i]); I'll leave it to Pali to decide, I'm just throwing in my two cents. -- Best regards, Michał Kępień

Re: [PATCH v2 0/4] dell-wmi: Changes in WMI event code handling

2016-06-09 Thread Michał Kępień
ed comments > * Fixed memory leak > * Added Tested-By lines > * Added event 0xe06e Pali, assuming that you will address Darren's concerns (empty commit message for patch 2/4, switch fall-through in patch 4/4 and some comments over 80 characters in patches 2/4 and 4/4), feel free to add: R

Moving drivers/leds/dell-led.c to drivers/platform/x86

2016-06-13 Thread Michał Kępień
ries I am working on. Looking forward to hearing from you, [1] https://www.spinics.net/lists/platform-driver-x86/msg08143.html -- Best regards, Michał Kępień

Re: [PATCH 3/4] dell-wmi: Add information about other WMI event codes

2016-06-02 Thread Michał Kępień
et mode on portable devices */ > { KE_IGNORE, 0xe046, { KEY_SCROLLLOCK } }, > + > + /* Untested, going from tablet mode on portable devices */ > + /* { KE_IGNORE, 0xe047, { KEY_RESERVED } }, */ > + I have one more entry to add here: { KE_IGNORE, 0xe06e, { KEY_RESERVED } }, WMI event 0xe06e is emitted on a Vostro V131 when the Dell Support Center hotkey is pressed, along with an i8042 interrupt. -- Best regards, Michał Kępień

Re: [PATCH 4/4] dell-wmi: Rework code for generating sparse keymap and processing WMI events

2016-06-02 Thread Michał Kępień
; > + /* Append table with extra events of type 0x0010 which are not in DMI */ > + for (i = 0; i < ARRAY_SIZE(dell_wmi_keymap_type_0010); i++) { > + const struct key_entry *entry = _wmi_keymap_type_0010[i]; > > /* > - * Sparse keymap library makes a copy of keymap so we > - * don't need the original one that was allocated. > + * Check if we've already found this scancode. This takes > + * quadratic time, but it doesn't matter unless the list > + * of extra keys gets very long. >*/ > - kfree(dmi_results.keymap); > - } else { > - err = sparse_keymap_setup(dell_wmi_input_dev, > - dell_wmi_legacy_keymap, NULL); > + if (dmi_results.keymap_size && > + have_scancode(entry->code | (0x0010 << 16), > + keymap, dmi_results.keymap_size) > +) > + continue; Is the first part of this conditional expression really needed? If dmi_results.keymap_size is 0 then have_scancode() will simply return false, so the only disadvantage of removing this check is the overhead of calling have_scancode() for every iteration of the loop, but I believe that overhead is negligible as this is not performance-critical code. -- Best regards, Michał Kępień

Re: [PATCH 2/4] dell-wmi: Sort WMI event codes and update comments

2016-06-02 Thread Michał Kępień
additional information */ /* Key code is followed by: next device, active devices, attached devices */ /* Key code is followed by keyboard illumination level */ And looking at the bigger picture, do you think these comments (especially the generic one: "also contains additional information") are actually needed? Anything that follows the key code is ignored by kernel code anyway. -- Best regards, Michał Kępień

Re: [PATCH 0/4] dell-wmi: Changes in WMI event code handling

2016-06-02 Thread Michał Kępień
> First patch describe problem about 0xe045 code. Second and third are just > cosmetic and last rework code which processing WMI events. It should be > properly tested on more Dell machines, to check that everything is still > working correctly. On a Vostro V131: Tested-by: Michał

Re: [Experimental PATCH] dell-smm-hwmon: Add support for disabling automatic BIOS fan control

2016-06-22 Thread Michał Kępień
ied changing I8K_SMM_MANUAL_FAN and I8K_SMM_AUTO_FAN to 0x30a3 and 0x31a3, respectively (according to [2]), but it hasn't changed anything, i.e. BIOS is taking over shortly after any value is written to pwm{1,2}. -- Best regards, Michał Kępień

Re: [PATCH 0/6] dell-smm-hwmon fixes

2016-06-22 Thread Michał Kępień
ll-smm-hwmon.c | 122 > > 1 file changed, 99 insertions(+), 23 deletions(-) On a Vostro V131 (BIOS A04): Tested-by: Michał Kępień <ker...@kempniu.pl> -- Best regards, Michał Kępień

[PATCH 0/2] fujitsu-laptop: Debugging cleanup

2016-06-23 Thread Michał Kępień
Jonathan, > > BTW: the debug message is a little misleading, as all of them are prefixed > > 'FUJ02B1', even if the ACPI event is handled by the FUJ02E3 device. > > Yes, good point. The use of "FUJ02B1" (via ACPI_FUJITSU_HID) would have > been for convenience and possibly dates from before

[PATCH 1/2] fujitsu-laptop: Use module name in debug messages

2016-06-23 Thread Michał Kępień
me instead and thus avoid confusion. Reported-by: Jan-Marek Glogowski <glo...@fbihome.de> Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/fujitsu-laptop.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/fujitsu-laptop.c

[PATCH 2/2] fujitsu-laptop: Remove unused macros

2016-06-23 Thread Michał Kępień
FUJLAPTOP_* macros were introduced by 20b9373, but have never been used except FUJLAPTOP_DEBUG, which was made redundant by the previous patch. ACPI_VIDEO_NOTIFY_* macros were also introduced by 20b9373, but they have not been needed since 1696d9d. Signed-off-by: Michał Kępień <ker...@kempniu

[PATCH v3] fujitsu-laptop: Support touchpad toggle hotkey on Skylake-based models

2016-06-28 Thread Michał Kępień
ki <glo...@fbihome.de> Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- Changes from v2: - edited code comment so that it defines "some models" more precisely. Changes from v1: - added KEY_TOUCHPAD_TOGGLE to the FUJ02E3 input device's key bitmap, - added code co

[PATCH] fujitsu-laptop: Support touchpad toggle hotkey on Skylake-based models

2016-06-26 Thread Michał Kępień
ki <glo...@fbihome.de> Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- Darren, this patch needs both an Acked-by from Jonathan and a Tested-by from Jan-Marek before merging as I do not have the hardware to test it. drivers/platform/x86/fujitsu-laptop.c |9 + 1 file changed, 9

Re: [PATCH 01/14] dell-laptop: extract SMBIOS-related code to a separate module

2016-02-09 Thread Michał Kępień
[2] http://www.spinics.net/lists/platform-driver-x86/msg08268.html -- Best regards, Michał Kępień

Re: [PATCH v2 00/16] Common Dell SMBIOS API

2016-02-09 Thread Michał Kępień
pull > > the dependant module in automagically when you do a 'modprobe', > > otherwise the symbols would never be found. > > OK, Thank you Greg. Based on this, I have no concerns that haven't been > addressed in the > pdx86/dell-smbios branch. > > Michał, did you have any changes you wanted to make? No, thanks, nothing new popped up. -- Best regards, Michał Kępień

Re: [PATCH v2 07/16] dell-smbios: don't return an SMBIOS buffer from dell_smbios_send_request()

2016-02-09 Thread Michał Kępień
imply find their output in the same buffer they used to provide input (no matter whether the latter is passed as a function argument or accessed using a module-wide variable). Anyway, as even the above explanation is hardly a stellar demonstration of clarity, I believe your idea of resolving this issu

Re: [PATCH v2 07/16] dell-smbios: don't return an SMBIOS buffer from dell_smbios_send_request()

2016-02-09 Thread Michał Kępień
e edited commit message in your tree before sending my previous message and I liked it. -- Best regards, Michał Kępień

[PATCH] fujitsu-laptop: Support radio toggle button

2016-02-24 Thread Michał Kępień
Lifebook E734/E744/E754 has a radio toggle button which uses code 0x420. Map it to KEY_RFKILL. Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- Tested on a Lifebook E744. drivers/platform/x86/fujitsu-laptop.c |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff

[PATCH v4 3/5] dell-wmi: enable receiving WMI events on Dell Vostro V131

2016-02-23 Thread Michał Kępień
this SMBIOS request in order to receive WMI events, DMI matching is used to whitelist the models which need it. [1] https://lists.us.dell.com/pipermail/libsmbios-devel/2015-July/000612.html Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/Kconfig|1 + drivers/platfo

[PATCH v4 1/5] dell-laptop: move dell_smi_error() to dell-smbios

2016-02-23 Thread Michał Kępień
The dell_smi_error() method could be used by modules other than dell-laptop for convenient translation of SMBIOS request errors into errno values. Thus, move it to dell-smbios. Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/dell-laptop.c | 14 -- d

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

2016-02-23 Thread Michał Kępień
it to the legacy keymap. Signed-off-by: Michał Kępień <ker...@kempniu.pl> Tested-by: Darek Stojaczyk <darek.stojac...@gmail.com> --- drivers/platform/x86/dell-wmi.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/dell-wmi.c b/driv

[PATCH v4 4/5] dell-wmi: properly process Dell Instant Launch hotkey

2016-02-23 Thread Michał Kępień
do not require an SMBIOS request for enabling WMI. Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/dell-wmi.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c index 6

[PATCH v4 2/5] dell-smbios: rename dell_smi_error() to dell_smbios_error()

2016-02-23 Thread Michał Kępień
As dell_smi_error() is exported by dell-smbios, its prefix should be consistent with other exported symbols, so change function name to dell_smbios_error(). Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/dell-laptop.c | 16 drivers/platform/x8

[PATCH v4 0/5] Process Dell Instant Launch hotkey on Vostro V131 and Inspiron M5110

2016-02-23 Thread Michał Kępień
This patch series makes use of the API exported by dell-smbios, so it should be applied to either testing or dell-smbios. Changes from v3: - Extract code issuing the WMI-controlling SMBIOS request into a separate function - Document the SMBIOS request used - Split keymap section

Re: [PATCH v4 4/5] dell-wmi: properly process Dell Instant Launch hotkey

2016-02-29 Thread Michał Kępień
vent we know about that should be ignored on some machines and processed on others, this makes sense, at least for now. If I change the first condition to: reported_key == 0xe025 will you be okay with adding your Reviewed-by for this patch? Then, for Darren's convenience, I could post a v5 of the whole series with the above change and all your Acked-by and Reviewed-by tags added. -- Best regards, Michał Kępień

Re: [PATCH v4 1/5] dell-laptop: move dell_smi_error() to dell-smbios

2016-02-29 Thread Michał Kępień
> On Wednesday 24 February 2016 08:20:11 Michał Kępień wrote: > > The dell_smi_error() method could be used by modules other than > > dell-laptop for convenient translation of SMBIOS request errors into > > errno values. Thus, move it to dell-smbios. > > > >

Re: [PATCH v4 1/5] dell-laptop: move dell_smi_error() to dell-smbios

2016-02-29 Thread Michał Kępień
> On Monday 29 February 2016 21:22:54 Michał Kępień wrote: > > > On Wednesday 24 February 2016 08:20:11 Michał Kępień wrote: > > > > The dell_smi_error() method could be used by modules other than > > > > dell-laptop for convenient translation of SMBIOS requ

Re: [PATCH v4 4/5] dell-wmi: properly process Dell Instant Launch hotkey

2016-02-29 Thread Michał Kępień
> On Monday 29 February 2016 21:31:23 Michał Kępień wrote: > > > > diff --git a/drivers/platform/x86/dell-wmi.c > > > > b/drivers/platform/x86/dell-wmi.c index 65edd93..ffc957b5 100644 > > > > --- a/drivers/platform/x86/dell-wmi.c > > > > +++

Re: [PATCH 01/14] dell-laptop: extract SMBIOS-related code to a separate module

2016-01-21 Thread Michał Kępień
s why I think it's a good idea to stick to that concept for consistency. As this patch series already touches a lot of code, I would like to avoid changing the underlying concepts as much as possible. If that's okay with you, I'll post a v2 which includes your suggestion to make the buffer pointer static while keeping the interface similar to the original one. If you would really like me to take a different path, please let me know and I'll comply. -- Best regards, Michał Kępień

Re: [PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131

2016-01-21 Thread Michał Kępień
after all, it is the very reason I am working on the API rework. -- Best regards, Michał Kępień

Re: [PATCH 01/14] dell-laptop: extract SMBIOS-related code to a separate module

2016-01-21 Thread Michał Kępień
API to other people as I do not know what > the best API to use here... In order to avoid delaying this any further, I'll post a v2 soon and hopefully it'll be good enough for your Acked-by. If it turns out more people have misgivings about it, I'll adjust the code. -- Best regards, Michał Kępień

Re: [PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131

2016-01-21 Thread Michał Kępień
ease advise how you would like me to proceed with this? [1] http://www.spinics.net/lists/platform-driver-x86/msg07845.html [2] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1205791/comments/12 -- Best regards, Michał Kępień

Re: [PATCH 13/14] dell-led: use dell_smbios_find_token() for finding mic DMI tokens

2016-01-21 Thread Michał Kępień
s series. Given that the only difference between v1 and v2 for dell-led will be a subtle difference in API use, I'll allow myself to use your Acked-by for the last two patches when I post v2. Please let me know if that's inappropriate. -- Best regards, Michał Kępień

Re: [PATCH v2] dell-wmi: process Dell Instant Launch hotkey on Dell Vostro V131

2016-01-22 Thread Michał Kępień
t the WMI-enabling SMBIOS call in dell-laptop, it won't. Also, once my Dell SMBIOS API rework series gets applied, adding the relevant call to dell-wmi will be easy. -- Best regards, Michał Kępień

Re: [PATCH v2 01/16] dell-laptop: extract SMBIOS-related code to a separate module

2016-01-26 Thread Michał Kępień
mind for v3 of this series, if it happens. If not, I'll post a v3 of just this patch once the rest of the series gets acked. -- Best regards, Michał Kępień

[PATCH v2 00/16] Common Dell SMBIOS API

2016-01-22 Thread Michał Kępień
The Linux kernel tree currently contains two Dell laptop-related drivers issuing SMBIOS requests in different ways (dell-laptop in drivers/platform/x86 and dell-led in drivers/led). As an upcoming patch series for the dell-wmi driver (also in drivers/platform/x86) will change it so that it also

[PATCH v2 12/16] dell-laptop: use dell_smbios_find_token() instead of find_token_location()

2016-01-22 Thread Michał Kępień
Replace all uses of find_token_location() with dell_smbios_find_token() to avoid directly accessing the da_tokens table. Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/dell-laptop.c | 24 1 file changed, 12 insertions(+), 12 del

[PATCH v2 14/16] dell-smbios: make da_tokens static

2016-01-22 Thread Michał Kępień
As dell-laptop has been changed to use dell_smbios_find_token() instead of directly accessing members of the da_tokens table, the latter can be marked static. Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/dell-smbios.c |3 +-- drivers/platform/x86/dell-sm

[PATCH v2 02/16] dell-smbios: rename get_buffer() to dell_smbios_get_buffer()

2016-01-22 Thread Michał Kępień
As get_buffer() is exported from the module, it has to be renamed to something less generic, so add a "dell_smbios_" prefix to the function name. Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/dell-laptop.c | 26 +- drivers/p

[PATCH v2 13/16] dell-smbios: remove find_token_{id,location}()

2016-01-22 Thread Michał Kępień
As dell-laptop has been changed to use dell_smbios_find_token() instead of find_token_id() and find_token_location(), these functions can be safely removed. Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/dell-smbios.c | 25 - drivers/pl

[PATCH v2 03/16] dell-smbios: rename clear_buffer() to dell_smbios_clear_buffer()

2016-01-22 Thread Michał Kępień
As clear_buffer() is exported from the module, it has to be renamed to something less generic, so add a "dell_smbios_" prefix to the function name. Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/dell-laptop.c | 12 ++-- drivers/platform/x

[PATCH v2 10/16] dell-smbios: implement new function for finding DMI table 0xDA tokens

2016-01-22 Thread Michał Kępień
(or NULL if it is not found). Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/dell-smbios.c | 13 + drivers/platform/x86/dell-smbios.h |2 ++ 2 files changed, 15 insertions(+) diff --git a/drivers/platform/x86/dell-smbios.c b/drivers/platform/x8

[PATCH v2 05/16] dell-smbios: rename dell_send_request() to dell_smbios_send_request()

2016-01-22 Thread Michał Kępień
As dell_send_request() is exported from the module, its prefix should be consistent with other exported symbols, so change function name to dell_smbios_send_request(). Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/dell-laptop.c

[PATCH v2 08/16] dell-smbios: return the SMBIOS buffer from dell_smbios_get_buffer()

2016-01-22 Thread Michał Kępień
-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/dell-laptop.c | 49 +++- drivers/platform/x86/dell-smbios.c |3 ++- drivers/platform/x86/dell-smbios.h |2 +- 3 files changed, 35 insertions(+), 19 deletions(-) diff --git a/drivers/platform/x8

[PATCH v2 07/16] dell-smbios: don't return an SMBIOS buffer from dell_smbios_send_request()

2016-01-22 Thread Michał Kępień
An SMBIOS buffer pointer does not need to be returned by dell_smbios_send_request(), because SMBIOS call results are stored in the buffer passed as input. Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/dell-smbios.c |5 + drivers/platform/x86/dell-sm

[PATCH v2 15/16] dell-led: use dell_smbios_find_token() for finding mic DMI tokens

2016-01-22 Thread Michał Kępień
With the advent of dell_smbios_find_token(), dell-led does not need to perform any DMI walking on its own, but it can rather ask dell-smbios to look up the DMI tokens it needs for changing the state of the microphone LED. Signed-off-by: Michał Kępień <ker...@kempniu.pl> Acked-by: Jacek Anas

[PATCH v2 11/16] dell-laptop: use dell_smbios_find_token() instead of find_token_id()

2016-01-22 Thread Michał Kępień
Replace all uses of find_token_id() with dell_smbios_find_token() to avoid directly accessing the da_tokens table. Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/dell-laptop.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff

[PATCH v2 09/16] dell-smbios: make the SMBIOS buffer static

2016-01-22 Thread Michał Kępień
As dell-laptop has been changed to always retrieve a pointer to the SMBIOS buffer using dell_smbios_get_buffer(), the SMBIOS buffer can be marked static. Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/dell-smbios.c |3 +-- drivers/platform/x86/dell-smbios.h

[PATCH v2 06/16] dell-smbios: don't pass an SMBIOS buffer to dell_smbios_send_request()

2016-01-22 Thread Michał Kępień
Passing an SMBIOS buffer pointer to dell_smbios_send_request() is redundant as it should always operate on the SMBIOS buffer exported from the module. Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/dell-laptop.c | 42 ++-- d

[PATCH v2 04/16] dell-smbios: rename release_buffer() to dell_smbios_release_buffer()

2016-01-22 Thread Michał Kępień
As release_buffer() is exported from the module, it has to be renamed to something less generic, so add a "dell_smbios_" prefix to the function name. Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/dell-laptop.c | 28 ++-- driv

[PATCH v2 16/16] dell-led: use dell_smbios_send_request() for performing SMBIOS calls

2016-01-22 Thread Michał Kępień
Instead of using the WMI wrapper, dell-led can take advantage of dell_smbios_send_request() for performing the SMBIOS calls required to change the state of the microphone LED. Signed-off-by: Michał Kępień <ker...@kempniu.pl> Acked-by: Jacek Anaszewski <j.anaszew...@samsung.com> ---

[PATCH v2 01/16] dell-laptop: extract SMBIOS-related code to a separate module

2016-01-22 Thread Michał Kępień
Extract SMBIOS-related code from dell-laptop to a new kernel module, dell-smbios. The static specifier is removed from exported symbols, otherwise code is just moved around. Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/Kconfig | 12 ++- drivers/platfo

Re: [PATCH v3 3/5] dell-wmi: enable receiving WMI events on Dell Vostro V131

2016-02-16 Thread Michał Kępień
> Hi! I would propose moving this get_buffer, send, release code into own > function with boolean argument on/off. This de-duplicate same code plus > decrease level of indentation in _init function. And maybe adding ascii > string comment representation for that 0x5153... number can be useful. Ah, yes, sure. I will do that in v4. -- Best regards, Michał Kępień

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

2016-02-16 Thread Michał Kępień
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ń

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

2016-02-17 Thread Michał Kępień
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ń

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

2016-02-18 Thread Michał Kępień
/* 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ń

[PATCH v3 0/5] Process Dell Instant Launch hotkey on Vostro V131 and Inspiron M5110

2016-02-16 Thread Michał Kępień
Changes from v2: - Use a static variable instead of a quirk structure - Use the API exported by dell-smbios to issue the SMBIOS request required for generating WMI events, returning with error from dell_wmi_init() if it fails - Move dell_smi_error() from dell-laptop to dell-smbios

[PATCH v3 4/5] dell-wmi: properly process Dell Instant Launch hotkey

2016-02-16 Thread Michał Kępień
do not require an SMBIOS request for enabling WMI. Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/dell-wmi.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c index c

[PATCH v3 1/5] dell-laptop: move dell_smi_error() to dell-smbios

2016-02-16 Thread Michał Kępień
The dell_smi_error() method could be used by modules other than dell-laptop for convenient translation of SMBIOS request errors into errno values. Thus, move it to dell-smbios. Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/dell-laptop.c | 14 -- d

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

2016-02-16 Thread Michał Kępień
it to the legacy keymap. Signed-off-by: Michał Kępień <ker...@kempniu.pl> Tested-by: Darek Stojaczyk <darek.stojac...@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/x8

[PATCH v3 3/5] dell-wmi: enable receiving WMI events on Dell Vostro V131

2016-02-16 Thread Michał Kępień
this SMBIOS request in order to receive WMI events, DMI matching is used to whitelist the models which need it. [1] https://lists.us.dell.com/pipermail/libsmbios-devel/2015-July/000612.html Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/Kconfig|1 + drivers/platfo

[PATCH v3 2/5] dell-smbios: rename dell_smi_error() to dell_smbios_error()

2016-02-16 Thread Michał Kępień
As dell_smi_error() is exported by dell-smbios, its prefix should be consistent with other exported symbols, so change function name to dell_smbios_error(). Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/dell-laptop.c | 16 drivers/platform/x8

Re: [PATCH v3 3/5] dell-wmi: enable receiving WMI events on Dell Vostro V131

2016-02-22 Thread Michał Kępień
unaware of some rule? > > IIRC recent versions of gcc ignores "inline" keyword and inline > functions as needed when doing optimizations. This was my hunch as well, but I couldn't find any proof immediately, hence the question. -- Best regards, Michał Kępień

Re: [PATCH v3 3/5] dell-wmi: enable receiving WMI events on Dell Vostro V131

2016-02-22 Thread Michał Kępień
looks good to me. Looking forward to merging v4. I'll try to post a v4 within the next couple of days. -- Best regards, Michał Kępień

Re: [PATCH] fujitsu-laptop: Support radio LED

2016-04-12 Thread Michał Kępień
o_led. > Perhaps it's a candidate for a follow-up patch in the future. I haven't found a way to make this work the intended way out of the box, not with the currently available set of LED triggers. That being said, I would be happy if someone proved me wrong. -- Best regards, Michał Kępień

Re: [PATCH] fujitsu-laptop: Support radio LED

2016-04-12 Thread Michał Kępień
handle this differently. [1] https://www.spinics.net/lists/platform-driver-x86/msg08657.html [2] https://www.spinics.net/lists/platform-driver-x86/msg08662.html -- Best regards, Michał Kępień

Re: [PATCH] fujitsu-laptop: Support radio LED

2016-04-12 Thread Michał Kępień
time to edit the commit message. I like the end result, so if you're happy with it as it is, so am I. Darren, feel free to use the version of this patch suggested by Jonathan. I am at your disposal in case you'd like me to take any further action regarding this patch. -- Best regards, Michał Kępień

[PATCH] fujitsu-laptop: Support radio LED

2016-03-20 Thread Michał Kępień
Lifebook E734/E744/E754 has a LED which the manual calls "radio components indicator". It should be lit when any radio transmitter is enabled. Its state can be read and set using ACPI (FUNC interface, RFKILL method). Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- First of

Re: [PATCH] fujitsu-laptop: Support radio LED

2016-03-22 Thread Michał Kępień
n the commit > > message for future reference. Please advise. > > I think so - there's useful information in there which would be particularly > relevant if the button detection heuristics ever need to be revised. Due to > the necessarily arbitrary feel of the detection logic a brief in-source > comment may be justified too. I'll give this some more thought after you test the patch on the S7020. -- Best regards, Michał Kępień

[PATCH v5 1/5] dell-laptop: move dell_smi_error() to dell-smbios

2016-03-04 Thread Michał Kępień
The dell_smi_error() method could be used by modules other than dell-laptop for convenient translation of SMBIOS request errors into errno values. Thus, move it to dell-smbios. Signed-off-by: Michał Kępień <ker...@kempniu.pl> Reviewed-by: Pali Rohár <pali.ro...@gmail.com> --- driv

[PATCH v5 0/5] Process Dell Instant Launch hotkey on Vostro V131 and Inspiron M5110

2016-03-04 Thread Michał Kępień
This patch series makes use of the API exported by dell-smbios, so it should be applied to either testing or dell-smbios. Pali, I added your Reviewed-by/Acked-by tags to all patches except 4/5; it is the last one awaiting your approval. Changes from v4: - Filter Dell Instant Launch hotkey

[PATCH v5 2/5] dell-smbios: rename dell_smi_error() to dell_smbios_error()

2016-03-04 Thread Michał Kępień
As dell_smi_error() is exported by dell-smbios, its prefix should be consistent with other exported symbols, so change function name to dell_smbios_error(). Signed-off-by: Michał Kępień <ker...@kempniu.pl> Acked-by: Pali Rohár <pali.ro...@gmail.com> --- drivers/platform/x86/dell-lap

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

2016-03-04 Thread Michał Kępień
it to the legacy keymap. Signed-off-by: Michał Kępień <ker...@kempniu.pl> Tested-by: Darek Stojaczyk <darek.stojac...@gmail.com> Reviewed-by: Pali Rohár <pali.ro...@gmail.com> --- drivers/platform/x86/dell-wmi.c | 13 - 1 file changed, 12 insertions(+), 1 delet

[PATCH v5 4/5] dell-wmi: properly process Dell Instant Launch hotkey

2016-03-04 Thread Michał Kępień
(). Signed-off-by: Michał Kępień <ker...@kempniu.pl> --- drivers/platform/x86/dell-wmi.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c index 65edd93..3ea959e 100644 --- a/drivers/platform/x86/dell-wmi.c

[PATCH v5 3/5] dell-wmi: enable receiving WMI events on Dell Vostro V131

2016-03-04 Thread Michał Kępień
this SMBIOS request in order to receive WMI events, DMI matching is used to whitelist the models which need it. [1] https://lists.us.dell.com/pipermail/libsmbios-devel/2015-July/000612.html Signed-off-by: Michał Kępień <ker...@kempniu.pl> Reviewed-by: Pali Rohár <pali.ro...@gmail.com>

Re: [PATCH v4 4/5] dell-wmi: properly process Dell Instant Launch hotkey

2016-03-03 Thread Michał Kępień
t; > > > > > somebody in future adds KEY_PROG4 for something else we will > > > > > > > > have problem... > > And ultimately, that is under our control. So let's just not do that :-) > > A comment by the definition of KEY_PROG4 that notes it's meaning in this > driver > should prevent any future attempts at overloading it and breaking this. As I'll be sending a v5 anyway, do you think Pali's idea is bad? Personally, I'm leaning towards it. IMHO comparing against reported_key would emphasize the fact that only event 0xe025 is "special" and chances are that there are no other WMI event codes which need to be handled this way. -- Best regards, Michał Kępień

Re: [PATCH v4 1/5] dell-laptop: move dell_smi_error() to dell-smbios

2016-03-02 Thread Michał Kępień
> On Mon, Feb 29, 2016 at 09:41:36PM +0100, Michał Kępień wrote: > > > On Monday 29 February 2016 21:22:54 Michał Kępień wrote: > > > > > On Wednesday 24 February 2016 08:20:11 Michał Kępień wrote: > > > > > > The dell_smi_error() method could be used

Re: [PATCH v4 4/5] dell-wmi: properly process Dell Instant Launch hotkey

2016-03-02 Thread Michał Kępień
> On Mon, Feb 29, 2016 at 09:56:03PM +0100, Pali Rohár wrote: > > On Monday 29 February 2016 21:49:27 you wrote: > > > > On Monday 29 February 2016 21:31:23 Michał Kępień wrote: > > > > > > > diff --git a/drivers/platform/x86/dell-wmi.c > > > >

Re: [PATCH] fujitsu-laptop: Support radio LED

2016-03-23 Thread Michał Kępień
E8420: Method (S000, 3, NotSerialized) { Local0 = 0x8000 If ((Arg0 == 0x00)) { Local0 = Zero Local0 |= 0x20 Local0 |= 0x0100 Local0 |= 0x0200 } ... Return (Local0) } -- Best regards, Michał Kępień

Re: [PATCH v3 1/2] dell-smbios: Add a method for more complex SMI requests

2016-05-11 Thread Michał Kępień
gt; @@ -170,8 +204,16 @@ static int __init dell_smbios_init(void) > goto fail_buffer; > } > > + extended_buffer = (void *)__get_free_page(GFP_KERNEL | GFP_DMA32); > + if (!extended_buffer) { > + ret = -ENOMEM; > + goto fail_extended_buffer; > + } > + > return 0; > > +fail_extended_buffer: > + kfree(buffer); Please use free_page() instead, as in dell_smbios_exit(). -- Best regards, Michał Kępień

Re: [PATCH v3 2/2] dell-laptop: Expose auxiliary MAC address if available

2016-05-11 Thread Michał Kępień
e from the copy-pasted sibling of get_aux_mac() would be 0, because dell_smbios_get_buffer() zeroes the SMI buffer and dell_smbios_send_extended_request() would return so early that it wouldn't even call dell_smbios_send_request(). Therefore, "if (!ret)" would evaluate to true, even though the copy-pasted sibling of get_aux_mac() would have encountered an error. Perhaps I'm being overly paranoid, but maybe it won't hurt to do the following instead: get_aux_mac(); if (auxiliary_mac_address) sysfs_create_group(_device->dev.kobj, _attr_group); and make get_aux_mac() return void. What do you think? -- Best regards, Michał Kępień

Re: [PATCH v3 2/2] dell-laptop: Expose auxiliary MAC address if available

2016-05-12 Thread Michał Kępień
patch to the > Ethernet driver in question (r8152). As Pali said, this sounds like the cleaner option. -- Best regards, Michał Kępień

  1   2   3   4   >