aboutsummaryrefslogtreecommitdiff
path: root/drivers/platform/x86/ideapad-laptop.c
AgeCommit message (Collapse)Author
2013-05-08Add support for fan button on Ideapad Z580Maxim Mikityanskiy
The patch adds support for fan control button on Ideapad Z580. This is the same button as on Z570, but it raises different bit in VPCCMD_R_SPECIAL_BUTTONS. Also add message to dmesg when unknown button press detected, it will help adding support for new special buttons. Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com> Tested-by: Ivan Vojtko <nekroman.sk@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-01-26ACPI: Remove useless type argument of driver .remove() operationRafael J. Wysocki
The second argument of ACPI driver .remove() operation is only used by the ACPI processor driver and the value passed to that driver through it is always available from the given struct acpi_device object's removal_type field. For this reason, the second ACPI driver .remove() argument is in fact useless, so drop it. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Jiang Liu <jiang.liu@huawei.com> Acked-by: Toshi Kani <toshi.kani@hp.com> Acked-by: Yinghai Lu <yinghai@kernel.org>
2013-01-03Drivers: platform: x86: remove __dev* attributes.Greg Kroah-Hartman
CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Joey Lee <jlee@novell.com> Cc: Matthew Garrett <mjg@redhat.com> Cc: Peter Feuerer <peter@piie.net> Cc: Corentin Chary <corentin.chary@gmail.com> Cc: Cezary Jackiewicz <cezary.jackiewicz@gmail.com> Cc: Robert Gerlach <khnz@gmx.de> Cc: Ike Panhc <ike.pan@canonical.com> Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-21ideapad: convert to module_acpi_driver()Mika Westerberg
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-08-20ideapad: add Lenovo IdeaPad Z570 support (part 3)Maxim Mikityanskiy
The patch adds support for Lenovo IdeaPad Z570 laptop. It makes all special keys working, adds possibility to control fan like Windows does, controls Touchpad Disabled LED, toggles touchpad state via keyboard controller and corrects touchpad behavior on resume from suspend. It is new, modified version of patch. Now it does not depend on psmouse and does not need patching of input subsystem. Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com> This is the part 3 for fan control Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-08-20ideapad: add Lenovo IdeaPad Z570 support (part 2)Maxim Mikityanskiy
The patch adds support for Lenovo IdeaPad Z570 laptop. It makes all special keys working, adds possibility to control fan like Windows does, controls Touchpad Disabled LED, toggles touchpad state via keyboard controller and corrects touchpad behavior on resume from suspend. It is new, modified version of patch. Now it does not depend on psmouse and does not need patching of input subsystem. Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com> This is part 2 for touchpad toggle Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-08-20ideapad: add Lenovo IdeaPad Z570 support (part 1)Maxim Mikityanskiy
The patch adds support for Lenovo IdeaPad Z570 laptop. It makes all special keys working, adds possibility to control fan like Windows does, controls Touchpad Disabled LED, toggles touchpad state via keyboard controller and corrects touchpad behavior on resume from suspend. It is new, modified version of patch. Now it does not depend on psmouse and does not need patching of input subsystem. Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com> This is part 1 for special button handling. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-06-26ideapad: uninitialized data in ideapad_acpi_add()Dan Carpenter
We only initialize the high bits of "cfg". It probably doesn't cause a problem given that this is platform specific code and doesn't have to worry about endianness etc. But it's sort of messy. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31ideapad: generate valid key event onlyIke Panhc
Otherwise will generate KEY_UNKNOWN on un-listed vpc event, which means nothing and is hard for user to report the detail of the event. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31ideapad: remove unused define and fix a typoIke Panhc
After review the current ideapad-laptop, found an unused define and a typo. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-01-03switch ->is_visible() to returning umode_tAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-10-24ideapad: remove sysfs node for cfgIke Panhc
Replaced by the one in debugfs. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24ideapad: add debugfs supportIke Panhc
Add two nodes in debugfs which shows cfg value and its meaning, and status info read from VPC2004. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24ideapad: add event for Novo keyIke Panhc
Novo key is the Lenovo define key on every ideapads, which has two definition. Long press and short click. Driver will report KEY_PROG1 on short click and KEY_PROG2 when long press. On pre-install OS for ideapads there are application waiting for the event and there is no such application for Linux yet, so I think to report KEY_PROG is fine in anyway. Also change the scancode from hex to decimal because they are related to vpc bit in notify function which is in decimal. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24ideapad: change parameter of ideapad_sync_rfk_stateIke Panhc
This could save us a local variable. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24ideapad: define vpc commandsIke Panhc
Better then write hex number everywhere. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24[PATCH] ideapad: Check if acpi already handle backlight power to avoid a ↵Rene Bollford
page fault This patch avoid a page fault in the ideapad-laptop extras when turning the backlight power on or off. Signed-off-by: Rene Bolldorf <xsecute@googlemail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05platform-drivers-x86: ideapad-laptop: add missing ideapad_input_exit in ↵Axel Lin
ideapad_acpi_add error path In the case of ideapad_backlight_init() failure, we need to free the resources allocated by ideapad_input_init(). Aslo drop __devexit annotation for ideapad_input_exit() because we also call it in ideapad_acpi_add() error path. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05ideapad: add backlight driverIke Panhc
When acpi_backlight=vendor in cmdline or no backlight support in acpi video device, ideapad-laptop will register backlight device and control brightness and backlight power via the command in VPC2004. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05ideapad: let camera_power node invisiable if no cameraIke Panhc
Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05ideapad: define cfg bits and create sysfs node for cfgIke Panhc
Create /sys/devices/platform/ideapad/cfg for showing cfg value. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-05-27ideapad-laptop: Add pr_fmtJoe Perches
Add pr_fmt to prefix logging messages. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-03-11ideapad: read brightness setting on brightness key notifyIke Panhc
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=25922 On ideapad Y530, the brightness key notify will be blocked if the last notify is not responsed by getting the brightness value. Read value when we get the notify shall fix the problem and will not have any difference on other ideapads. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-01-07ideapad: pass ideapad_priv as argument (part 2)Ike Panhc
Passing ideapad_priv as argument and try not to using too much global variable. This is part 2 for rfkill. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-01-07ideapad: pass ideapad_priv as argument (part 1)Ike Panhc
Passing ideapad_priv as argument and try not to using too much global variable. This is part 1 for platform driver and input device. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-01-07ideapad: add markups, unify comments and return result when initIke Panhc
1. Add markups on init and exit functions 2. Unify the comments in the same style 3. Return result when module initial Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-01-07ideapad: add hotkey supportIke Panhc
Hotkey enabled by this patch: Fn+F3: Video mode switch Fn+F5: software rfkill for wifi For some ideapad when push Fn+F3, hardware generates Super-P keys, those key will not be enabled by this patch. Thanks for Dave Hansen report the problem. If CONFIG_INPUT_SPARSEKMAP is not set, when building, you will have error message: ERROR: "sparse_keymap_setup" [drivers/platform/x86/ideapad-laptop.ko] undefined! ERROR: "sparse_keymap_free" [drivers/platform/x86/ideapad-laptop.ko] undefined! ERROR: "sparse_keymap_report_event" [drivers/platform/x86/ideapad-laptop.ko] undefined! To select INPUT_SPARSEKMAP solve this issue. Ref: http://lkml.org/lkml/2010/12/2/340 Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-01-07ideapad: let camera power control entry under platform driverIke Panhc
The entry was at /sys/devices/LNXSYSTM:00/../VPC2004:00/camera_power move to /sys/devices/platform/ideapad/camera_power Add document about usage of ideapad node in sysfs. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-01-07ideapad: add platform driver for ideapadIke Panhc
Create /sys/devices/platform/ideapad for nodes of ideapad landing. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21ideapad: Add param: no_bt_rfkillIke Panhc
Add new module parameter that force module not to register bluetooth rfkill. There is report that saying using this bluetooth rfkill to enable/disable bluetooth will let bluetooth device initial failed when enable on Lenovo ideapad S12. Fortunately there is another rfkill registered by bluetooth driver for S12 and user can shutdown the bluetooth by either bluetooth driver or HW RF switch. For dual OS user, it may have some trouble that using Linux after turning off bluetooth with another OS if we do not register bluetooth rfkill at all. So we will force bluetooth enable when no_bt_rfkill=1. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Tested-by: Mario 'BitKoenig' Holbe <Mario.Holbe@TU-Ilmenau.DE> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21ideapad: Change the driver name to ideapad-laptopIke Panhc
Since the platform drivers doing more for laptops than just using specific ACPI device. It will be good to change the name from *_acpi to *-laptop. Reference: http://lkml.org/lkml/2010/8/14/154 Signed-off-by: Ike Panhc <ike.pan@canonical.com> Acked-by: Len Brown <len.brown@intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>