aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-08-16fujitsu-laptop: Mark fujitsu_dmi_table[] DMI table as __initconstMathias Krause1-5/+5
The DMI table is only ever used during initialization. Mark it as __initconst so its memory can be released afterwards -- roughly 1.5 kB. In turn, the callback functions can be marked with __init, too. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: Jonathan Woithe <jwoithe@just42.net> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16hp-wmi: Add missing __init annotations to initialization codeMathias Krause1-3/+3
These functions are only called from other initialization routines, so can be marked __init, too. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16hp_accel: Constify ACPI and DMI tablesMathias Krause1-2/+2
Constify the lis3lv02d_device_ids[] ACPI and the lis3lv02d_dmi_ids[] DMI tables. There's no need to have them writeable during runtime. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: Eric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16fujitsu-tablet: Mark DMI callbacks as __init codeMathias Krause1-3/+3
The DMI table is already marked as __initconst, so can be the callback functions as they're only used in that context. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: Robert Gerlach <khnz@gmx.de> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16dell-laptop: Mark dell_quirks[] DMI table as __initconstMathias Krause1-3/+3
The dell_quirks[] DMI table is only ever used during initialization. Mark it as __initconst so its memory can be released afterwards -- roughly 5.7 kB. In turn, the callback function can be marked with __init, too. Also the touchpad_led_init() function can be marked __init as it's only referenced from dell_init() -- an __init function. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16eeepc-wmi: Constify asus_quirks[] DMI tableMathias Krause1-1/+1
Constify the asus_quirks[] DMI table. There's no need to have it writeable during runtime. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16acer-wmi: Mark init data and code as suchMathias Krause1-20/+21
Quite a lot of code and data of acer-wmi.c is only ever used during initialization. Mark those accordingly -- and constify, where appropriate -- so the memory can be released afterwards. All in all those changes move ~10 kB of code and data to the .init sections, marking them for release after initialization has finished. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: "Lee, Chun-Yi" <jlee@suse.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16asus-nb-wmi: Constify asus_quirks[] DMI tableMathias Krause1-1/+1
Constify the asus_quirks[] DMI table. There's no need to have it writeable during runtime. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16alienware-wmi: Mark DMI table as __initconstMathias Krause1-2/+2
The DMI table is only ever used during initialization. Mark it as __initconst so its memory can be released appropriately. In turn, the callback function can be marked with __init, too. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16acer-wmi: Hide acer_{suspend,resume} for !CONFIG_PM_SLEEPMathias Krause1-0/+5
Encapsulate acer_suspend() and acer_resume with #ifdef CONFIG_PM_SLEEP to get rid of the following warnings: ../acer-wmi.c:2046:12: warning: ‘acer_suspend’ defined but not used [-Wunused-function] ../acer-wmi.c:2068:12: warning: ‘acer_resume’ defined but not used [-Wunused-function] Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: "Lee, Chun-Yi" <jlee@suse.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16acer-wmi: Mark acer_wmi_keymap[] as __initconstMathias Krause1-1/+1
sparse_keymap_setup() will make a copy of the keymap, so we can release the master copy after initialization. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: "Lee, Chun-Yi" <jlee@suse.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16WMI: Remove unnecessary null testHimangi Saraogi1-4/+0
This patch removes the null test on block. block is initialized at the beginning of the function to &wblock->gblock. Since wblock is dereferenced prior to the null test, wblock must be a valid pointer, and &wblock->gblock cannot be null. The following Coccinelle script is used for detecting the change: @r@ expression e,f; identifier g,y; statement S1,S2; @@ *e = &f->g <+... f->y ...+> *if (e != NULL || ...) S1 else S2 Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16drivers/platform/x86/thinkpad_acpi.c: don't test unsigned int for negativityAndrey Utkin1-1/+1
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80231 Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16asus-nb-wmi: Add wapf4 quirk for the X550CLHans de Goede1-0/+9
As reported here: https://bugs.launchpad.net/bugs/1277959 the X550CL needs wapf=4 too. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16asus-nb-wmi: Add ASUSTeK COMPUTER INC. X200CAAceLan Kao1-0/+13
BIOS won't light on the wifi-led after S3, so asus-wmi driver needs to control the wifi and wifi-led status. But, it'll lead to bt status error if asus-wmi driver controls bt as well. So, for X200CA, asus-wmi driver controls wifi status only and have to set wapf to 1. Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16asus-wmi: control wlan-led if wapf > 0AceLan Kao1-2/+2
Wifi will be controlled by asus-wmi driver when wapf > 0 So, controls the wifi-led when wapf > 0 Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16asus-wmi: backlight_init: Stop treating -ENODEV as if its not an errorHans de Goede1-4/+1
When bl_power support got added to asus-wmi, the error handling for it was written to ignore -ENODEV, to avoid not registering a backlight interface for models which have no bl_power control, but do have brightness control. At the same time the error handling for brightness_max was modified to do the same, this is wrong, when there is no brightness_max asus-wmi should not register a backlight interface. Note the caller of asus_wmi_backlight_init already special cases -ENODEV, and will not cause the wmi driver regristration to fail because of a -ENODEV return from asus_wmi_backlight_init. https://bugzilla.redhat.com/show_bug.cgi?id=1097436 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16asus-wmi: Disable acpi-video backlight on desktop machinesHans de Goede1-0/+7
Some Asus motherboards for desktop PC-s export an acpi-video interface advertising backlight support. Test the dmi chassis-type and tell acpi-video to not register a backlight interface on desktops. https://bugzilla.redhat.com/show_bug.cgi?id=1097436 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16ideapad-laptop: Change Lenovo Yoga 2 series rfkill handlingHans de Goede1-14/+27
It seems that the same problems which lead to adding an rfkill blacklist and putting the Lenovo Yoga 2 11 on it are also present on the Lenovo Yoga 2 13 and Lenovo Yoga 2 Pro too: https://bugzilla.redhat.com/show_bug.cgi?id=1021036 https://forums.lenovo.com/t5/Linux-Discussion/Yoga-2-13-not-Pro-Linux-Warning/m-p/1517612 Testing has shown that the firmware rfkill settings are persistent over reboots. So blacklisting the driver is not good enough, if the wifi is blocked at the firmware level the wifi needs to be explictly unblocked through the ideapad-laptop interface. And at least on the Lenovo Yoga 2 13 the VPCCMD_RF register which on devices with hardware kill switch reports the hardware switch state, needs to be explictly set to 1 (radio enabled / not blocked). So this patch does 3 things to get proper rfkill handling on these models: 1) Instead of blacklisting the rfkill functionality, which means that people with a firmware blocked wifi get stuck in that situation, ignore the value reported by the not present hardware rfkill switch, as this is what is causing ideapad-laptop to wrongly report all radios as hardware blocks. But do register the rfkill interfaces so that the user can soft [un]block them. 2) On models without a hardware rfkill switch, explictly set VPCCMD_RF to 1 3) Drop the " 11" postfix from the dmi match string, as the entire Yoga 2 series is affected. Yoga 2 11: Reported-and-tested-by: Vincent Gerris <vgerris@gmail.com> Yoga 2 13: Tested-by: madls05 <http://ubuntuforums.org/showthread.php?t=2215044> Yoga 2 Pro: Reported-and-tested-by: Peter F. Patel-Schneider <pfpschneider@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16thinkpad_acpi: Update mapping for F12 hotkey on *40 models to KEY_FILEHans de Goede1-1/+1
The new keyboard found on the *40 models is also being sold as a standalone keyboard (with trackpoint): http://shop.lenovo.com/us/en/itemdetails/0B47189/460/60AC6A0372B14F5BA7B12F1FF88E33C7 This uses a standard HUT code for the F12 key with the 6 square boxes on it, which gets mapped to KEY_FILE by the kernel. Change the mapping done of identical laptop key done by thinkpad_acpi to also send KEY_FILE for consistency. Cc: Jamie Lentin <jm@lentin.co.uk> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16eeepc-laptop: rename _set and _get arguments in macroPaul Bolle1-4/+4
The _set and _get arguments to the EEEPC_CREATE_SENSOR_ATTR() macro are confusingly named: _set should be _get and vice versa. Rename these arguments. Drop the trailing semicolon from that macro, while we're at it. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16fujitsu-laptop: Clear build warningsJean Delvare1-5/+4
When CONFIG_FUJITSU_LAPTOP_DEBUG is disabled and W=1, the fujitsu-laptop driver builds with the following warnings: drivers/platform/x86/fujitsu-laptop.c: In function "bl_update_status": drivers/platform/x86/fujitsu-laptop.c:409:8: warning: suggest braces around empty body in an "if" statement [-Wempty-body] ret); ^ drivers/platform/x86/fujitsu-laptop.c:418:8: warning: suggest braces around empty body in an "if" statement [-Wempty-body] ret); ^ Rework the debug printk helper macro to get rid of these. I verified that this change has no effect on the generated binary, both in the debug and non-debug case. Signed-off-by: Jean Delvare <jdelvare@suse.de> Acked-by: Jonathan Woithe <jwoithe@just42.net> Cc: Matthew Garrett <matthew.garrett@nebula.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16platform/x86/toshiba-apci.c possible bad if test?Nick1-1/+1
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16sony-laptop: fix doesn't work lid resume settings on Vaio Promog4221-1/+1
Signed-off-by: mog422 <admin@mog422.net> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16WAPF 4 for ASUSTeK COMPUTER INC. X75VBP WLAN ON.poma1-0/+9
The 'asus-nb-wmi' WAPF parameter must be set to 4, so the internal Wireless LAN device is operational. Signed-off-by: poma <pomidorabelisima@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-12PCI: Remove DEFINE_PCI_DEVICE_TABLE macro useBenoit Taine2-2/+2
We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to meet kernel coding style guidelines. This issue was reported by checkpatch. A simplified version of the semantic patch that makes this change is as follows (http://coccinelle.lip6.fr/): // <smpl> @@ identifier i; declarer name DEFINE_PCI_DEVICE_TABLE; initializer z; @@ - DEFINE_PCI_DEVICE_TABLE(i) + const struct pci_device_id i[] = z; // </smpl> [bhelgaas: add semantic patch] Signed-off-by: Benoit Taine <benoit.taine@lip6.fr> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2014-08-10Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/olof/chrome-platformLinus Torvalds2-22/+132
Pull chrome platform updates from Olof Johansson: "Updates to the Chromebook/box platform drivers: - a bugfix to pstore registration that makes it also work on non-Google systems - addition of new shipped Chromebooks (later models have more probing through ACPI so the need for these updates will be less over time). - A couple of minor coding style updates" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/olof/chrome-platform: platform/chrome: chromeos_laptop - Add a limit for deferred retries platform/chrome: Add support for the acer c720p touchscreen. platform/chrome: pstore: fix dmi table to match all chrome systems platform/chrome: coding style fixes platform/chrome: chromeos_laptop - Add Toshiba CB35 Touch platform/chrome: chromeos_laptop - Add Dell Chromebook 11 touch platform/chrome: chromeos_laptop - Add HP Chromebook 14 platform/chrome: chromeos_laptop - Add support for Acer C720
2014-08-08Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds1-4/+0
Pull input updates from Dmitry Torokhov: - big update to Wacom driver by Benjamin Tissoires, converting it to HID infrastructure and unifying USB and Bluetooth models - large update to ALPS driver by Hans de Goede, which adds support for newer touchpad models as well as cleans up and restructures the code - more changes to Atmel MXT driver, including device tree support - new driver for iPaq x3xxx touchscreen - driver for serial Wacom tablets - driver for Microchip's CAP1106 - assorted cleanups and improvements to existing drover and input core * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (93 commits) Input: wacom - update the ABI doc according to latest changes Input: wacom - only register once the MODULE_* macros Input: HID - remove hid-wacom Bluetooth driver Input: wacom - add copyright note and bump version to 2.0 Input: wacom - remove passing id for wacom_set_report Input: wacom - check for bluetooth protocol while setting OLEDs Input: wacom - handle Intuos 4 BT in wacom.ko Input: wacom - handle Graphire BT tablets in wacom.ko Input: wacom - prepare the driver to include BT devices Input: hyperv-keyboard - register as a wakeup source Input: imx_keypad - remove ifdef round PM methods Input: jornada720_ts - get rid of space indentation and use tab Input: jornada720_ts - switch to using managed resources Input: alps - Rushmore and v7 resolution support Input: mcs5000_ts - remove ifdef around power management methods Input: mcs5000_ts - protect PM functions with CONFIG_PM_SLEEP Input: ads7846 - release resources on failure for clean exit Input: wacom - add support for 0x12C ISDv4 sensor Input: atmel_mxt_ts - use deep sleep mode when stopped ARM: dts: am437x-gp-evm: Update binding for touchscreen size ...
2014-07-24Merge tag 'v3.16-rc6' into nextDmitry Torokhov18-85/+508
Merge with mainline to bring in changes to MFD to allow merging ipaq-micro-ts driver.
2014-07-23Input: atmel_mxt_ts - download device config using firmware loaderNick Dyer1-4/+0
The existing implementation which encodes the configuration as a binary blob in platform data is unsatisfactory since it requires a kernel recompile for the configuration to be changed, and it doesn't deal well with firmware changes that move values around on the chip. Atmel define an ASCII format for the configuration which can be exported from their tools. This patch implements a parser for that format which loads the configuration via the firmware loader and sends it to the MXT chip. Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Acked-by: Benson Leung <bleung@chromium.org> Acked-by: Yufeng Shen <miletus@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-15platform/chrome: chromeos_laptop - Add a limit for deferred retriesBenson Leung1-4/+41
Limit the number of times we allow deferred probing to attempt to add i2c devices. This will help with some device flakiness at probe time. For example, some touchpads and touchscreens may be in transition between bootloader and operational mode and may appear at neither address briefly. Adapters, however, have no limit as it depends on when the i2c adapter driver module is loaded. The module may even be loaded manually by the user using modprobe or insmod. By default, set MAX_I2C_DEVICE_DEFERALS to 5. Based on this patch from the chromeos-kernel : https://chromium-review.googlesource.com/168130 Signed-off-by: Benson Leung <bleung@chromium.org> Signed-off-by: Olof Johansson <olof@lixom.net>
2014-07-15platform/chrome: Add support for the acer c720p touchscreen.Michael Mullin1-0/+2
Add support for the acer c720p touchscreen. Tested manually by using the touchscreen on the acer c720p-2664 Based on the following patch by Dave Parker <dparker@chromium.org>: https://chromium-review.googlesource.com/#/c/167136/ Signed-off-by: Michael Mullin <masmullin@gmail.com> Reviewed-by: Benson Leung <bleung@chromium.org> Signed-off-by: Olof Johansson <olof@lixom.net>
2014-07-10platform/chrome: pstore: fix dmi table to match all chrome systemsOlof Johansson1-12/+2
Turns out that DMI_SYSTEM_VENDOR is actually the native vendor of each Chromebook/box. I tested the original patch on a Pixel that -- surprise, has Google as vendor. *facepalm*. The only other data I can think of to probe on is Google_* in the version string. Checking with our firmware team, all systems should have this and nothing else than Chrome hardware should have the coreboot + Google_* combination to date. So, we'll switch to this. For future platforms we are going to move to using an ACPI device to configure this instead of a DMI table (yay!), so longer-term that will sort itself out. Signed-off-by: Olof Johansson <olof@lixom.net> Reviewed-by: Benson Leung <bleung@chromium.org>
2014-07-10platform/chrome: coding style fixesRobin Schroer1-0/+3
added blank lines after declarations in some places Signed-off-by: Robin Schroer <sulamiification@gmail.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2014-07-10platform/chrome: chromeos_laptop - Add Toshiba CB35 TouchGene Chen1-0/+15
Add support for Leon touch devices, which is the same as falco/peppy/wolf on the same buses using the LynxPoint-LP I2C via the i2c-designware-pci driver. Based on these patches from the chromeos-3.8 kernel: https://chromium-review.googlesource.com/168351 https://chromium-review.googlesource.com/173445 Signed-off-by: Gene Chen <gene.chen@intel.com> Signed-off-by: Benson Leung <bleung@chromium.org> Tested-by: Scot Doyle <lkml14@scotdoyle.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2014-07-10platform/chrome: chromeos_laptop - Add Dell Chromebook 11 touchMohammed Habibulla1-0/+15
Add support for Dell Chromebook 11's touch device, which is the same as falco/peppy on the same bus using the LynxPoint-LP I2C via the i2c-designware-pci driver. Based on these patches from the chromeos-3.8 kernel: https://chromium-review.googlesource.com/#/c/65320/ https://chromium-review.googlesource.com/#/c/174664/ Signed-off-by: Mohammed Habibulla <moch@chromium.org> Signed-off-by: Benson Leung <bleung@chromium.org> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2014-07-10platform/chrome: chromeos_laptop - Add HP Chromebook 14Benson Leung1-0/+15
Add support for the trackpad on HP Chromebook 14. Signed-off-by: Benson Leung <bleung@chromium.org> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2014-07-10platform/chrome: chromeos_laptop - Add support for Acer C720Mika Westerberg1-6/+39
Acer C720 has touchpad and light sensor connected to a separate I2C buses. Since the designware I2C host controller driver has two instances on this particular machine we need a way to match the correct instance. Add support for this and then register both C720 touchpad and light sensor. This code is based on following patch from Benson Leung: https://patchwork.kernel.org/patch/3074411/ Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Tested-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Benson Leung <bleung@chromium.org> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2014-06-23backlight: Remove trivial get_brightness implementationsAndrzej Hajda1-6/+0
Since backlight core returns props.brightness in case get_brightness is not implemented trivial implementations are not needed anymore. Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-06-10Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86Linus Torvalds14-65/+467
Pull x86 platform driver updates from Matthew Garrett: "Very little of excitement here - the most significant is a new driver for detecting device freefall on Dells, other than that it's pretty much entirely minor fixes for specific machines" * 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86: hp-wmi: Enable hotkeys on some systems thinkpad_acpi: Add mappings for F9 - F12 hotkeys on X240 / T440 / T540 platform: x86: dell-smo8800: Dell Latitude freefall driver (ACPI SMO8800/SMO8810) ideapad_laptop: Introduce the use of the managed version of kzalloc platform/x86: Fix run-time dependencies of OLPC drivers platform: x86: asus-wmi.c: Cleaning up uninitialized variables ix86/mid/thermal: Introduce the use of the managed version of kzalloc platform x86 Kconfig: Refer to the laptop list in the Compal driver help Documentation: Add list of laptop models supported by the Compal driver ideapad-laptop: Blacklist rfkill control on the Lenovo Yoga 2 11 asus-wmi: Set WAPF to 4 for Asus X550CA alienware-wmi: For WMAX HDMI method, introduce a way to query HDMI cable status alienware-wmi: Update WMAX brightness method limit to 15 pvpanic: Set high notifier priority platform/x86: samsung-laptop: Add support for Samsung's NP7[34]0U3E models. toshiba_acpi: Add alternative keymap support for Satellite M840 platform-drivers-x86: intel_pmic_gpio: Fix off-by-one valid offset range check
2014-06-10hp-wmi: Enable hotkeys on some systemsKyle Evans1-0/+18
This is a third attempt to enable these buttons. The new variable being commit 997daa1bd9aca412ab97955a35b26c460c0ec7a4 (i.e. hp-wmi: detect "2009 BIOS or later"). Older systems that do not have the 2009 BIOS query method respond with a dummy value, in this case 4. Using that, we can target a fairly narrow group of systems. i.e. old enough to not have HPWMI_FEATURE_QUERY 0xd, but new enough to have HPWMI_BIOS_QUERY 0x9. This group may be further limited if some systems respond with something other than 4 to non-existant feature queries. Signed-off-by: Kyle Evans <kvans32@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-06-10thinkpad_acpi: Add mappings for F9 - F12 hotkeys on X240 / T440 / T540Hans de Goede1-1/+3
The T440s user guide says that when Fn-lock is not active, the *40s' F9 - F12 keys should be mapped to: control-panel, search, show-all-windows and Computer. These keys generate the sofar unused 28 - 31 hotkey scancodes. For the first 2 this nicely matches the icons on the keys, for the latter 2 the icons are somewhat creative, which is why I ended up looking them up in the user manual. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-06-10platform: x86: dell-smo8800: Dell Latitude freefall driver (ACPI SMO8800/SMO8810)Pali Rohár3-0/+244
This acpi driver provide supports for freefall sensors SMO8800/SMO8810 which can be found on Dell Latitude laptops. Driver register /dev/freefall misc device which has same interface as driver hp_accel freefall driver. So any existing applications for HP freefall sensor /dev/freefall will work for with this new driver for Dell Latitude laptops too. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Cc: Sonal Santan <sonal.santan@gmail.com> Tested-By: Valdis Kletnieks <valdis.kletnieks@vt.edu> Acked-By: Valdis Kletnieks <valdis.kletnieks@vt.edu> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-06-10ideapad_laptop: Introduce the use of the managed version of kzallocHimangi Saraogi1-5/+3
This patch moves data allocated using kzalloc to managed data allocated using devm_kzalloc and cleans now unnecessary kfrees in probe and remove functions. The label sysfs_failed is removed as it is no longer required. Also, linux/device.h is added to make sure the devm_*() routine declarations are unambiguously available. The following Coccinelle semantic patch was used for making the change: @platform@ identifier p, probefn, removefn; @@ struct platform_driver p = { .probe = probefn, .remove = removefn, }; @prb@ identifier platform.probefn, pdev; expression e, e1, e2; @@ probefn(struct platform_device *pdev, ...) { <+... - e = kzalloc(e1, e2) + e = devm_kzalloc(&pdev->dev, e1, e2) ... ?-kfree(e); ...+> } @rem depends on prb@ identifier platform.removefn; expression e; @@ removefn(...) { <... - kfree(e); ...> } Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-06-10platform/x86: Fix run-time dependencies of OLPC driversJean Delvare1-1/+2
Let the xo15-ebook driver depend on OLPC as all other OLPC drivers already do. Add COMPILE_TEST as an alternative for both xo1-rfkill and xo15-ebook, to increase the build testing coverage. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Matthew Garrett <matthew.garrett@nebula.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-06-10platform: x86: asus-wmi.c: Cleaning up uninitialized variablesRickard Strandqvist1-3/+1
There is a risk that the variable will be used without being initialized. This was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-06-10ix86/mid/thermal: Introduce the use of the managed version of kzallocHimangi Saraogi1-5/+2
This patch moves data allocated using kzalloc to managed data allocated using devm_kzalloc and cleans now unnecessary kfrees in probe and remove functions. The following Coccinelle semantic patch was used for making the change: @platform@ identifier p, probefn, removefn; @@ struct platform_driver p = { .probe = probefn, .remove = removefn, }; @prb@ identifier platform.probefn, pdev; expression e, e1, e2; @@ probefn(struct platform_device *pdev, ...) { <+... - e = kzalloc(e1, e2) + e = devm_kzalloc(&pdev->dev, e1, e2) ... ?-kfree(e); ...+> } @rem depends on prb@ identifier platform.removefn; expression e; @@ removefn(...) { <... - kfree(e); ...> } Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-06-10platform x86 Kconfig: Refer to the laptop list in the Compal driver helpIsmael Luceno1-10/+8
Signed-off-by: Ismael Luceno <ismael.luceno@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-06-10ideapad-laptop: Blacklist rfkill control on the Lenovo Yoga 2 11Hans de Goede1-5/+18
The Lenovo Yoga 2 11 always reports everything as blocked, causing userspace to not even try to use the wlan / bluetooth even though they work fine. Note this patch also removes the "else priv->rfk[i] = NULL;" bit of the rfkill initialization, it is not necessary as the priv struct is allocated with kzalloc. Reported-and-tested-by: Vincent Gerris <vgerris@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-06-10asus-wmi: Set WAPF to 4 for Asus X550CAAndreas Utterberg1-0/+9
The 'asus-nb-wmi' WAPF parameter must be set to 4, so the internal Wireless LAN device is operational. Signed-off-by: Andreas Utterberg <andreas.utterberg@thundera.se> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>