summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/msi-wmi.c
Commit message (Collapse)AuthorAgeFilesLines
* msi-wmi: fix semantically incorrect use of keycode instead of scancodeAnisse Astier2010-11-241-8/+8
| | | | | | | | I didn't know the difference between the two when I wrote this code in commit c30116c6f0d26cd6e46dfa578163d573ef4730b2. Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* msi-wmi: Add mute key supportAnisse Astier2010-11-241-0/+2
| | | | | | | | | Add new MUTE key seen on Medion Akoya AIO PC P4010D using MSI motherboard (Product Name: MS-7621) Reported-and-tested-by: Mark Huijgen <mark.sf.net@huijgen.tk> Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* msi-wmi: make needlessly global symbols staticAxel Lin2010-08-031-1/+1
| | | | | | | | | backlight is needlessly defined global. This patch makes the symbol static. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
* backlight: msi-laptop, msi-wmi: fix incomplete registration failure handlingBruno Prémont2010-03-161-2/+4
| | | | | | | | | Properly return backlight registration error to parent. Mark struct backlight_ops as const. Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org> Reviewed-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* backlight: Allow properties to be passed at registrationMatthew Garrett2010-03-161-3/+6
| | | | | | | | | | Values such as max_brightness should be set before backlights are registered, but the current API doesn't allow that. Add a parameter to backlight_device_register and update drivers to ensure that they set this correctly. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* dell-wmi, hp-wmi, msi-wmi: check wmi_get_event_data() return valueLen Brown2009-12-301-1/+6
| | | | | | | | | | | When acpi_evaluate_object() is passed ACPI_ALLOCATE_BUFFER, the caller must kfree the returned buffer if AE_OK is returned. The callers of wmi_get_event_data() pass ACPI_ALLOCATE_BUFFER, and thus must check its return value before accessing or kfree() on the buffer. Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: hp-wmi, msi-wmi: clarify that wmi_install_notify_handler() returns an ↵Len Brown2009-12-301-1/+1
| | | | | | | | | | | acpi_status Emphasize that that wmi_install_notify_handler() returns an acpi_status rather than -errno by by testing ACPI_SUCCESS(), ACPI_FAILURE(). No functional change in this patch, but this confusion caused a bug in dell-wmi. Signed-off-by: Len Brown <len.brown@intel.com>
* acer-wmi, msi-wmi: Remove needless DMI MODULE_ALIASThomas Renninger2009-12-241-10/+0
| | | | | | | | | | Now that we have WMI autoloading the DMI matching is not needed anymore. Signed-off-by: Thomas Renninger <trenn@suse.de> Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk> Acked-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Len Brown <len.brown@intel.com>
* msi-wmi: depend on backlight and fix corner-cases problemsAnisse Astier2009-12-161-8/+15
| | | | | | | | | Now depends on BACKLIGHT_CLASS_DEVICE. Driver will return an error if it can't get actual backlight value Fix remapping of brightness keys when backlight is not controlled by ACPI. Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Len Brown <len.brown@intel.com>
* msi-wmi: switch to using input sparse keymap libraryAnisse Astier2009-12-161-102/+32
| | | | | Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Len Brown <len.brown@intel.com>
* msi-wmi: replace one-condition switch-case with if statementAnisse Astier2009-12-161-9/+4
| | | | | Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Len Brown <len.brown@intel.com>
* msi-wmi: remove unused field 'instance' in key_entry structureAnisse Astier2009-12-161-5/+4
| | | | | Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Len Brown <len.brown@intel.com>
* msi-wmi: remove custom runtime debug implementationAnisse Astier2009-12-161-9/+2
| | | | | | | Rely on DYNAMIC_DEBUG instead if needed Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Len Brown <len.brown@intel.com>
* msi-wmi: rework initAnisse Astier2009-12-161-29/+35
| | | | | | | | | There should be less code duplication with usage of gotos Driver won't load if there's no hardware to control Safer error handling at input driver allocation Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Len Brown <len.brown@intel.com>
* msi-wmi: remove useless includesAnisse Astier2009-12-161-6/+0
| | | | | Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Len Brown <len.brown@intel.com>
* X86 drivers: Introduce msi-wmi driverThomas Renninger2009-12-161-0/+369
This driver serves backlight (including switching) and volume up/down keys for MSI machines providing a specific wmi interface: 551A1F84-FBDD-4125-91DB-3EA8F44F1D45 B6F3EEF2-3D2F-49DC-9DE3-85BCE18C62F2 Signed-off-by: Thomas Renninger <trenn@suse.de> CC: Carlos Corbacho <carlos@strangeworlds.co.uk> CC: Matthew Garrett <mjg59@srcf.ucam.org> Tested-by: Matt Chen <machen@novell.com> Reviewed-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Len Brown <len.brown@intel.com>
OpenPOWER on IntegriCloud