summaryrefslogtreecommitdiff
path: root/drivers/platform
AgeCommit message (Collapse)Author
2011-01-06Merge branch 'x86-platform-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, earlyprintk: Move mrst early console to platform/ and fix a typo x86, apbt: Setup affinity for apb timers acting as per-cpu timer ce4100: Add errata fixes for UART on CE4100 x86: platform: Move iris to x86/platform where it belongs x86, mrst: Check platform_device_register() return code x86/platform: Add Eurobraille/Iris power off support x86, mrst: Add explanation for using 1960 as the year offset for vrtc x86, mrst: Fix dependencies of "select INTEL_SCU_IPC" x86, mrst: The shutdown for MRST requires the SCU IPC mechanism x86: Ce4100: Add reboot_fixup() for CE4100 ce4100: Add PCI register emulation for CE4100 x86: Add CE4100 platform support x86: mrst: Set vRTC's IRQ to level trigger type x86: mrst: Add audio driver bindings rtc: Add drivers/rtc/rtc-mrst.c x86: mrst: Add vrtc driver which serves as a wall clock device x86: mrst: Add Moorestown specific reboot/shutdown support x86: mrst: Parse SFI timer table for all timer configs x86/mrst: Add SFI platform device parsing code
2010-12-23drm/i915, intel_ips: When i915 loads after IPS, make IPS relink to i915.Eric Anholt
The IPS driver is designed to be able to run detached from i915 and just not enable GPU turbo in that case, in order to avoid module dependencies between the two drivers. This means that we don't know what the load order between the two is going to be, and we had previously only supported IPS after (optionally) i915, but not i915 after IPS. If the wrong order was chosen, you'd get no GPU turbo, and something like half the possible graphics performance. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org
2010-12-06wmi: use memcmp instead of strncmp to compare GUIDsThadeu Lima de Souza Cascardo
While looking for the duplicates in /sys/class/wmi/, I couldn't find them. The code that looks for duplicates uses strncmp in a binary GUID, which may contain zero bytes. The right function is memcmp, which is also used in another section of wmi code. It was finding 49142400-C6A3-40FA-BADB-8A2652834100 as a duplicate of 39142400-C6A3-40FA-BADB-8A2652834100. Since the first byte is the fourth printed, they were found as equal by strncmp. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: Matthew Garrett <mjg@redhat.com> Cc: stable@kernel.org
2010-11-24ACPI, hp-wmi: Fix memory leak in acpi queryZeng Zhaoming
Free acpi return memory after query. Signed-off-by: Zeng Zhaoming <zengzm.kernel@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-11-24msi-wmi: fix semantically incorrect use of keycode instead of scancodeAnisse Astier
I didn't know the difference between the two when I wrote this code in commit c30116c6f0d26cd6e46dfa578163d573ef4730b2. Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-11-24msi-wmi: Add mute key supportAnisse Astier
Add new MUTE key seen on Medion Akoya AIO PC P4010D using MSI motherboard (Product Name: MS-7621) Reported-and-tested-by: Mark Huijgen <mark.sf.net@huijgen.tk> Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-11-24asus-laptop: add wimax and wwan supportCorentin Chary
Asus UL30A has a 3G chip, but the radio is disabled by default. The DSDT also reference a WIMAX device, which is not present on this model. This patch adds two new files: wwan and wimax to control WWAN and WIMAX devices. It does not use rfkill, because like WLED and BLED, we don't know yet that the two ACPI functions will always control the radio, they may control only the leds on some hardware. We may add rfkill switchs later. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-11-24eeepc-wmi: fix compiler warningDmitry Torokhov
This fixes the following: CC [M] drivers/platform/x86/eeepc-wmi.o drivers/platform/x86/eeepc-wmi.c:322: warning: initialization from incompatible pointer type Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-11-24ibm_rtl: _RTL_ is not available in UEFI modeVernon Mauery
Some of the IBM servers that are supported by ibm_rtl can run in both Legacy mode (BIOS) and in UEFI mode. When running in UEFI mode, it is possible that the EBDA table exists but cannot be mapped and reports errors. We need to make sure that by default we don't try to probe the machines if they are running in UEFI mode. Signed-off-by: Vernon Mauery <vernux@us.ibm.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-11-24ibm_rtl: Loosen the DMI criteria to all IBM machinesVernon Mauery
Allow all IBM machines to pass the DMI check so that we don't have to add them one by one to the driver. Any IBM machine that has the _RTL_ table in the EBDA will work. Signed-off-by: Vernon Mauery <vernux@us.ibm.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-11-24drivers/platform/x86/thinkpad_acpi.c: delete double assignmentJulia Lawall
Delete successive assignments to the same location. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression i; @@ *i = ...; i = ...; // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-11-24toshiba_acpi.c: Add key_entry for a lone FN keypressJon Dowland
A lone FN key press on a Toshiba Portégé R700 without another key in conjunction results in an ACPI event and a spurious error message on the console. Add a key entry to map this event to a KEY_FN keypress. This prevents the console message. Signed-off-by: Jon Dowland <jmtd@debian.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-11-24ibm_rtl: fix printk format warningRandy Dunlap
Fix printk format warning: drivers/platform/x86/ibm_rtl.c:305:warning: format '%#llx' expects type 'long long unsigned int', but argument 2 has type 'phys_addr_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Keith Mannthey <kmannth@us.ibm.com> Cc: Vernon Mauery <vernux@us.ibm.com> Cc: platform-driver-x86@vger.kernel.org Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-11-09x86/mrst: Add SFI platform device parsing codeFeng Tang
SFI provides a series of tables. These describe the platform devices present including SPI and I²C devices, as well as various sensors, keypads and other glue as well as interfaces provided via the SCU IPC mechanism (intel_scu_ipc.c) This patch is a merge of the core elements and relevant fixes from the Intel development code by Feng, Alek, myself into a single coherent patch for upstream submission. It provides the needed infrastructure to register I2C, SPI and platform devices described by the tables, as well as handlers for some of the hardware already supported in kernel. The 0.8 firmware also provides GPIO tables. Devices are created at boot time or if they are SCU dependant at the point an SCU is discovered. The existing Linux device mechanisms will then handle the device binding. At an abstract level this is an SFI to Linux device translator. Device/platform specific setup/glue is in this file. This is done so that the drivers for the generic I²C and SPI bus devices remain cross platform as they should. (Updated from RFC version to correct the emc1403 name used by the firmware and a wrongly used #define) Signed-off-by: Alek Du <alek.du@linux.intel.com> LKML-Reference: <20101109112158.20013.6158.stgit@localhost.localdomain> [Clean ups, removal of 0.7 support] Signed-off-by: Feng Tang <feng.tang@linux.intel.com> [Clean ups] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2010-10-27Remove duplicate includes from many filesZimny Lech
Signed-off-by: Zimny Lech <napohybelskurwysynom2010@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-25Merge branch 'for_linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86: (44 commits) eeepc-wmi: Add cpufv sysfs interface eeepc-wmi: add additional hotkeys panasonic-laptop: Simplify calls to acpi_pcc_retrieve_biosdata panasonic-laptop: Handle errors properly if they happen intel_pmic_gpio: fix off-by-one value range checking IBM Real-Time "SMI Free" mode driver -v7 Add OLPC XO-1 rfkill driver Move hdaps driver to platform/x86 ideapad-laptop: Fix Makefile intel_pmic_gpio: swap the bits and mask args for intel_scu_ipc_update_register ideapad: Add param: no_bt_rfkill ideapad: Change the driver name to ideapad-laptop ideapad: rewrite the sw rfkill set ideapad: rewrite the hw rfkill notify ideapad: use EC command to control camera ideapad: use return value of _CFG to tell if device exist or not ideapad: make sure we bind on the correct device ideapad: check VPC bit before sync rfkill hw status ideapad: add ACPI helpers dell-laptop: Add debugfs support ...
2010-10-22Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bklLinus Torvalds
* 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl: vfs: make no_llseek the default vfs: don't use BKL in default_llseek llseek: automatically add .llseek fop libfs: use generic_file_llseek for simple_attr mac80211: disallow seeks in minstrel debug code lirc: make chardev nonseekable viotape: use noop_llseek raw: use explicit llseek file operations ibmasmfs: use generic_file_llseek spufs: use llseek in all file operations arm/omap: use generic_file_llseek in iommu_debug lkdtm: use generic_file_llseek in debugfs net/wireless: use generic_file_llseek in debugfs drm: use noop_llseek
2010-10-21eeepc-wmi: Add cpufv sysfs interfaceChris Bagwell
eeepc-laptop provides a sysfs interface to read and control what it calls cpufv. When WMI is enabled, the ACPI interface changes slightly and becames a write-only control with 3 valid values. Expose cpufv again to allow for user space utils that can extended battery life noticably and come a little closer to parity with eeepc-laptop. Write-only is OK for most user space apps because read status was mostly used to prevent unneeded mode changes. Since this same check to ignore changes to same mode also exists in the DSDT then it was wasted ACPI call. acpi_osi="!Windows 2009" can be used for get back eeepc-laptop's read support of cpufv for debugging things such as behaviour during resume. This patch was tested with EEE PC 1005PE by monitoring powertop output while writing values of "0", "1", and "2" and by reviewing the decompiled DSDT of an 1201NL and comparing it to 1005PE's DSDT. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21eeepc-wmi: add additional hotkeysChris Bagwell
Added 4 hotkeys using same keymap values as eeepc-latop. These are mousepad toggle, resolution change, screen off, and task manager. These were tested on 1005PE and are the Fn-F3, F4, F7, and F9, respectively. Also, added a new hot key for power toggles (Fn-Space on 1005PE) and is meant to drive cpufv interface from userspace. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21panasonic-laptop: Simplify calls to acpi_pcc_retrieve_biosdataJean Delvare
Function acpi_pcc_retrieve_biosdata is always called with parameters (pcc, pcc->sinf), so we can drop the second parameter. It was dangerous to pass the sinf array separately anyway, as its length is checked as pcc->num_sifr, which pretty much assumed it was pcc->sinf (or at least had the same size.) This change makes the code slightly more compact and thus marginally faster. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Harald Welte <laforge@gnumonks.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21panasonic-laptop: Handle errors properly if they happenJean Delvare
acpi_pcc_retrieve_biosdata() returns success instead of error if HKEY.SINF is invalid. Fix this. Furthermore, if acpi_pcc_retrieve_biosdata() returns an error during device addition, initialization is properly reverted but value 0 is returned, which means success. This would cause a crash when later using or removing the device, so fix this too. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Harald Welte <laforge@gnumonks.org> Cc: Bruno Premont <bonbons@linux-vserver.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21intel_pmic_gpio: fix off-by-one value range checkingAxel Lin
In pmic_irq_type(), we use gpio as array index for trigger, thus the valid value range for gpio should be 0 .. NUM_GPIO - 1. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21IBM Real-Time "SMI Free" mode driver -v7Vernon Mauery
After a period of RFC for this driver, I think it is ready for inclusion in the platform-driver-x86 tree, hopefully to be staged in the next merge window into Linus's tree. --Vernon ------------------------------------------------------------ IBM Real-Time "SMI Free" mode driver This driver supports the Real-Time Linux (RTL) BIOS feature. The RTL feature allows non-fatal System Management Interrupts (SMIs) to be disabled on supported IBM platforms and is intended to be coupled with a user-space daemon to monitor the hardware in a way that can be prioritized and scheduled to better suit the requirements for the system. The Device is presented as a special "_RTL_" table to the OS in the Extended BIOS Data Area. There is a simple protocol for entering and exiting the mode at runtime. This driver creates a simple sysfs interface to allow a simple entry and exit from RTL mode in the UFI/BIOS. Since the driver is specific to IBM SystemX hardware (x86- based servers) it only builds on x86 builds. To reduce the risk of loading on the wrong hardware, the module uses DMI information and checks a list of servers that are known to work. Signed-off-by: Vernon Mauery <vernux@us.ibm.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21Add OLPC XO-1 rfkill driverDaniel Drake
Add a software rfkill switch for the WLAN interface in the OLPC XO-1 laptop. It uses the OLPC embedded controller to cut/restore power to the Marvell WLAN chip on the motherboard. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21Move hdaps driver to platform/x86Jean Delvare
The hdaps driver isn't a hardware monitoring driver, so it shouldn't live under driver/hwmon. drivers/platform/x86 seems much more appropriate, as the driver is only useful on x86 laptops. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Cc: Matthew Garrett <mjg@redhat.com> Cc: Frank Seidel <frank@f-seidel.de> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21ideapad-laptop: Fix MakefileMatthew Garrett
The makefile didn't get updated when the driver changed name, which broke the build. Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21intel_pmic_gpio: swap the bits and mask args for intel_scu_ipc_update_registerAlek Du
The intel_scu_ipc_update_register 2nd paramter should the bits and 3rd paramter should be the mask. This typo was introduced during IPC function changing... Reported-by: Ryan Zhou <ryan.zhou@intel.com> 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>
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>
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>