aboutsummaryrefslogtreecommitdiff
path: root/drivers/platform/x86
AgeCommit message (Collapse)Author
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>
2010-10-21ideapad: rewrite the sw rfkill setIke Panhc
Control power of rf modules by ec commands Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21ideapad: rewrite the hw rfkill notifyIke Panhc
1. Read hw rfkill status by ec command 2. Not to touch sw status of each rfkill when hw rfkill notify 3. Initial rfkill status when module loaded Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21ideapad: use EC command to control cameraIke Panhc
Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21ideapad: use return value of _CFG to tell if device exist or notIke Panhc
There are several bits of the return value of _CFG shows if RF/Camera devices exist or not. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21ideapad: make sure we bind on the correct deviceIke Panhc
By reading from method _CFG to make sure we bind on the correct VPC2004 device. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21ideapad: check VPC bit before sync rfkill hw statusIke Panhc
Check VPC bit to make sure the HW rfkill is touched. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21ideapad: add ACPI helpersIke Panhc
There are two methods under VPC2004 which is used to access VDAT/VCMD of EC register. Add helpers for read and write these two registers. And add read_method_int for reading the return value from ACPI methods which requires no parameter. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21dell-laptop: Add debugfs supportKeng-Yu Lin
Export the status of RF killswitch through debugfs. The killswitch status is obtained by the SMI to BIOS. Exporting this status through debugfs can help identify the issue with the misbehaving firmware. Signed-off-by: Keng-Yu Lin <keng-yu.lin@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21WMI: embed struct device directly into wmi_blockDmitry Torokhov
Instead of creating wmi_blocks and then register corresponding devices on a separate pass do it all in one shot, since lifetime rules for both objects are the same. This also takes care of leaking devices when device_create fails for one of them. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21WMI: make use of class device's attributresDmitry Torokhov
Instead of adding modalias attribute manually set it up as class's device attribute so driver core will create and remove it for us. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21WMI: use pr_err() and friendsDmitry Torokhov
This makes source more concise and easier to read. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21WMI: use separate list head for storing wmi blocksDmitry Torokhov
Do not abuse wmi_block structure to hold the head of list of blocks, use separate list_head for that. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21WMI: simplify handling of returned WMI blocks in parse_wdg()Dmitry Torokhov
There is no reason why we allocate memory and copy data into an intermediate buffer, it is not like we are working with data coming from userspace. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21WMI: fix potential NULL pointer dereferenceDmitry Torokhov
Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21WMI: do not leak memory in parse_wdg()Dmitry Torokhov
If we _WDG returned object that is not buffer we were forgetting to free memory allocated for that object. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21WMI: fix wmi_gtoa() to actully terminate the stringDmitry Torokhov
Courtesy of sparse... Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21WMI: free wmi blocks when parse_wdg() failsDmitry Torokhov
Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21WMI: remove EC region handler when _WDG parsing failsDmitry Torokhov
Driver initialization was forgetting to remove EC address space handler in cases when parse_wdg() method failed. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21asus-laptop: use attribute group to manage attributesDmitry Torokhov
Instead of registering (and removing) every attribute individually switch to using sysfs attribute group. This makes sure that we properly unwind and do not try to remove non-existent attributes which may not be safe to do in the future. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21scu_ipc: Fix warning caused by include changesAlan Cox
We need to include the SFI headers. This is fine as the SCU is only relevant to x86 platforms with SFI. Fixes the -next warning report. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21platform: x86: throw away custom methodsAndy Shevchenko
In 2.6.35 the hex_to_bin() was introduced. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: platform-driver-x86@vger.kernel.org Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21acpi_toshiba: fix kconfig errorRandy Dunlap
Fix kconfig recursive dependency error in ACPI_TOSHIBA: it uses both select and depends on for BACKLIGHT_CLASS_DEVICE. drivers/video/backlight/Kconfig:117:error: recursive dependency detected! drivers/video/backlight/Kconfig:117: symbol BACKLIGHT_CLASS_DEVICE is selected by ACPI_TOSHIBA drivers/platform/x86/Kconfig:490: symbol ACPI_TOSHIBA depends on LEDS_CLASS drivers/leds/Kconfig:12: symbol LEDS_CLASS is selected by BACKLIGHT_ADP8860 drivers/video/backlight/Kconfig:285: symbol BACKLIGHT_ADP8860 depends on BACKLIGHT_CLASS_DEVICE Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21Don't show error if Acer WMI is not foundPascal de Bruijn
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21asus-laptop: remove no longer used keycode_map fieldDmitry Torokhov
The driver uses sparse keymap library and does not use this field anymore. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21asus-laptop: fix gps rfkillCorentin Chary
The GPS rfkill crappy code. The ops_data argument wasn't set, and was totally misused. The fix have been tested on an Asus R2H. Cc: stable@kernel.org Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21asus-laptop: Add key found on Asus N61JQCorentin Chary
Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21platform-x86: sync eeepc-laptop and asus-laptopCorentin Chary
Makes asus-laptop and eeepc-laptop _init/_exit functions looks exactly the same as they do the same thing. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21toshiba-acpi - switch to using sparse keymapDmitry Torokhov
Instead of implementing its own version of keymap hanlding switch over to using sparse keymap library. Also, install notify handler only after we allocated input device, otherwise we may risk getting event too early and crash. Similarly, notify handler should be removed before we unregister input device. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21Input: hp-wmi - switch to using sparse keymap libraryDmitry Torokhov
Instead of implementing its own version of keymap hanlding switch over to using sparse keymap library. Also make sure that we install notify handler only after we allocated input device and that we remove notify handler before unregistering input device. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21Input: dell-wmi - switch to using sparse keymap libraryDmitry Torokhov
Instead of implementing its own version of keymap hanlding switch over to using sparse keymap library. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21panasonic-laptop - switch to using sparse keymap libraryDmitry Torokhov
nstead of implementing its own version of keymap hanlding switch over to using sparse keymap library. Cc: Harald Welte <laforge@gnumonks.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21topstar-laptop - switch to using sparse keymap libraryDmitry Torokhov
Instead of implementing its own version of keymap hanlding switch over to using sparse keymap library. Acked-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-05IPS driver: Fix limit clamping when reducing CPU powerMatthew Garrett
Values here are in internal units rather than Watts, so we shouldn't perform any conversion. Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-05[PATCH 2/2] IPS driver: disable CPU turboJesse Barnes
The undocumented interface we're using for reading CPU power seems to be overreporting power. Until we figure out how to correct it, disable CPU turbo and power reporting to be safe. This will keep the CPU within default limits and still allow us to increase GPU frequency as needed. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-05IPS driver: apply BIOS provided CPU limit if different from defaultJesse Barnes
The BIOS may hand us a lower CPU power limit than the default for a given SKU. We should use it in case the platform isn't designed to dissapate the full TDP of a given part. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-05intel_ips -- ensure we do not enable gpu turbo mode without driver linkageAndy Whitcroft
Both when polling the current turbo status (in poll_turbo_status mode) and when handling thermal events (in ips_irq_handler) the current status of GPU turbo is updated to match the hardware status. However if during driver initialisation we were unable aquire linkage to the i915 driver enabling GPU turbo will lead to an oops on the first attempt to determine GPU busy status. Ensure that we do not enable GPU turbo unless we have driver linkage. BugLink: http://bugs.launchpad.net/bugs/632430 Cc: stable@kernel.org Signed-off-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-05intel_ips: Print MCP limit exceeded values.Tim Gardner
Print some interesting values when MCP limits are exceeded. Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-05IPS driver: verify BIOS provided limitsJesse Barnes
They're optional. If not present or sane, we should use the CPU defaults. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-05IPS driver: don't toggle CPU turbo on unsupported CPUsJesse Barnes
If the CPU doesn't support turbo, don't try to enable/disable it. http://bugzilla.kernel.org/show_bug.cgi?id=18742 Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-05NULL pointer might be used in ips_monitor()minskey guo
The patch is to create ips_adjust thread before ips_monitor begins to run because the latter will kthread_stop() or wake up the former via ips->adjust pointer. Without this change, it is possible that ips->adjust is NULL when kthread_stop() or wake_up_process() is called in ips_monitor(). Signed-off-by: minskey guo <chaohong.guo@intel.com> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-05Release symbol on error-handling path of ips_get_i915_syms()minskey guo
In ips_get_i915_syms(), the symbol i915_gpu_busy() is not released when error occurs. Signed-off-by: minskey guo <chaohong.guo@intel.com> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-05old_cpu_power is wrongly divided by 65535 in ips_monitor()minskey guo
The variable old_cpu_power is used to save the value of THM_CEC register. In get_cpu_power(), it will be divided by 65535. Signed-off-by: minskey guo <chaohong.guo@intel.com> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-05seqno mask of THM_ITV register is 16bitminskey guo
The mask of sequence number in THM_ITV register is 16bit width instead of 8bit. Signed-off-by: minskey guo <chaohong.guo@intel.com> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-09-23thinkpad-acpi: avoid keymap pitfallHenrique de Moraes Holschuh
Change the code so that it will use the correct size for keymap entries. Do it in a way that makes it harder to screw it up in the future. Reported-by: Jaime Velasco Juan <jsagarribay@gmail.com> Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-24intel_scu_ipc: fix IPC i2c write bugJianwei Yang
We should pass the data to the data register. Signed-off-by: Jianwei Yang <jianwei.yang@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-24rar: Fix off by one errorOssama Othman
It looks like there is an off-by-one error in one of your changes to drivers/staging/rar_register/rar_register.c: Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-23hp-wmi: Fix query interfaceMatthew Garrett
The machines I have appear to provide their return value in the arguments structure, not the output structure. Rework the driver to use that again in order to get rfkill working again. Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-23ACPI_TOSHIBA needs LEDS supportJonathan Corbet
Don't ask how ACPI_TOSHIBA got enabled on in desktop system's .config - I don't know. But it has silently been there until I tried 2.6.36-rc2, where it broke the build because I don't have LED support turned on. Attached patch fixes things up. (I had to change BACKLIGHT_CLASS_DEVICE to "depends" because otherwise I get unsightly core dumps out of scripts/kconfig/conf). jon -- toshiba: make sure we pull in LED support The Toshiba extras driver uses the LED module, so make sure we have it configure in. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-16platform/x86: move rfkill for Dell Mini 1012 to compal-laptopVictor van den Elzen
Like others in the Mini series, the Dell Mini 1012 does not support the smbios hook required by dell-laptop. Signed-off-by: Victor van den Elzen <victor.vde@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>