summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86
AgeCommit message (Collapse)AuthorFilesLines
2011-10-24asus-laptop: fix module descriptionCorentin Chary1-4/+4
Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24asus-laptop: hide leds on Pegatron LucidCorentin Chary1-0/+7
Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24asus-laptop: Pegatron Lucid accelerometerAndy Ross2-5/+133
Support the built-in accelerometer on the Lucid tablets as a standard 3-axis input device. Signed-off-by: Andy Ross <andy.ross@windriver.com> Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24asus-laptop: allow boot time control of Pegatron ALS sensorAndy Ross1-1/+7
Signed-off-by: Andy Ross <andy.ross@windriver.com> Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24Platform: samsung_laptop: add support for X520 machines.Tommaso Massimi1-0/+9
my samsung laptop would be very happy if you add these lines to the file drivers/platform/x86/samsung-laptop.c Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24platform: samsung_laptop: add dmi information for Samsung R700 laptopsStefan Beller1-0/+9
My DMI model is this: >dmesg |grep DMI [ 0.000000] DMI present. [ 0.000000] DMI: SAMSUNG ELECTRONICS CO., LTD. SR700/SR700, BIOS 04SR 02/20/2008 adding dmi information of Samsung R700 laptops This adds the dmi information of Samsungs R700 laptops. Signed-off-by: Stefan Beller <stefanbeller@googlemail.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24hp_accel: Add axis-mapping for HP ProBook / EliteBookTakashi Iwai1-0/+4
Add the corrected axis-mapping for some HP laptops. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24hp_accel: Add a new PNP idTakashi Iwai1-0/+1
New HP laptops assign a new PNP id "HPQ6000" for DriveGuard. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24WMI: properly cleanup devices to avoid crashesDmitry Torokhov1-1/+5
We need to remove devices that we destroy from the list, otherwise we'll crash if there are more than one "_WDG" methods in DSDT. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=32052 Tested-by: Ilya Tumaykin <librarian_rus@yahoo.com> Cc: stable@kernel.org Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24ideapad: remove sysfs node for cfgIke Panhc1-12/+0
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 Panhc1-0/+152
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 Panhc1-2/+19
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 Panhc1-4/+3
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 Panhc1-16/+41
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-24intel_scu_ipcutil: fix major device number handlingKirill A. Shutemov1-2/+6
We need to save major device number to be able to use it for unregister_chrdev() in ipc_module_exit(). ipc_module_init() must return 0 on success, not major device number. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.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 Bollford1-0/+2
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-10-24acer-wmi: check wireless capability flag before register rfkillLee, Chun-Yi1-22/+42
There will be better to check the wireless capability flag (ACER_CAP_WIRELESS) before register wireless rfkill because maybe the machine doesn't have wifi module or the module removed by user. Tested on Acer Travelmate 8572 Tested on Acer Aspire 4739Z Tested-by: AceLan Kao <acelan.kao@canonical.com> 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> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24platform-drivers-x86: asus-laptop: fix wrong test for successful registered ↵Axel Lin1-6/+6
led_classdev device_create returns &struct device pointer on success, or ERR_PTR() on error. Thus if led_classdev_register fails, led_cdev->dev is always not NULL. Thus to unregister a successful registered led_classdev, we should check IS_ERR_OR_NULL macro for led_cdev->dev instead of checking if led_cdev->dev is NULL or not. we use IS_ERR_OR_NULL instead of IS_ERR because if we havn't call led_classdev_register, the led_cdev->dev is NULL. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24platform-drivers-x86: asus-wmi: fix resource leak in asus_wmi_led_exitAxel Lin1-1/+3
This patch fixes wrong test for successful registered led_classdev, and also fixes a leak due to missing led_classdev_unregister call for asus->kbd_led in asus_wmi_led_exit. device_create returns &struct device pointer on success, or ERR_PTR() on error. Thus if led_classdev_register fails, led_cdev->dev is always not NULL. Thus to unregister a successful registered led_classdev, we should check (!IS_ERR_OR_NULL(asus->tpd_led.dev)) instead of (asus->tpd_led.dev). we use IS_ERR_OR_NULL instead of IS_ERR because if we havn't call led_classdev_register, the led_cdev->dev is NULL. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24platform-drivers-x86: eeepc-laptop: fix wrong test for successful registered ↵Axel Lin1-1/+1
led_classdev device_create returns &struct device pointer on success, or ERR_PTR() on error. Thus if led_classdev_register fails, led_cdev->dev is always not NULL. If IS_ERR(eeepc->tpd_led.dev) is ture, it means led_classdev_register fails. If (asus->tpd_led.dev) is NULL, it means we call eeepc_led_exit before calling led_classdev_register for &eeepc->tpd_led. We only want to call led_classdev_unregister for sucessfully registered led_classdev, then we should check (!IS_ERR_OR_NULL(eeepc->tpd_led.dev)). Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24asus-laptop: Pegatron Lucid ALS sensorAndy Ross1-5/+75
Ambient light sensor for Pegatron Lucid. Supports pre-existing ls_switch sysfs interface to en/disable automatic control, and exports the brightness from the device as "ls_value". Signed-off-by: Andy Ross <andy.ross@windriver.com> Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24asus-laptop: Platform detection for Pegatron LucidAndy Ross2-10/+29
Recognize the Pegatron Lucid tablets by their method signatures. Signed-off-by: Andy Ross <andy.ross@windriver.com> Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24Platform: Detect samsung laptop quirk when initial level is zeroJohn Serock1-2/+8
This patch depends on the "Platform: Brightness quirk for samsung laptop driver" patch from Jason Stubbs. This patch adds a check for an initial brightness level of 0; if the level is 0, this patch changes the brightness level to 1 before the driver attempts to detect the brightness quirk. The Samsung N150 netbook experiences the brightness quirk. Without Jason's patch, the only brightness levels available on the N150 are 0, 1, and 8. This patch ensures that, when the initial brightness level is 0, the samsang-laptop driver detects the brightness quirk on the N150, thereby making brightness levels 0 through 8 available. Signed-off-by: John Serock <john.serock@gmail.com> Acked-by: Jason Stubbs <jasonbstubbs@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24acer-wmi: Add wireless quirk for Lenovo 3000 N200Seth Forshee1-0/+9
This quirk fixes the wlan rfkill status on this machine. Without it, wlan is permanently soft blocked whenever acer-wmi is loaded. BugLink: https://bugs.launchpad.net/bugs/857297 Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Reviewed-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24dell-laptop: support Synaptics/Alps touchpad ledAceLan Kao1-0/+84
This patch supports Dell laptop with Synaptics and Alps touchpad chip that with LED to indicate the functionality of touchpad is disabled or enabled. The command for touchpad LED is 0x97, and the data 1 means turn on the touchpad LED, 2 means turn it off. BTW, I add dell_quirks to white list those machines that supports this behavior, so that the code won't affect those who don't have a touchpad LED machine. We can easily to turn it on/off by echo 1 > /sys/class/leds/dell-laptop::touchpad/brightness echo 0 > /sys/class/leds/dell-laptop::touchpad/brightness Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24topstar-latop: ignore 0x82 eventManuel Lauss1-0/+1
Event 0x82 is emitted whenever a backlight event happens (brightness change, backlight on/off). For instance, when display is switched off after a timeout, event 0x82 is emitted, and along with it a keypress which switches the display back on again. This patch adds 0x82 to the event ignore list so that the display stays off when it is automatically switched off. Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24toshiba_acpi: Initialize brightness in backlight deviceSeth Forshee1-0/+1
Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24toshiba_acpi: Don't add devices for unsupported featuresSeth Forshee1-35/+67
Test for features up-front to determine whether or not they are supported, and avoid creating devices and proc files for unsupported features. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24toshiba_acpi: Support SPFC as an HCI methodSeth Forshee1-6/+22
Some Toshiba models, notably those with the TOS1900 device, use the SPFC method for HCI calls instead of GHCI. Test for this method if GHCI isn't found, and if it exists use it for all HCI calls. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24toshiba_acpi: Use handle for HCI callsSeth Forshee1-40/+15
Now that we're using an acpi driver we already have a handle to the namespace of the HCI call, so there's no need to test various paths to the HCI call or even be aware of the path at all. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24toshiba_acpi: Fix up return codesSeth Forshee1-25/+20
Many routines are returning success on failure, and those that are indicating failure frequently return incorrect error codes. Fix these up throughout the driver. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24toshiba_acpi: Convert to use acpi_driverSeth Forshee1-245/+261
Changes toshiba_acpi to register an acpi driver and eliminates the platform device it was using. Also eliminates most global variables, moving them into toshiba_acpi_dev, along with some other miscellaneous fixes and cleanup. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24Platform: fix samsung-laptop DMI identification for N220 modelRaul Gutierrez Segales1-0/+10
This is a follow-up for commit 78a7539b, which didn't cover the Samsung N220 laptop. With this backlight brightness works nicely on the N220 netbook. Signed-off-by: Raul Gutierrez Segales <rgs@collabora.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24Platform: Samsung laptop DMI info for NC210/NC110Jason Stubbs1-0/+9
This patch just adds the DMI info for the samsung laptop driver to work with the NC210/NC110. It needs the brightness quirk patch for proper support. Signed-off-by: Jason Stubbs <jasonbstubbs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24Platform: Brightness quirk for samsung laptop driverJason Stubbs1-0/+43
On some Samsung laptops the brightness regulation works slightly different. All SABI commands except for set_brightness work as expected. The behaviour of set_brightness is as follows: - Setting a new brightness will only step one level toward the new brightness level. For example, setting a level of 5 when the current level is 2 will result in a brightness level of 3. - A spurious KEY_BRIGHTNESS_UP or KEY_BRIGHTNESS_DOWN event is also generated along with the change in brightness. - Neither of the above two issues occur when changing from/to brightness level 0. This patch adds detection and a non-intrusive workaround for the above issues. Signed-off-by: Jason Stubbs <jasonbstubbs@gmail.com> Tested-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24Platform: Fix error path in samsung-laptop initDavid Herrmann1-2/+1
samsung_init() should not return success if not all devices are initialized. Otherwise, samsung_exit() will dereference sdev NULL pointers and others. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24platform: samsung_laptop: fix samsung brightness min/max calculationsJason Stubbs1-3/+6
The min_brightness value of the sabi_config is incorrectly used in brightness calculations. For the config where min_brightness = 1 and max_brightness = 8, the user visible range should be 0 to 7 with hardware being set in the range of 1 to 8. What is actually happening is that the user visible range is 0 to 8 with hardware being set in the range of -1 to 7. This patch fixes the above issue as well as a miscalculation that would occur in the case of min_brightness > 1. Signed-off-by: Jason Stubbs <jasonbstubbs@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24Platform: samsung_laptop: samsung backlight for R528/R728Smelov Andrey1-0/+9
patch works for me, but I need to add "acpi_backlight=vendor" to kernel params Signed-off-by: Smelov Andrey <xor29a@bk.ru> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05acer-wmi: support Lenovo ideapad S205 wifi switchLee, Chun-Yi1-2/+26
The AMW0 function in acer-wmi works on Lenovo ideapad S205 for control the wifi hardware state. We also found there have a 0x78 EC register exposes the state of wifi hardware switch on the machine. So, add this patch to support Lenovo ideapad S205 wifi hardware switch in acer-wmi driver. Reference: bko#37892 https://bugzilla.kernel.org/show_bug.cgi?id=37892 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> Cc: Thomas Renninger <trenn@suse.de> Tested-by: Florian Heyer <heyho@flanto.de> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05acerhdf.c: spaces in aliased changed to *Anton V. Boyarshinov1-6/+6
It seems that aliases shouldn't contain spaces, as module-init-tools uses them as delimeters in module.alias file Signed-off-by: Anton V. Boyarshinov <boyarsh@altlinux.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05platform-drivers-x86: ideapad-laptop: add missing ideapad_input_exit in ↵Axel Lin1-1/+2
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-05x86 driver: fix typo in TDP override enablingJesse Barnes1-2/+2
When enabling turbo, we need to set both the TDC and TDP bits. IIRC only the TDC one actually matters, but fix it up anyway since the current code is confusing. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05Platform: fix samsung-laptop DMI identification for N150/N210/220/N230Thomas Courbon1-0/+10
Some samsung latop of the N150/N2{10,20,30} serie are badly detected by the samsung-laptop platform driver, see bug # 36082. It appears that N230 identifies itself as N150/N210/N220/N230 whereas the other identify themselves as N150/N210/220. This patch attemtp fix #36082 allowing correct identification for all the said netbook model. Reported-by: Daniel Eklöf <daniel@ekloef.se> Signed-off-by: Thomas Courbon <thcourbon@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05dell-wmi: Add keys for Dell XPS L502XSeth Forshee1-0/+10
All of these keys are being reported on the keyboard controller but are also generating WMI events. Add them to the legacy keymap to silence the noise. BugLink: http://bugs.launchpad.net/bugs/815914 Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05platform-drivers-x86: samsung-q10: make dmi_check_callback return 1Axel Lin1-1/+1
We only care about if there is any successful match from the dmi table or no match at all, we can make dmi_check_system return immediately if we have a successful match instead of iterate thorough the whole table. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05Platform: Samsung Q10 backlight driverFrederick van der Wyck3-0/+205
This adds backlight control on the Samsung Q10 laptop, which does not support the SABI interface. Also tested successfully on the Dell Latitude X200. Signed-off-by: Frederick van der Wyck <fvanderwyck@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05platform-drivers-x86: intel_scu_ipc: convert to DEFINE_PCI_DEVICE_TABLEAxel Lin1-1/+1
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05platform-drivers-x86: intel_rar_register: convert to DEFINE_PCI_DEVICE_TABLEAxel Lin1-3/+1
And also remove unused variable 'my_id_table'. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05platform-drivers-x86: intel_menlow: add missing return AE_OK for ↵Axel Lin1-0/+2
intel_menlow_register_sensor() Otherwise, the error path will always be executed. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05platform-drivers-x86: intel_mid_thermal: fix memory leakAxel Lin1-7/+19
The memory for td_info which is allocated in initialize_sensor() should be properly kfreed in mid_thermal_probe() error patch and mid_thermal_remove(). Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>