summaryrefslogtreecommitdiffstats
path: root/drivers/platform
Commit message (Collapse)AuthorAgeFilesLines
...
* | IPS driver: apply BIOS provided CPU limit if different from defaultJesse Barnes2010-10-051-3/+4
| | | | | | | | | | | | | | | | | | 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>
* | intel_ips -- ensure we do not enable gpu turbo mode without driver linkageAndy Whitcroft2010-10-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | intel_ips: Print MCP limit exceeded values.Tim Gardner2010-10-051-6/+18
| | | | | | | | | | | | | | | | | | 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>
* | IPS driver: verify BIOS provided limitsJesse Barnes2010-10-051-0/+23
| | | | | | | | | | | | | | | | 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>
* | IPS driver: don't toggle CPU turbo on unsupported CPUsJesse Barnes2010-10-051-5/+9
| | | | | | | | | | | | | | | | | | 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>
* | NULL pointer might be used in ips_monitor()minskey guo2010-10-051-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Release symbol on error-handling path of ips_get_i915_syms()minskey guo2010-10-051-1/+1
| | | | | | | | | | | | | | | | | | 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>
* | old_cpu_power is wrongly divided by 65535 in ips_monitor()minskey guo2010-10-051-1/+1
| | | | | | | | | | | | | | | | | | 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>
* | seqno mask of THM_ITV register is 16bitminskey guo2010-10-051-1/+1
| | | | | | | | | | | | | | | | | | 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>
* | thinkpad-acpi: avoid keymap pitfallHenrique de Moraes Holschuh2010-09-231-2/+3
|/ | | | | | | | | 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>
* intel_scu_ipc: fix IPC i2c write bugJianwei Yang2010-08-241-1/+1
| | | | | | | | 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>
* rar: Fix off by one errorOssama Othman2010-08-241-1/+1
| | | | | | | | 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>
* hp-wmi: Fix query interfaceMatthew Garrett2010-08-231-39/+25
| | | | | | | | 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>
* ACPI_TOSHIBA needs LEDS supportJonathan Corbet2010-08-231-1/+3
| | | | | | | | | | | | | | | | | | | | | 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>
* platform/x86: move rfkill for Dell Mini 1012 to compal-laptopVictor van den Elzen2010-08-162-0/+16
| | | | | | | | | 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>
* thinkpad-acpi: Add KEY_CAMERA (Fn-F6) for Lenovo keyboardsJens Taprogge2010-08-161-1/+1
| | | | | | | | | | 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>
* thinkpad-acpi: add support for model-specific keymapsHenrique de Moraes Holschuh2010-08-161-18/+42
| | | | | | | | | | | 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>
* thinkpad-acpi: lock down size of hotkey keymapHenrique de Moraes Holschuh2010-08-161-4/+15
| | | | | | | | | 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>
* thinkpad-acpi: untangle ACPI/vendor backlight selectionHenrique de Moraes Holschuh2010-08-161-22/+20
| | | | | | | | | | | | 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>
* thinkpad-acpi: find ACPI video device by synthetic HIDHenrique de Moraes Holschuh2010-08-161-40/+12
| | | | | | | | | | | | | | | | | | | 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>
* intel_ips: potential null dereferenceDan Carpenter2010-08-161-1/+3
| | | | | | | | | 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>
* drivers/platform/x86: Adjust confusing if indentationJulia Lawall2010-08-161-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* x86: intel_ips: do not use PCI resources before pci_enable_device()Kulikov Vasiliy2010-08-161-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ideapad: Only allow camera state to be set to 0 or 1David Woodhouse2010-08-111-1/+1
| | | | Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* ideapad: Stop using global variablesDavid Woodhouse2010-08-111-34/+58
| | | | Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* Add Lenovo ideapad driverDavid Woodhouse2010-08-113-0/+290
| | | | Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* ips driver: make it less chattyJesse Barnes2010-08-031-2/+2
| | | | | | | | | 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>
* intel_scu_ipc: fix size field for intel_scu_ipc_commandHong Liu2010-08-031-1/+1
| | | | | | | | | 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>
* intel_scu_ipc: return -EIO for error condition in busy_loopHong Liu2010-08-031-1/+4
| | | | | | 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>
* intel_scu_ipc: fix data packing of PMIC command on MoorestownHong Liu2010-08-031-5/+6
| | | | | | | | 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>
* Clean up command packing on MRST.Andy Ross2010-08-031-18/+11
| | | | | | | | 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>
* zero the stack buffer before giving random garbage to the SCUArjan van de Ven2010-08-031-0/+2
| | | | | | | | | 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>
* Fix stack buffer size for IPC writev messagesArjan van de Ven2010-08-031-2/+2
| | | | | | | | | | | | 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>
* intel_scu_ipc: Use the new cpu identification functionAlan Cox2010-08-031-12/+5
| | | | | | | | 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>
* intel_scu_ipc: tidy up unused bitsSreedhara DS2010-08-031-4/+0
| | | | | | | | | 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>
* Remove indirect read write api support.Sreedhara DS2010-08-031-82/+0
| | | | | | | | | 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>
* intel_scu_ipc: Support Medfield processorsSreedhara DS2010-08-031-20/+33
| | | | | | | | | | 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>
* intel_scu_ipc: detect CPU type automaticallySreedhara DS2010-08-031-7/+12
| | | | | | | | 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>
* x86 plat: limit x86 platform driver menu to X86Jan Engelhardt2010-08-031-0/+1
| | | | | | | | 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>
* hp-wmi: acpi_drivers.h is already included through acpi.h two lines belowThomas Renninger2010-08-031-1/+0
| | | | | | | | 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>
* hp-wmi: Fix mixing up of and/or directiveThomas Renninger2010-08-031-1/+3
| | | | | | | | | | | 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>
* dell-laptop: make dell_laptop_i8042_filter() staticAxel Lin2010-08-031-1/+1
| | | | | | | 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>
* asus-laptop: fix asus_input_init error pathAxel Lin2010-08-031-5/+5
| | | | | | | | | | 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>
* msi-wmi: make needlessly global symbols staticAxel Lin2010-08-031-1/+1
| | | | | | | | | 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>
* toshiba-acpi: Add support for Toshiba Illumination.Pierre Ducroquet2010-08-031-0/+117
| | | | | | | | | | 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>
* compal-laptop: depends on POWER_SUPPLYRandy Dunlap2010-08-031-0/+1
| | | | | | | | | | | | | | 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>
* gpio: Add PMIC GPIO block supportAlek Du2010-08-033-0/+349
| | | | | | | | | | | | | | 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>
* X86 platform driver: Fix section mismatch in wmi.cThomas Renninger2010-08-031-2/+2
| | | | | | | | | | | | | The .add function must not be declared __init. Signed-off-by: Thomas Renninger <trenn@suse.de> CC: Alexey Starikovskiy <astarikovskiy@suse.de> CC: Len Brown <lenb@kernel.org> CC: linux-kernel@vger.kernel.org CC: linux-acpi@vger.kernel.org CC: platform-driver-x86@vger.kernel.org Signed-off-by: Matthew Garrett <mjg@redhat.com>
* X86 platform drivers: Remove EC dump from thinkpad_acpiThomas Renninger2010-08-031-73/+0
| | | | | | | | | | | | | | | | | There is a general interface for that now (provided by other patches in this patch series): /sys/kernel/debug/ec/*/io Signed-off-by: Thomas Renninger <trenn@suse.de> CC: Alexey Starikovskiy <astarikovskiy@suse.de> CC: Len Brown <lenb@kernel.org> CC: linux-kernel@vger.kernel.org CC: linux-acpi@vger.kernel.org CC: platform-driver-x86@vger.kernel.org CC: Henrique de Moraes Holschuh <hmh@hmh.eng.br> CC: ibm-acpi-devel@lists.sourceforge.net Signed-off-by: Matthew Garrett <mjg@redhat.com>
* panasonic-laptop: fix acpi_pcc_write_sset return valueAxel Lin2010-08-031-5/+2
| | | | | | | | | | | | | In current implementation, acpi_pcc_write_sset return 1 if write is successful, 0 if write is failed. But all the callers consider acpi_pcc_write_sset return 0 if write is successful and return negtive if write is failed. This patch changes the implementation of acpi_pcc_write_sset to return 0 if write is successful, -EIO if write is failed. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
OpenPOWER on IntegriCloud