summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/msi-laptop.c
AgeCommit message (Collapse)AuthorFilesLines
2023-07-25platform/x86: msi-laptop: Fix rfkill out-of-sync on MSI Wind U100Maxim Mikityanskiy1-4/+4
Only the HW rfkill state is toggled on laptops with quirks->ec_read_only (so far only MSI Wind U90/U100). There are, however, a few issues with the implementation: 1. The initial HW state is always unblocked, regardless of the actual state on boot, because msi_init_rfkill only sets the SW state, regardless of ec_read_only. 2. The initial SW state corresponds to the actual state on boot, but it can't be changed afterwards, because set_device_state returns -EOPNOTSUPP. It confuses the userspace, making Wi-Fi and/or Bluetooth unusable if it was blocked on boot, and breaking the airplane mode if the rfkill was unblocked on boot. Address the above issues by properly initializing the HW state on ec_read_only laptops and by allowing the userspace to toggle the SW state. Don't set the SW state ourselves and let the userspace fully control it. Toggling the SW state is a no-op, however, it allows the userspace to properly toggle the airplane mode. The actual SW radio disablement is handled by the corresponding rtl818x_pci and btusb drivers that have their own rfkills. Tested on MSI Wind U100 Plus, BIOS ver 1.0G, EC ver 130. Fixes: 0816392b97d4 ("msi-laptop: merge quirk tables to one") Fixes: 0de6575ad0a8 ("msi-laptop: Add MSI Wind U90/U100 support") Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com> Link: https://lore.kernel.org/r/20230721145423.161057-1-maxtram95@gmail.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2022-10-03platform/x86: use PLATFORM_DEVID_NONE instead of -1Barnabás Pőcze1-1/+1
Use the `PLATFORM_DEVID_NONE` constant instead of hard-coding -1 when creating a platform device. No functional changes are intended. Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com> Link: https://lore.kernel.org/r/20220930104857.2796923-1-pobrn@protonmail.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2022-09-19platform/x86: msi-laptop: Change DMI match / alias strings to fix module ↵Hans de Goede1-5/+3
autoloading On a MSI S270 with Fedora 37 x86_64 / systemd-251.4 the module does not properly autoload. This is likely caused by issues with how systemd-udevd handles the single quote char (') which is part of the sys_vendor / chassis_vendor strings on this laptop. As a workaround remove the single quote char + everything behind it from the sys_vendor + chassis_vendor matches. This fixes the module not autoloading. Link: https://github.com/systemd/systemd/issues/24715 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220917210407.647432-1-hdegoede@redhat.com
2022-08-26platform/x86: msi-laptop: Add msi_scm_disable_hw_fn_handling() helperHans de Goede1-9/+8
Add a msi_scm_disable_hw_fn_handling() to remove the duplicate code for this in the resume and init paths. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220826111453.178962-2-hdegoede@redhat.com
2022-08-26platform/x86: msi-laptop: Add msi_scm_model_exit() helperHans de Goede1-16/+13
The probe-error-exit and remove paths both duplicate the exact same code to undo load_scm_model_init(). Add a helper for this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220826111453.178962-1-hdegoede@redhat.com
2022-08-26platform/x86: msi-laptop: Fix resource cleanupHans de Goede1-0/+3
Fix the input-device not getting free-ed on probe-errors and fix the msi_touchpad_dwork not getting cancelled on neither probe-errors nor on remove. Fixes: 143a4c0284dc ("msi-laptop: send out touchpad on/off key") Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220825141336.208597-3-hdegoede@redhat.com
2022-08-26platform/x86: msi-laptop: Simplify ec_delay handlingHans de Goede1-20/+11
There is no reason to have both non-delayed and delayed work structs for the rfkill and touchpad work. Instead simply call schedule_delayed_work() with a delay of 0 for the quirks->ec_delay == false case. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220825141336.208597-2-hdegoede@redhat.com
2022-08-26platform/x86: msi-laptop: Fix old-ec check for backlight registeringHans de Goede1-2/+1
Commit 2cc6c717799f ("msi-laptop: Port to new backlight interface selection API") replaced this check: if (!quirks->old_ec_model || acpi_video_backlight_support()) pr_info("Brightness ignored, ..."); else do_register(); With: if (quirks->old_ec_model || acpi_video_get_backlight_type() == acpi_backlight_vendor) do_register(); But since the do_register() part was part of the else branch, the entire condition should be inverted. So not only the 2 statements on either side of the || should be inverted, but the || itself should be replaced with a &&. In practice this has likely not been an issue because the new-ec models (old_ec_model==false) likely all support ACPI video backlight control, making acpi_video_get_backlight_type() return acpi_backlight_video turning the second part of the || also false when old_ec_model == false. Fixes: 2cc6c717799f ("msi-laptop: Port to new backlight interface selection API") Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220825141336.208597-1-hdegoede@redhat.com
2022-08-26platform/x86: msi-laptop: Drop MSI_DRIVER_VERSIONHans de Goede1-7/+0
Modules carrying there own version is a practice which the kernel has stopped doing for a long time now, drop it. While dropping the version pr_info from msi_init() lets remove the somewhat useless pr_info() from msi_cleanup() as well. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220822150818.45765-2-hdegoede@redhat.com
2022-08-26platform/x86: msi-laptop: Use MODULE_DEVICE_TABLE()Hans de Goede1-11/+1
Use MODULE_DEVICE_TABLE() instead of manually adding a bunch of MODULE_ALIAS() statements. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220822150818.45765-1-hdegoede@redhat.com
2019-05-21treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1Thomas Gleixner1-14/+1
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 51 franklin street fifth floor boston ma 02110 1301 usa this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option [no]_[pad]_[ctrl] any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 51 franklin street fifth floor boston ma 02110 1301 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 176 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Jilayne Lovejoy <opensource@jilayne.com> Reviewed-by: Steve Winslow <swinslow@gmail.com> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190519154040.652910950@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-14dmi: Mark all struct dmi_system_id instances constChristoph Hellwig1-1/+1
... and __initconst if applicable. Based on similar work for an older kernel in the Grsecurity patch. [JD: fix toshiba-wmi build] [JD: add htcpen] [JD: move __initconst where checkscript wants it] Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jean Delvare <jdelvare@suse.de>
2017-07-01platform/x86: msi-laptop: constify msipf*_attribute_groupArvind Yadav1-2/+2
File size before: text data bss dec hex filename 5396 5016 85 10497 2901 drivers/platform/x86/msi-laptop.o File size After adding 'const': text data bss dec hex filename 5524 4888 85 10497 2901 drivers/platform/x86/msi-laptop.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-03-15platform/x86: msi-laptop: remove sparse_keymap_free() callsMichał Kępień1-11/+3
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). As this reduces msi_laptop_input_destroy() to one line, replace all calls to that function with direct calls to input_unregister_device(). Signed-off-by: Michał Kępień <kernel@kempniu.pl> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2015-06-19msi-laptop: Port to new backlight interface selection APIHans de Goede1-3/+3
Port the backlight selection logic to the new backlight interface selection API. This commit also removes various obsolete pr_xxx messages related to backlight interface selection. These are obsolete because they assume there is only a vendor or acpi backlight driver and no other choice. Also they are not necessary, if the user wants to know which backlight interfaces are registered a simple "ls /sys/class/backlight" suffices. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-12-19Merge tag 'platform-drivers-x86-v3.19-1' of ↵Linus Torvalds1-1/+1
git://git.infradead.org/users/dvhart/linux-platform-drivers-x86 Pull x86 platform driver update from Darren Hart: - thinkpad-acpi: Switch to software mute, cleanups - acerhdf: Bang-bang thermal governor, new models, cleanups - dell-laptop: New keyboard backlight support and documentation - toshiba_acpi: Keyboard backlight updates, hotkey handling - dell-wmi: Keypress filtering, WMI event processing - eeepc-laptop: Multiple cleanups, improved error handling, documentation - hp_wireless: Inform the user if hp_wireless_input_setup()/add() fails - misc: Code cleanups, quirks, various new IDs * tag 'platform-drivers-x86-v3.19-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: (33 commits) platform/x86/acerhdf: Still depends on THERMAL Documentation: Add entry for dell-laptop sysfs interface acpi: Remove _OSI(Linux) for ThinkPads thinkpad-acpi: Try to use full software mute control acerhdf: minor clean up acerhdf: added critical trip point acerhdf: Use bang-bang thermal governor acerhdf: Adding support for new models acerhdf: Adding support for "manual mode" dell-smo8800: Add more ACPI ids and change description of driver platform: x86: dell-laptop: Add support for keyboard backlight toshiba_acpi: Add keyboard backlight mode change event toshiba_acpi: Change notify funtion to handle more events toshiba_acpi: Move hotkey enabling code to its own function dell-wmi: Don't report keypresses on keybord illumination change dell-wmi: Don't report keypresses for radio state changes hp_wireless: Inform the user if hp_wireless_input_setup()/add() fails toshiba-acpi: Add missing ID (TOS6207) Sony-laptop: Deletion of an unnecessary check before the function call "pci_dev_put" platform: x86: Deletion of checks before backlight_device_unregister() ...
2014-11-19drivers: platform: change 0x20 to I8042_STR_AUXDATA in i8042 filtersGiedrius Statkevičius1-1/+1
Instead of using a magic constant 0x20 in some drivers to get data only from the KBC port we should use the constant defined in i8042.h with the same value. Also, this makes these drivers uniform with what constant the only other filter function uses in drivers/input/misc/ideapad_slidebar.c. Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-10-20platform: x86: drop owner assignment from platform_driversWolfram Sang1-1/+0
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-07-10x86: msi-laptop: fix memleakLibo Chen1-14/+10
1. fix two visible mistakes: * when load_scm_model_init faild, we should call platform_device_del(msipf_device) * msipf_attribute_group should be remove in err case 2. change some tags, give them real meaning. Signed-off-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-25msi-laptop: Disable brightness control for new ECMaxim Mikityanskiy1-12/+27
It seems that existing brightness control works only for old EC models. On newer ones auto_brightness access always timeouts and lcd_level always shows 0. So disable brightness control for new EC models. It works fine with ACPI video driver anyway. Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-25msi-laptop: Add MSI Wind U90/U100 supportMaxim Mikityanskiy1-2/+121
Add MSI Wind U90/U100 to DMI table and add some missing EC features support such as basic fan control, turbo and ECO modes and touchpad state. Tested on MSI Wind U100. Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-25msi-laptop: merge quirk tables to oneLee, Chun-Yi1-69/+127
This patch introduced a quirk_entry struct, then we merged all quirk tables to msi_dmi_table. Then we can more easily to set different quirk attributes for different machine. Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Changed this patch so that it could be applied before MSI Wind U100 support patch. Changed rfkill logic for ec_read_only quirk support. Removed delays if ec_delay = false. Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com> Acked-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-25msi-laptop: Work around gcc warningMaxim Mikityanskiy1-2/+2
Assign initial value to variable in order to prevent gcc warning about uninitialized variable. Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-25msi-laptop: Use proper return codes instead of -1Maxim Mikityanskiy1-6/+6
Use proper function return codes instead of -1 Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2012-08-10platform / x86 / PM: Fix unused function warnings for CONFIG_PM_SLEEPRafael J. Wysocki1-0/+4
According to compiler warnings, quite some suspend/resume functions in platform x86 drivers are not used for CONFIG_PM_SLEEP unset, so add #ifdefs to prevent them from being built in that case. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-07-06msi-laptop: Use struct dev_pm_ops for power managementRafael J. Wysocki1-3/+4
Make the msi-laptop driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct platform_driver. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Lee, Chun-Yi <jlee@suse.com>
2012-01-13module_param: make bool parameters really bool (drivers & misc)Rusty Russell1-1/+1
module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-08-05msi-laptop: add MSI U270 netbook to module alias and scm listLee, Chun-Yi1-0/+10
After test, msi-laptop driver also can support MSI U270 netbook. So, add MSI U270's dmi information to module alias and scm table for support this machine. Tested on MSI U270 netbook. Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-05-29Merge branch 'for_linus' of ↵Linus Torvalds1-6/+5
git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86: (43 commits) acer-wmi: support integer return type from WMI methods msi-laptop: fix section mismatch in reference from the function load_scm_model_init acer-wmi: support to set communication device state by new wmid method acer-wmi: allow 64-bits return buffer from WMI methods acer-wmi: check the existence of internal 3G device when set capability platform/x86:delete two unused variables support wlan hotkey on Acer Travelmate 5735Z platform-x86: intel_mid_thermal: Fix memory leak platform/x86: Fix Makefile for intel_mid_powerbtn platform/x86: Simplify intel_mid_powerbtn acer-wmi: Delete out-of-date documentation acerhdf: Clean up includes acerhdf: Drop pointless dependency on THERMAL_HWMON acer-wmi: Update MAINTAINERS wmi: Orphan ACPI-WMI driver tc1100-wmi: Orphan driver acer-wmi: does not allow negative number set to initial device state platform/oaktrail: ACPI EC Extra driver for Oaktrail thinkpad_acpi: Convert printks to pr_<level> thinkpad_acpi: Correct !CONFIG_THINKPAD_ACPI_VIDEO warning ...
2011-05-29Merge branch 'ec-cleanup' into releaseLen Brown1-6/+6
Conflicts: drivers/platform/x86/compal-laptop.c
2011-05-27msi-laptop: fix section mismatch in reference from the function ↵Lee, Chun-Yi1-1/+1
load_scm_model_init There have section mismatch warning message shows up when building the kernel with make CONFIG_DEBUG_SECTION_MISMATCH=y. The problem is the load_scm_model_init() calls msi_laptop_input_setup() which is an __init function, but load_scm_model_init() lacks a __init annotation. This patch add __init on load_scm_model_init() to avoid warning message. Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-05-27msi-laptop: pr_<level> neateningJoe Perches1-5/+4
Just making it a bit more like other logging message uses. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-04-01ACPI EC: remove dead codeThomas Renninger1-6/+6
static void acpi_ec_gpe_query(void *ec_cxt); -> The function is right above this declaration -> not needed. poll_force is also not used, cleaned up in ec.c and its users: compal-laptop and msi-laptop. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2011-03-28msi-laptop: use pr_<level> for messagesJoey Lee1-7/+7
msi-laptop: use pr_<level> for messages Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-03-28msi-laptop: send out touchpad on/off keyLee, Chun-Yi1-2/+79
MSI BIOS's raw behavior is send out KEY_TOUCHPAD_TOGGLE key when user pressed touchpad hotkey. Actually, we can capture the real touchpad status by read 0xE4 EC address on MSI netbook/notebook. So, add msi-laptop input device for send out KEY_TOUCHPAD_ON or KEY_TOUCHPAD_OFF key when user pressed Fn+F3 touchpad hotkey. It leave userland applications to know the real touchpad status. Tested on MSI netbook U-100, U-115, U160(N051), U160DX, N014, N034 Tested on MSI notebook CR620 Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-03-23backlight: add backlight typeMatthew Garrett1-0/+1
There may be multiple ways of controlling the backlight on a given machine. Allow drivers to expose the type of interface they are providing, making it possible for userspace to make appropriate policy decisions. Signed-off-by: Matthew Garrett <mjg@redhat.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: David Airlie <airlied@linux.ie> Cc: Alex Deucher <alexdeucher@gmail.com> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Len Brown <lenb@kernel.org> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-03msi-laptop: make struct rfkill_ops constAxel Lin1-3/+3
rfkill uses a const struct rfkill_ops pointer. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Matthew Garrett <mjg@redhat.com> Cc: Lennart Poettering <mzxreary@0pointer.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-03compal-laptop/fujitsu-laptop/msi-laptop: make dmi_check_cb to return 1 ↵Axel Lin1-1/+1
instead of 0 dmi_check_system() walks the table running matching functions until someone returns non zero or we hit the end. This patch makes dmi_check_cb to return 1 so dmi_check_system() return immediately when a match is found. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au> Cc: Matthew Garrett <mjg@redhat.com>a Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-05-20Move N014, N051 and CR620 dmi information to load scm dmi tableLee, Chun-Yi1-15/+15
Found the N014, N051 and CR620 are must the same with N034 there are load scm serial model. So, this patch move N014, N051 and CR620 dmi information to right dmi table: msi_load_scm_models_dmi_table[] Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
2010-05-20Clean up all objects used by scm model when driver initial fail or exitLee, Chun-Yi1-3/+10
Clean up i8042 filter, rfkill and cancel delayed work when msi-laptop driver initial fail or exit on MSI scm model. Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
2010-05-20msi-laptop: fix up some coding style issues found by checkpatchGreg Kroah-Hartman1-13/+24
Cc: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20msi-laptop: Add i8042 filter to sync sw state with BIOS when function key ↵Lee, Chun-Yi1-1/+58
pressed There have some MSI netbook change devices state by EC when user press wlan/bluetooth/wwan function keys. So, add a i8042 filter to sync sw state with BIOS when function keys pressed. Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20msi-laptop: Set rfkill init state when msi-laptop intiialLee, Chun-Yi1-0/+24
Setup Wlan/Bluetooth/3G rfkill initial state to sync with the hardware state from EC 0x2e address. Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20msi-laptop: Add MSI CR620 notebook dmi information to scm models tableLee, Chun-Yi1-0/+10
Add new MSI notebook CR620 dmi information to scm models table. Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20msi-laptop: Add N014 N051 dmi information to scm models tableLee, Chun-Yi1-0/+22
Add new MSI netbook N014 and N051 dmi information to scm models table. Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-16backlight: Allow properties to be passed at registrationMatthew Garrett1-2/+5
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>
2010-03-08msi-laptop: Detect 3G device exists by standard ec commandLee, Chun-Yi1-10/+34
Detect 3G device exists by standard ec command. Driver will not create the threeg sysfs file and threeg rfkill interface if there have no internal 3G device in MSI notebook/netbook. Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Cc: Lennart Poettering <mzxreary@0pointer.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-08msi-laptop: Add resume method for set the SCM load againLee, Chun-Yi1-1/+25
Implement the resume method for set the load SCM flag after system reusme. Without this patch, the wifi function key on SCM model will back to BIOS control mode then confuse with the userland software control. e.g. MSI N034 Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Cc: Lennart Poettering <mzxreary@0pointer.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-08msi-laptop: Support some MSI 3G netbook that is need load SCMLee, Chun-Yi1-0/+238
Some MSI 3G netbook only have one fn key to control Wlan/Bluetooth/3G, those netbook will load the SCM (windows app) to disable the original Wlan/Bluetooth control by BIOS when user press fn key, then control Wlan/Bluetooth/3G by SCM (software control by OS). Without SCM, user cann't on/off 3G module on those 3G netbook. On Linux, msi-laptop driver will do the same thing to disable the original BIOS control, then might need use HAL or other userland application to do the software control that simulate with SCM. e.g. MSI N034 netbook Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Cc: Lennart Poettering <mzxreary@0pointer.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-08msi-laptop: Add threeg sysfs file for support query 3G state by standard ↵Lee, Chun-Yi1-1/+30
66/62 ec command Add threeg sysfs file for support query 3G state by standard 66/62 ec command, the MSI standard ec interface supported this feature. Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Cc: Lennart Poettering <mzxreary@0pointer.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>