summaryrefslogtreecommitdiff
path: root/drivers/platform
AgeCommit message (Collapse)AuthorFilesLines
2013-07-10x86 platform drivers: fix gpio leakLibo Chen1-1/+5
when request_irq fails, we should release gpiochip v2: fix warning: ignoring return value of 'gpiochip_remove Signed-off-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-07-10toshiba_acpi: Add dependency on SERIO_I8042Seth Forshee1-0/+1
Configuring this option as a module with ACPI_TOSHIBA built-in results in the following errors: drivers/built-in.o: In function `toshiba_acpi_remove': >> toshiba_acpi.c:(.text+0x314bb0): undefined reference to `i8042_remove_filter' drivers/built-in.o: In function `toshiba_acpi_add': >> toshiba_acpi.c:(.devinit.text+0xb822): undefined reference to `i8042_install_filter' >> toshiba_acpi.c:(.devinit.text+0xb98b): undefined reference to `i8042_remove_filter' Add a dependency to prevent ACPI_TOSHIBA from being built-in when SERIO_I8042=m. Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-07-10asus-nb-wmi: set wapf=4 for ASUSTeK COMPUTER INC. 1015E/UAceLan Kao1-0/+18
Need to set wapf to 4 for ASUSTeK COMPUTER INC. 1015E/U, so that user can toggle wifi function through function key correctly. Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-07-10Add trivial driver to disable Intel Smart ConnectMatthew Garrett3-0/+105
Intel Smart Connect is an Intel-specific ACPI interface for configuring devices to wake up at regular intervals so they can pull down mail or other internet updates, and then go to sleep again. If a user enables this in Windows and then reboots into Linux, the device may wake up if it's put to sleep. Since there's no Linux userland support for any of this, the machine will then remain awake until something else puts it back to sleep. I haven't figured out all that much about how this works (there's a bunch of different ACPI calls available on the device), but this seems to be enough to turn it off. We can add more features to this driver if anyone ever cares about figuring out what the rest of the calls do or writing some Linux userspace to implement the rest of it. Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-07-10Add support driver for Intel Rapid Start TechnologyMatthew Garrett3-0/+222
Intel Rapid Start Technology is a firmware-based suspend-to-disk implementation. Once placed in S3, the device will wake once either a timeout elapses or the battery reaches a critical level. It will then resume to the firmware and copy the contents of RAM to a specialised partition, and then power off the machine. If the user turns the machine back on the firmware will copy the contents of the partition back to RAM and then resume from S3 as normal. This driver provides an interface for configuring the wakeup events and timeout. It still requires firmware support and an appropriate suspend partition. Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-07-10hp-wmi: add supports for POST code errorAlex Hung1-0/+47
HP laptops include a POST code error query 0x2A that reports which point BIOS fails to boot at. The error code is kept in CMOS until it is cleared. Signed-off-by: Alex Hung <alex.hung@canonical.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-07-10asus-wmi: control wlan-led only if wapf == 4AceLan Kao1-2/+3
Controlling the wlan led seems to have some side effects to the machines with wapf value is not equal to 4. It will make the keyboard backlight out of order. So, the patch will enable the wlan led function only if the wapf == 4. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=46791 Reported-by: Mirto Silvio Busico <m.busico@ieee.org> Tested-by: Karol Herbst <karolherbst@me.com> Tested-by: drunkenbatman <drunkenbatman@gmail.com> Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-07-10drivers/platform/x86/intel_ips: Convert to module_pci_driverLibo Chen1-12/+1
use module_pci_driver instead of init/exit, make code clean. Signed-off-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-07-10asus-nb-wmi: ignore ALS notification key codeViktar Vauchkevich1-0/+1
Ignore Ambient Light Sensor notification key code 0xC6 found in ASUS UX31a. When the illuminance changes dmesg shows: [10814.939979] asus_wmi: Unknown key c6 pressed Signed-off-by: Viktar Vauchkevich <victorenator@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-07-10asus-wmi: append newline to messagesvic1-8/+8
Append newline to messages. Signed-off-by: Viktar Vauchkevich <victorenator@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-07-10x86: asus-laptop: fix invalid point accessLibo Chen1-1/+0
asus->name is null or point to const string,so it is not suitable to kfree it. Signed-off-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-07-10x86: msi-laptop: fix memleakLibo Chen1-14/+10
1. fix two visible mistakes: * when load_scm_model_init faild, we should call platform_device_del(msipf_device) * msipf_attribute_group should be remove in err case 2. change some tags, give them real meaning. Signed-off-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-07-08amilo-rfkill: Add dependency on SERIO_I8042Ben Hutchings1-0/+1
I forgot to add this when changing the driver to use the proper i8042 functions. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-07-08dell-laptop: fix error return code in dell_init()Wei Yongjun1-2/+3
Fix to return -ENOMEM in the alloc_page() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-07-08hp-wmi: Enable hotkeys on some systemsMatthew Garrett1-0/+16
Kyle Evans discovered that he needed to set some bits in an EC register in order to receive hotkey events. Doing so blindly broke some otherwise working HP laptops. It turns out that there's a WMI call that accesses the same register, so let's try calling that instead. Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com> Cc: Kyle Evans <kvans32@gmail.com>
2013-07-04drivers: avoid format string in dev_set_nameKees Cook1-1/+1
Calling dev_set_name with a single paramter causes it to be handled as a format string. Many callers are passing potentially dynamic string content, so use "%s" in those cases to avoid any potential accidents, including wrappers like device_create*() and bdi_register(). Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-06-02x86 / platform / hp_wmi: Fix bluetooth_rfkill misuse in hp_wmi_rfkill_setup()lan,Tianyu1-1/+1
HP wmi platform driver fails to initialize GPS and causes poweroff failure in HP Elitebook 6930p. Call Trace: [<ffffffffa088d25a>] hp_wmi_bios_setup+0x25a/0x3a0 [hp_wmi] [<ffffffff8135978c>] platform_drv_probe+0x3c/0x70 [<ffffffff81356d6a>] ? driver_sysfs_add+0x7a/0xb0 [<ffffffff81357407>] driver_probe_device+0x87/0x3a0 [<ffffffff813577f3>] __driver_attach+0x93/0xa0 [<ffffffff81357760>] ? __device_attach+0x40/0x40 [<ffffffff81355403>] bus_for_each_dev+0x63/0xa0 [<ffffffff81356e8e>] driver_attach+0x1e/0x20 [<ffffffff81356a28>] bus_add_driver+0x1f8/0x2b0 [<ffffffff81357e81>] driver_register+0x71/0x150 [<ffffffff813594e6>] platform_driver_register+0x46/0x50 [<ffffffff813595ab>] platform_driver_probe+0x1b/0xa0 [<ffffffffa088d55e>] hp_wmi_init+0x1be/0x1fb [hp_wmi] [<ffffffffa088d3a0>] ? hp_wmi_bios_setup+0x3a0/0x3a0 [hp_wmi] [<ffffffff8100210a>] do_one_initcall+0x10a/0x160 [<ffffffff810bdac6>] load_module+0x1b46/0x2640 [<ffffffff8128da20>] ? ddebug_proc_write+0xf0/0xf0 [<ffffffff810be662>] sys_init_module+0xa2/0xf0 [<ffffffff814d975d>] system_call_fastpath+0x1a/0x1f Code: 48 ff ff ff 80 7b 24 00 74 d2 41 83 e5 01 45 38 ec 74 c9 48 8d bb a0 03 00 00 e8 ed fb aa e0 5b 41 5c 41 5d 44 89 f0 41 5e 5d c3 <0f> 0b 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 66 66 RIP [<ffffffffa05c57af>] rfkill_set_hw_state+0x9f/0xb0 [rfkill] RSP <ffff880071523b60> Check code and find this error is caused by misusing variable bluetooth_rfkill where gps_rfkill should be. Reported-and-tested-by: Iru Cai <mytbk920423@gmail.com> References: https://bugzilla.kernel.org/show_bug.cgi?id=58401 Cc: All <stable@vger.kernel.org> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-05-09Add support for fan button on Ideapad Z580Maxim Mikityanskiy1-1/+5
The patch adds support for fan control button on Ideapad Z580. This is the same button as on Z570, but it raises different bit in VPCCMD_R_SPECIAL_BUTTONS. Also add message to dmesg when unknown button press detected, it will help adding support for new special buttons. Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com> Tested-by: Ivan Vojtko <nekroman.sk@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-05-09pvpanic: pvpanic device driverHu Tao3-0/+134
pvpanic device is a qemu simulated device through which guest panic event is sent to host. Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-05-09asus-nb-wmi: set wapf=4 for ASUSTeK COMPUTER INC. X75AAceLan Kao1-0/+9
BugLink: http://bugs.launchpad.net/bugs/1172151 Need to set wapf to 4 for ASUSTeK COMPUTER INC. X75A, so that user can toggle wifi function through function key correctly. Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-05-09drivers: platform: x86: Use PTR_RET functionAlexandru Gheorghiu1-4/+1
Used PTR_RET function instead of IS_ERR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-05-09sony-laptop: SVS151290S kbd backlight and gfx switch supportArthur Wirski1-1/+19
SVS151290S series uses handle 0x0163 for keyboard backlight and 0x015B for the graphics switch. Signed-off-by: Arthur Wirski <awirski@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-05-09hp-wmi: add more definitions for new event_id'sAlex Hung1-0/+24
New HP laptops start generating new events, and hp-wmi prints unknown event_ids for them. This patch also removes these messages Signed-off-by: Alex Hung <alex.hung@canonical.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-05-09dell-laptop: Fix krealloc() misuse in parse_da_table()David Woodhouse1-4/+6
If krealloc() returns NULL, it *doesn't* free the original. So any code of the form 'foo = krealloc(foo, …);' is almost certainly a bug. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-05-09hp_accel: Ignore the error from lis3lv02d_poweron() at resumeShuah Khan1-1/+2
The error in lis3lv02_poweron() is harmless in the resume path, so we should ignore it. It is inline with the other usages of lis3lv02_poweron() and matches the 3.0 code for this routine. This patch is in suse git and might have missed making it into the mainline. opensuse - commit id: 66ccdac87c322cf7af12bddba8c805af640b1cff Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Shuah Khan <shuah.khan@hp.com> CC: stable@vger.kernel.org 3.8, 3.4, 3.5, 3.2 Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-05-09dell: add new dell WMI format for the AIO machinesAceLan Kao1-5/+48
There is a new DELL WMI spec. with new WMI event format. I'm working on the AIO machines, but I think the new format will apply to all the Dell's machines, not only for AIO, which will be released later this year. The new format of the WMI buffer is shown as below word 0 - the number of words following in the WMI buffer(not including this word. word 1 - the event type 0x0000 - A hot key is pressed or an event occurred 0x000F - A sequence of hot keys are pressed word 2 and on - the event data Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-05-02Merge branch 'for-linus' of ↵Linus Torvalds2-11/+11
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull VFS updates from Al Viro, Misc cleanups all over the place, mainly wrt /proc interfaces (switch create_proc_entry to proc_create(), get rid of the deprecated create_proc_read_entry() in favor of using proc_create_data() and seq_file etc). 7kloc removed. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits) don't bother with deferred freeing of fdtables proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h proc: Make the PROC_I() and PDE() macros internal to procfs proc: Supply a function to remove a proc entry by PDE take cgroup_open() and cpuset_open() to fs/proc/base.c ppc: Clean up scanlog ppc: Clean up rtas_flash driver somewhat hostap: proc: Use remove_proc_subtree() drm: proc: Use remove_proc_subtree() drm: proc: Use minor->index to label things, not PDE->name drm: Constify drm_proc_list[] zoran: Don't print proc_dir_entry data in debug reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show() proc: Supply an accessor for getting the data from a PDE's parent airo: Use remove_proc_subtree() rtl8192u: Don't need to save device proc dir PDE rtl8187se: Use a dir under /proc/net/r8180/ proc: Add proc_mkdir_data() proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h} proc: Move PDE_NET() to fs/proc/proc_net.c ...
2013-04-28Merge branch 'acpica'Rafael J. Wysocki1-1/+2
* acpica: (33 commits) ACPICA: Update version to 20130328 ACPICA: Add a lock to the internal object reference count mechanism ACPICA: Fix a format string for 64-bit generation ACPICA: Remove FORCE_DELETE option for global reference count mechanism ACPICA: Improve error message for Index() operator ACPICA: FADT: Remove extraneous warning for very large GPE registers ACPICA: Fix a typo in a function header, no functional change ACPICA: Fix a typo in an error message ACPICA: Fix for some comments/headers ACPICA: _OSI Support: handle any errors from acpi_os_acquire_mutex() ACPICA: Predefine names: Add allowed argument types to master info table ACPI: Set length even for TYPE_END_TAG acpi resource ACPICA: Update version to 20130214 ACPICA: Object repair: Allow 0-length packages for variable-length packages ACPICA: Disassembler: Add warnings for unresolved control methods ACPICA: Return object repair: Add resource template repairs ACPICA: Return object repair: Add string-to-unicode conversion ACPICA: Split object conversion functions to a new file ACPICA: Add mechanism for early object repairs on a per-name basis ACPICA: Remove trailing comma in enum declarations ...
2013-04-19Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86Linus Torvalds1-4/+0
Pull x86 platform driver revert from Matthew Garrett: "It turns out that one of the hp-wmi patches this cycle breaks some other HP laptops. I think we have a good idea how to work on it for 3.10, but it's safer to just revert it for now." * 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86: Revert "hp-wmi: Add support for SMBus hotkeys"
2013-04-19Revert "hp-wmi: Add support for SMBus hotkeys"Matthew Garrett1-4/+0
This reverts commit fabf85e3ca15d5b94058f391dac8df870cdd427a which breaks hotkey support on some other HP laptops. We'll try doing this differently in 3.10. Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-04-18thinkpad-acpi: kill hotkey_thread_mutexOleg Nesterov1-10/+0
hotkey_kthread() does try_to_freeze() under hotkey_thread_mutex. We can simply kill this mutex, hotkey_poll_stop_sync() does not need to serialize with hotkey_kthread(). When kthread_stop() returns the thread is already dead, it called do_exit()->complete_vfork_done(). Reported-by: Artem Savkov <artem.savkov@gmail.com> Reported-by: Maciej Rutecki <maciej.rutecki@gmail.com> Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Matthew Garrett <matthew.garrett@nebula.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Reviewed-by: Mandeep Singh Baines <msb@chromium.org> Cc: Aaron Lu <aaron.lu@intel.com> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-09procfs: new helper - PDE_DATA(inode)Al Viro2-11/+11
The only part of proc_dir_entry the code outside of fs/proc really cares about is PDE(inode)->data. Provide a helper for that; static inline for now, eventually will be moved to fs/proc, along with the knowledge of struct proc_dir_entry layout. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-03-24ACPI: Set length even for TYPE_END_TAG acpi resourceYinghai Lu1-1/+2
Found with a network device in QEMU/KVM guest not working anymore. Bisected to commit c13085e5 ACPICA: Resource Mgr: Prevent infinite loops in resource walks That commit will check acpi_resource length strictly which causes acpi_set_current_resources to return failure and IRQ for PCI devices is not set properly. Set length for all those TYPE_END_TAG acpi_resources. [rjw: Changelog] Bisected-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-03-09Platform: x86: chromeos_laptop : Add basic platform data for atmel devicesBenson Leung1-2/+39
Add basic platform data to get the current upstream driver working with the 224s touchpad and 1664s touchscreen. We will be using NULL config so we will use the settings from the devices' NVRAMs. Signed-off-by: Benson Leung <bleung@chromium.org> Tested-by: Olof Johansson <olof@lixom.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-03-03Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86Linus Torvalds14-273/+1292
Pull x86 platform driver updates from Matthew Garrett: "Mostly relatively small updates, along with some hardware enablement for Sony hardware and a pile of updates to Google's Chromebook driver" * 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86: (49 commits) ideapad-laptop: Depend on BACKLIGHT_CLASS_DEVICE instead of selecting it ideapad: depends on backlight subsystem and update comment Platform: x86: chromeos_laptop - add i915 gmbuses to adapter names Platform: x86: chromeos_laptop - Add isl light sensor for Pixel Platform: x86: chromeos_laptop - Add a more general add_i2c_device Platform: x86: chromeos_laptop - Add Pixel Touchscreen Platform: x86: chromeos_laptop - Add support for probing devices Platform: x86: chromeos_laptop - Add Pixel Trackpad hp-wmi: fix handling of platform device sony-laptop: leak in error handling sony_nc_lid_resume_setup() hp-wmi: Add support for SMBus hotkeys asus-wmi: Fix unused function build warning acer-wmi: avoid the warning of 'devices' may be used uninitialized drivers/platform/x86/thinkpad_acpi.c: Handle HKEY event 0x6040 Platform: x86: chromeos_laptop - Add HP Pavilion 14 Platform: x86: chromeos_laptop - Add Taos tsl2583 device Platform: x86: chromeos_laptop - Add Taos tsl2563 device Platform: x86: chromeos_laptop - Add Acer C7 trackpad Platform: x86: chromeos_laptop - Rename setup_lumpy_tp to setup_cyapa_smbus_tp asus-laptop: always report brightness key events ...
2013-02-27ideapad-laptop: Depend on BACKLIGHT_CLASS_DEVICE instead of selecting itMatthew Garrett1-1/+1
Selecting BACKLIGHT_CLASS_DEVICE doesn't guarantee that any of its dependencies are enabled, and these are complicated. Depending isn't ideal for configuration UI purposes, but is probably more appropriate here. Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-27ideapad: depends on backlight subsystem and update commentIke Panhc1-1/+3
I've got a report of build failure on ideapad-laptop, which shows drivers/built-in.o: In function `ideapad_acpi_notify': ideapad-laptop.c:(.text+0x63876a): undefined reference to `backlight_force_update' drivers/built-in.o: In function `ideapad_acpi_remove': ideapad-laptop.c:(.devexit.text+0x64a7): undefined reference to `backlight_device_unregister' drivers/built-in.o: In function `ideapad_acpi_add': ideapad-laptop.c:(.devinit.text+0x45e28): undefined reference to `backlight_device_register' To select backlight subsystem can prevent this error from happening. Also update comment for this driver. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-27Platform: x86: chromeos_laptop - add i915 gmbuses to adapter namesBenson Leung1-0/+4
Add the two other i2c buses (vga and panel) from i915. Chromebook Pixel has input and light sensor devices on these busses. Signed-off-by: Benson Leung <bleung@chromium.org> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-27Platform: x86: chromeos_laptop - Add isl light sensor for PixelBenson Leung1-0/+16
The Chromebook Pixel uses an isl29023 ambient light sensor on the PANEL GMBus. Signed-off-by: Benson Leung <bleung@chromium.org> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-27Platform: x86: chromeos_laptop - Add a more general add_i2c_deviceBenson Leung1-3/+11
This will allow us to assign devices to buses by the type enum. Signed-off-by: Benson Leung <bleung@chromium.org> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-27Platform: x86: chromeos_laptop - Add Pixel TouchscreenYufeng Shen1-0/+31
Instantiate the atmel mxt1664s touchscreen on this system. The touchscreen may appear at two possible addresses: 0x4a in operational mode. 0x26 in bootloader mode. Signed-off-by: Yufeng Shen <miletus@chromium.org> Signed-off-by: Benson Leung <bleung@chromium.org> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-27Platform: x86: chromeos_laptop - Add support for probing devicesBenson Leung1-0/+20
This will allow support for devices that may appear at more than one i2c address at boot time. The specific example is the atmel_mxt touch devices, which may appear at a different address if it comes up in bootloader mode. Signed-off-by: Benson Leung <bleung@chromium.org> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-27Platform: x86: chromeos_laptop - Add Pixel TrackpadBenson Leung1-0/+29
Instantiate the atmel mxt224s trackpad on this system. The trackpad may appear at two possible addresses: 0x4b in operational mode. 0x25 in bootloader mode. Signed-off-by: Benson Leung <bleung@chromium.org> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-27hp-wmi: fix handling of platform deviceDmitry Torokhov1-39/+30
The driver will not quite work if someone unbinds the platform device from the platform driver via sysfs (moreover it will bomb is the driver built into the kernel as hp_wmi_bios_remove is marked as __exit and will not be present in the kernel). To fix it let's use platform_driver_probe() instead of platform_driver_register(), which disables binding/unbinding via sysfs. This also allows us to mark hp_wmi_bios_setup as __init and discard it once module is initialized. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-27sony-laptop: leak in error handling sony_nc_lid_resume_setup()Dan Carpenter1-1/+1
We need to decrement "i" first because the current "i" was not allocated succesfully. Also we should go free the way down to zero to avoid a leak. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-27hp-wmi: Add support for SMBus hotkeysKyle Evans1-0/+4
Several models of HP laptops using the same DSDT have hotkey buttons that do not work until the EC is configured to enable them. Signed-off-by: Kyle Evans <kvans32@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-27asus-wmi: Fix unused function build warningShuah Khan1-5/+0
Fix the following build warning CC [M] drivers/platform/x86/asus-wmi.o drivers/platform/x86/asus-wmi.c:1356:13: warning: ‘do_nothing’ defined but not used [-Wunused-function] Signed-off-by: Shuah Khan <shuah.khan@hp.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-27acer-wmi: avoid the warning of 'devices' may be used uninitializedLee, Chun-Yi1-0/+3
Fengguang Wu run kernel build test to platform-drivers-x86/linux-next git tree on x86_64 architecture and found a warning that was introduced by 727651bf738b6b917335025d09323d0962eda114 commit: drivers/platform/x86/acer-wmi.c: In function ‘WMID_set_capabilities’: drivers/platform/x86/acer-wmi.c:1211: warning: ‘devices’ may be used uninitialized in this function This patch fixes the above warning message. 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: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-27drivers/platform/x86/thinkpad_acpi.c: Handle HKEY event 0x6040Richard Hartmann1-3/+8
Handle HKEY event generated on AC power change. The current message asks users to submit data related to this event which leads to a lot of confusion and noise on the mailing list. The following is a list affected models and 'Message-Id' from ibm-acpi-devel@lists.sourceforge.net of people who saw this event when either plugging or unplugging the AC adapter or docking or undocking their laptop. X120e - CAAAujb5v9dHdbdxDVvhNJoG4UrZC1TgKqeB_zGpAy7q8kZHMEQ@mail.gmail.com X121e - 20120817143459.GB3462@x1.osrc.amd.com X220 - Confirmed by Richard Hartmann X220i - 4F406274.7070807@gmail.com X220t - 4F489F5B.9040705@cs.tu-berlin.de X230 - CAKx4u7kqvVH0-gstomsiVYdGC0i6=bGxzaQ8sq9gbg76TGme3w@mail.gmail.com T420 - 9c848ee30b006737d0534d906bab0cf6@niklaas-baudet.net T420s - 20120608080824.GS25324@hexapodia.org W520 - 20121008181050.GF2549@ericlaptop.home.christensenplace.us Signed-off-by: Richard Hartmann <richih.mailinglist@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-27Platform: x86: chromeos_laptop - Add HP Pavilion 14Benson Leung1-0/+7
Add support for the HP Pavilion 14 Chromebook's trackpad, which is a reuse of the Samsung Series 5 550 trackpad. Signed-off-by: Benson Leung <bleung@chromium.org> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>