summaryrefslogtreecommitdiff
path: root/drivers/platform
AgeCommit message (Collapse)Author
2010-11-22asus-laptop: fix gps rfkillCorentin Chary
commit 23f45c3a76e715217f40ac397c15815c774cad7f upstream. 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. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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>
2010-08-16thinkpad-acpi: Add KEY_CAMERA (Fn-F6) for Lenovo keyboardsJens Taprogge
On the T410s and most likely other current models, Fn-F6 is labeled as Camera/Headphone key. Report key presses as KEY_CAMERA. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Acked-by: Jerone Young <jerone.young@canonical.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-16thinkpad-acpi: add support for model-specific keymapsHenrique de Moraes Holschuh
Use the quirks engine to select model-specific keymaps, which makes it much easier to extend should we need it. Keycodes are based on the tables at http://www.thinkwiki.org/wiki/Default_meanings_of_special_keys. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-16thinkpad-acpi: lock down size of hotkey keymapHenrique de Moraes Holschuh
Use a safer coding style for the hotkey keymap. This does not fix any problems, as the current code is correct. But it might help avoid mistakes in the future. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-16thinkpad-acpi: untangle ACPI/vendor backlight selectionHenrique de Moraes Holschuh
acpi_video_backlight_support() already tells us if ACPI is handling backlight control through the generic ACPI handle. It is better to just trust it. While at it, adjust down a printk priority, and test earlier for brightness_enable=0. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-16thinkpad-acpi: find ACPI video device by synthetic HIDHenrique de Moraes Holschuh
The Linux ACPI core locates the ACPI video devices for us and marks them with ACPI_VIDEO_HID. Use that information to locate the video device instead of a half-baked hunt for _BCL. This uncouples the detection of the number of backlight brightness levels on ThinkPads from the ACPI paths in vid_handle. With this change, the driver should be able to always detect whether the ThinkPad uses a 8-level or 16-level brightness scale even on newer models for which the vid_handle paths have not been updated yet. It will skip deactivated devices in the ACPI device tree, which is a change in behaviour. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-16intel_ips: potential null dereferenceDan Carpenter
There is a potential NULL dereference of "limits." We can just return NULL earlier to avoid it. The caller already handles NULL returns. Signed-off-by: Dan Carpenter <error27@gmail.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-16drivers/platform/x86: Adjust confusing if indentationJulia Lawall
The assignment of ret to -EIO appears to only make sense if the branch that it is aligned with is executed, so move it into that branch. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r disable braces4@ position p1,p2; statement S1,S2; @@ ( if (...) { ... } | if (...) S1@p1 S2@p2 ) @script:python@ p1 << r.p1; p2 << r.p2; @@ if (p1[0].column == p2[0].column): cocci.print_main("branch",p1) cocci.print_secs("after",p2) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-16x86: intel_ips: do not use PCI resources before pci_enable_device()Kulikov Vasiliy
IRQ and resource[] may not have correct values until after PCI hotplug setup occurs at pci_enable_device() time. The semantic match that finds this problem is as follows: // <smpl> @@ identifier x; identifier request ~= "pci_request.*|pci_resource.*"; @@ ( * x->irq | * x->resource | * request(x, ...) ) ... *pci_enable_device(x) // </smpl> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-11ideapad: Only allow camera state to be set to 0 or 1David Woodhouse
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2010-08-11ideapad: Stop using global variablesDavid Woodhouse
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2010-08-11Add Lenovo ideapad driverDavid Woodhouse
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2010-08-03ips driver: make it less chattyJesse Barnes
We don't need a dev_warn when we exceed a thermal or power limit as we'll handle it appropriately by clamping down on the CPU, GPU or both as needed. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-03intel_scu_ipc: fix size field for intel_scu_ipc_commandHong Liu
Size for PMIC read/write command is byte, while it is DWORD for other IPC commands. Signed-off-by: Hong Liu <hong.liu@intel.com> Signed-off-by: ALan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-03intel_scu_ipc: return -EIO for error condition in busy_loopHong Liu
Signed-off-by: Hong Liu <hong.liu@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-03intel_scu_ipc: fix data packing of PMIC command on MoorestownHong Liu
Data is 2-byte per entry for PMIC read-modify-update command. Signed-off-by: Hong Liu <hong.liu@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-03Clean up command packing on MRST.Andy Ross
Don't pass more bytes in the command length field than we filled. Signed-off-by: Andy Ross <andy.ross@windriver.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-03zero the stack buffer before giving random garbage to the SCUArjan van de Ven
some messages take 4 bytes, but only fill 3 bytes.... this patch makes sure that whatever we send to the SCU is zeroed first Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-03Fix stack buffer size for IPC writev messagesArjan van de Ven
The stack buffer for IPC messages was 16 bytes, limiting messages to a size of 4 (each message is 32 bit). However, the touch screen driver is trying to send messages of size 5.... (AC: Set to 20 bytes having checked the max size allowed) Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-03intel_scu_ipc: Use the new cpu identification functionAlan Cox
This provides an architecture level board identify function to replace the cpuid direct usage Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-03intel_scu_ipc: tidy up unused bitsSreedhara DS
Delete unused constants IPC_CMD_INDIRECT_RD and IPC_CMD_INDIRECT_WR Remove multiple inclusion of header file "asm/mrst.h" Signed-off-by: Sreedhara DS <sreedhara.ds@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-03Remove indirect read write api support.Sreedhara DS
The firmware of production devices does not support this interface so this is dead code. Signed-off-by: Sreedhara DS <sreedhara.ds@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-03intel_scu_ipc: Support Medfield processorsSreedhara DS
Changes to work on bothMmoorestown and Medfield New pci id added for Medfield Return type of ipc_data_readl chnaged from u8 to u32 Signed-off-by: Sreedhara DS <sreedhara.ds@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-03intel_scu_ipc: detect CPU type automaticallySreedhara DS
Intel SCU message formats depend upon the processor type. Replace the module option with automatic detection of the processor type. Signed-off-by: Sreedhara DS <sreedhara.ds@intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-03x86 plat: limit x86 platform driver menu to X86Jan Engelhardt
My .config contains ACER_WMI=m. On SPARC. That does not make sense. Restrict the x86 platform driver menu to x86. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-03hp-wmi: acpi_drivers.h is already included through acpi.h two lines belowThomas Renninger
Signed-off-by: Thomas Renninger <trenn@suse.de> CC: linux-acpi@vger.kernel.or CC: platform-driver-x86@vger.kernel.org CC: mjg@redhat.com Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-03hp-wmi: Fix mixing up of and/or directiveThomas Renninger
This should have been an "and". Additionally checking for !obj is even better. Signed-off-by: Thomas Renninger <trenn@suse.de> CC: linux-acpi@vger.kernel.or CC: platform-driver-x86@vger.kernel.org CC: mjg@redhat.com Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-03dell-laptop: make dell_laptop_i8042_filter() staticAxel Lin
Make dell_laptop_i8042_filter() static as it's used only in dell-laptop.c Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-03asus-laptop: fix asus_input_init error pathAxel Lin
This patch includes below fixes: 1. return -ENOMEM instead of 0 if input_allocate_device fail. 2. fix wrong goto if sparse_keymap_setup fail. 3. fix wrong goto if input_register_device fail. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-03msi-wmi: make needlessly global symbols staticAxel Lin
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>
2010-08-03toshiba-acpi: Add support for Toshiba Illumination.Pierre Ducroquet
Add support for Toshiba Illumination. This is a set of LEDs installed on some Toshiba laptops. It is controlled through ACPI, the commands has been found through reverse engineering. It has been tested on a Toshiba Qosmio G50-122. Signed-off-by: Pierre Ducroquet <pinaraf@pinaraf.info> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-03compal-laptop: depends on POWER_SUPPLYRandy Dunlap
compal-laptop uses power_supply interfaces so it should depend on POWER_SUPPLY. ERROR: "power_supply_register" [drivers/platform/x86/compal-laptop.ko] undefined! ERROR: "power_supply_unregister" [drivers/platform/x86/compal-laptop.ko] undefined! Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Cezary Jackiewicz <cezary.jackiewicz@gmail.com> Cc: Matthew Garrett <mjg@redhat.com> Cc: platform-driver-x86@vger.kernel.org Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-03gpio: Add PMIC GPIO block supportAlek Du
Moorestown has PMIC chip which contains GPIO blocks. The PMIC chip is connected to Langwell by SPI interface. So this GPIO driver will be regarded as SPI GPIO expander though the actual GPIO access is through IPC and SRAM. The SPI master contoller will probe this device driver by parsing SPIB table. Cleaned up for new IPC, GPE removed and some printk and other tidying by Alan Cox. Fixes for points noted by Matthew Garrett Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>