summaryrefslogtreecommitdiff
path: root/drivers/platform/x86
AgeCommit message (Collapse)Author
2014-11-28Merge remote-tracking branch 'driver-core/driver-core-next'Stephen Rothwell
Conflicts: drivers/base/Makefile drivers/bus/omap_l3_noc.c drivers/hwmon/ibmpowernv.c drivers/input/keyboard/gpio_keys_polled.c drivers/iommu/tegra-smmu.c drivers/leds/leds-gpio.c drivers/memory/tegra30-mc.c drivers/mfd/syscon.c drivers/mtd/devices/docg3.c drivers/net/ieee802154/fakehard.c drivers/staging/media/omap24xx/omap24xxcam.c sound/soc/intel/sst-haswell-pcm.c
2014-11-28Merge remote-tracking branch 'drivers-x86/for-next'Stephen Rothwell
2014-11-24Sony-laptop: Deletion of an unnecessary check before the function call ↵Markus Elfring
"pci_dev_put" The pci_dev_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-11-24platform: x86: Deletion of checks before backlight_device_unregister()Markus Elfring
The backlight_device_unregister() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> For msi-wmi.c: Acked-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-11-24toshiba_acpi: Fix regression caused by backlight extra check codeAzael Avalos
Bug 86521 uncovered that some TOS6208 devices also return non zero values on a write call to the backlight method, thus getting caught and bailed out by the extra check code. This patch changes the set_lcd_brightness function to its "original" state by just adapting it to the new function format. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-11-24asus-nb-wmi: Add another wapf=4 quirkHans de Goede
Wifi on this laptop does not work unless asus-nb-wmi.wapf=4 is specified on the kerne commandline, add a quirk for this. Cc: stable@vger.kernel.org BugLink: https://bugs.launchpad.net/bugs/1173681 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-11-20intel_ips: fix a type in error messageMasatake YAMATO
Signed-off-by: Masatake YAMATO <yamato@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-11-19hp_accel: Add support for HP ZBook 15Dominique Leuenberger
HP ZBook 15 laptop needs a non-standard mapping (x_inverted). BugLink: http://bugzilla.opensuse.org/show_bug.cgi?id=905329 Signed-off-by: Dominique Leuenberger <dimstar@opensuse.org> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-11-19dell-wireless: new driver for dell wireless button for Windows 8Alex Hung
This is for Dell's new ACPI device for radio switches with ACPI ID "DELLABCE". This device is Dell's solution for Microsoft Windows 8's new requirement for wireless hotkeys. When wireless hotkey is pressed, BIOS issues a Notify(RBTN, 0x80) which is tanslated to a keycode KEY_RFKILL to userspace. Signed-off-by: Alex Hung <alex.hung@canonical.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-11-19dell-wmi: Update code for processing WMI eventsPali Rohár
The WMI buffer can contain multiple events. First value in buffer is length of event followed by data of specified length. After that is next length and next data. When length is zero then there is no more events in bufffer. This patch adds support for processing all events in buffer (not only first) and parse more event types (not only hotkey events). Because of variable length of events sometimes BIOS fills more hotkeys (or other values) into single WMI event. In this case this patch also processes these multiple hotkeys (and not only first one). Some event types are just ignored because kernel is not interested in them (e.g. NIC Link status, battery unplug, ...). This patch is based on DSDT table from Dell Latitude E6440. Code should be backward compatible so will process other events of old types same as before this patch. This patch also fixes a problem with unknown WMI event messages being written to the log. Now all known events are parsed and those which are not interesting to the kernel are dropped without an unknown WMI event message. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Tested-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-11-19eeepc-laptop: clean up control flow in eeepc_acpi_notifyFrans Klaver
eeepc_acpi_notify increases the indentation level to a whopping four. If we revise the conditions a bit, we can reduce that to a more soothing two and satisfy the indentation guidelines in Documentation/CodingStyle. Remove an unwanted space while we're in the neighbourhood. Signed-off-by: Frans Klaver <fransklaver@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-11-19intel_ips: fix a comment typoChen Hanxiao
s/tempurature/temperature/ Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-11-19eeepc-laptop: don't assume get_acpi succeedsFrans Klaver
In eeepc_hotk_thaw, we assume that get_acpi() will effectively return a bool. However, it is possible that get_acpi() returns an error instead. We should not be writing error values to the ACPI device, even though it's quite possible that we couldn't contact the ACPI device in the first place. Signed-off-by: Frans Klaver <fransklaver@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-11-19eeepc-laptop: document fan_pwm conversionsFrans Klaver
eeepc_get_fan_pwm and eeepc_set_fan_pwm convert the PWM value read from the fan to a range lmsensors understands. Unfortunately this is only clear if you are familiar with how lmsensors handles duty cycles. Introduce two conversion functions that document the goal of these conversions. Signed-off-by: Frans Klaver <fransklaver@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-11-19eeepc-laptop: replace magic numbers with definesFrans Klaver
eeepc_[gs]et_fan_ctrl uses some magic numbers. These numbers mean something more than just the number. Describe them with macros instead of comments in one of the functions. Signed-off-by: Frans Klaver <fransklaver@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-11-19eeepc-laptop: define rfkill notifier nodes only onceFrans Klaver
The rfkill notifier node names are used in three different places. As a matter of style, it is better to store them somewhere and have the compiler warn us about typos in the function arguments. Signed-off-by: Frans Klaver <fransklaver@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-11-19eeepc-laptop: don't break user visible stringsFrans Klaver
As per Documentation/CodingStyle ch. 2, it is preferred that we don't break user visible strings, in order to allow users to grep for them. Signed-off-by: Frans Klaver <fransklaver@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-11-19eeepc-laptop: flatten control flowFrans Klaver
In eeepc_rfkill_hotplug there's an if statement with a big tail that ends right before the out_unlock label. We might as well invert the condition and jump to out_unlock in that case, pretty much like the rest of the code does. This removes an indentation level for a large chunk of code and also stops suggesting there might be an else clause. Signed-off-by: Frans Klaver <fransklaver@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-11-19drivers: platform: change 0x20 to I8042_STR_AUXDATA in i8042 filtersGiedrius Statkevičius
Instead of using a magic constant 0x20 in some drivers to get data only from the KBC port we should use the constant defined in i8042.h with the same value. Also, this makes these drivers uniform with what constant the only other filter function uses in drivers/input/misc/ideapad_slidebar.c. Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-11-10platform: hp_accel: Add SERIO_I8042 as a dependency since it now includes ↵Giedrius Statkevicius
i8042.h/serio.h Make hp_accel dependent on SERIO_I8042 in the Kconfig because since commit a4c724d0723b078e4ab4670e557cda1795036a7a ('platform: hp_accel: add a i8042 filter to remove HPQ6000 data from kb bus stream') hp_accel includes i8042.h and serio.h. Reported-by: Jim Davis <jim.epost@gmail.com> Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-11-07platform: hp_accel: add a i8042 filter to remove HPQ6000 data from kb bus streamGiedrius Statkevicius
Add a i8042 filter to hp_accel to remove accelerometer's data with acpi id HPQ6000 from keyboard bus stream. The codes sent by accelerometer are e0 25, e0 26, e0 27 and e0 28. The relevant information is already passed through /dev/freefall so no need to send these undocumented weird signals through the keyboard bus. Also, unclogs `dmesg` because atkbd complained about weird scan codes, saves processing power and disk space. Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Éric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-10-27quirk for Lenovo Yoga 3: no rfkill switchStephan Mueller
The Yoga 3 does not contain any physical rfkill switch. Therefore disable the rfkill switch identically to the Yoga 2 approach. Signed-off-by: Stephan Mueller <smueller@chronox.de> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-10-27acer-wmi: Add acpi_backlight=video quirk for the Acer KAV80Hans de Goede
The acpi-video backlight interface on the Acer KAV80 is broken, and worse it causes the entire machine to slow down significantly after a suspend/resume. Blacklist it, and use the acer-wmi backlight interface instead. Note that the KAV80 is somewhat unique in that it is the only Acer model where we fall back to acer-wmi after blacklisting, rather then using the native (e.g. intel) backlight driver. This is done because there is no native backlight interface on this model. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1128309 Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-10-27samsung-laptop: Add broken-acpi-video quirk for NC210/NC110Hans de Goede
The acpi-video backlight interface on the NC210 does not work, blacklist it and use the samsung-laptop interface instead. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=861573 Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-10-27asus-nb-wmi: Add wapf4 quirk for the X550VBStanislaw Gruszka
X550VB as many others Asus laptops need wapf4 quirk to make RFKILL switch be functional. Otherwise system boots with wireless card disabled and is only possible to enable it by suspend/resume. Bug report: http://bugzilla.redhat.com/show_bug.cgi?id=1089731#c23 Reported-and-tested-by: Vratislav Podzimek <vpodzime@redhat.com> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-10-27toshiba_acpi: Add Toshiba TECRA A50-A to the alt keymap dmi listAaron Lu
As bug #72551, the Toshiba TECRA A50-A series models also come with the new keymap layout as found out by Azael Avalos, so add it to the dmi table. Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=76971 Reported-and-tested-by: Blindekinder <rafael.raccuia@blindekinder.com> Cc: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-10-20platform: x86: drop owner assignment from platform_driversWolfram Sang
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-14thinkpad_acpi: replace strnicmp with strncasecmpRasmus Villemoes
The kernel used to contain two functions for length-delimited, case-insensitive string comparison, strnicmp with correct semantics and a slightly buggy strncasecmp. The latter is the POSIX name, so strnicmp was renamed to strncasecmp, and strnicmp made into a wrapper for the new strncasecmp to avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br> Cc: Darren Hart <dvhart@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-12Merge tag 'platform-drivers-x86-v3.18-1' of ↵Linus Torvalds
git://git.infradead.org/users/dvhart/linux-platform-drivers-x86 Pull x86 platform driver updates from Darren Hart: "The following have all spent at least a few days in linux-next, most for more than a week. These are mostly cleanups and error handling improvements with a few updates to extend existing support to newer hardware. Details: - dell-wmi: fix access out of memory - eeepc-laptop: cleanups, refactoring, sysfs perms, and improved error handling - intel-rst: ACPI and error handling cleanups - thinkpad-acpi: whitespace cleanup - toshiba_acpi: HCI/SCI interface update, keyboard backlight type 2 support, new scancodes, cleanups" * tag 'platform-drivers-x86-v3.18-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: (23 commits) toshiba_acpi: Adapt kbd_bl_timeout_store to the new kbd type toshiba_acpi: Change HCI/SCI functions return code type toshiba_acpi: Unify return codes prefix from HCI/SCI to TOS toshiba_acpi: Rename hci_raw to tci_raw dell-wmi: Fix access out of memory eeepc-laptop: clean up control flow in *_rfkill_notifier eeepc-laptop: store_cpufv: return error if set_acpi fails eeepc-laptop: check proper return values in get_cpufv eeepc-laptop: make fan1_input really read-only eeepc-laptop: pull out SENSOR_STORE_FUNC and SENSOR_SHOW_FUNC macros eeepc-laptop: tell sysfs that the disp attribute is write-only eeepc-laptop: pull out ACPI_STORE_FUNC and ACPI_SHOW_FUNC macros eeepc-laptop: use DEVICE_ATTR* to instantiate device_attributes eeepc-laptop: change sysfs function names to API expectations eeepc-laptop: clean up coding style eeepc-laptop: simplify parse_arg() intel-rst: Clean up ACPI add function intel-rst: Use ACPI_FAILURE() macro instead !ACPI_SUCCESS() for error checking x86: thinkpad_acpi.c: fixed spacing coding style issue toshiba_acpi: Support new keyboard backlight type ...
2014-10-09Merge tag 'pm+acpi-3.18-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI and power management updates from Rafael Wysocki: "Features-wise, to me the most important this time is a rework of wakeup interrupts handling in the core that makes them work consistently across all of the available sleep states, including suspend-to-idle. Many thanks to Thomas Gleixner for his help with this work. Second is an update of the generic PM domains code that has been in need of some care for quite a while. Unused code is being removed, DT support is being added and domains are now going to be attached to devices in bus type code in analogy with the ACPI PM domain. The majority of work here was done by Ulf Hansson who also has been the most active developer this time. Apart from this we have a traditional ACPICA update, this time to upstream version 20140828 and a few ACPI wakeup interrupts handling patches on top of the general rework mentioned above. There also are several cpufreq commits including renaming the cpufreq-cpu0 driver to cpufreq-dt, as this is what implements generic DT-based cpufreq support, and a new DT-based idle states infrastructure for cpuidle. In addition to that, the ACPI LPSS driver is updated, ACPI support for Apple machines is improved, a few bugs are fixed and a few cleanups are made all over. Finally, the Adaptive Voltage Scaling (AVS) subsystem now has a tree maintained by Kevin Hilman that will be merged through the PM tree. Numbers-wise, the generic PM domains update takes the lead this time with 32 non-merge commits, second is cpufreq (15 commits) and the 3rd place goes to the wakeup interrupts handling rework (13 commits). Specifics: - Rework the handling of wakeup IRQs by the IRQ core such that all of them will be switched over to "wakeup" mode in suspend_device_irqs() and in that mode the first interrupt will abort system suspend in progress or wake up the system if already in suspend-to-idle (or equivalent) without executing any interrupt handlers. Among other things that eliminates the wakeup-related motivation to use the IRQF_NO_SUSPEND interrupt flag with interrupts which don't really need it and should not use it (Thomas Gleixner and Rafael Wysocki) - Switch over ACPI to handling wakeup interrupts with the help of the new mechanism introduced by the above IRQ core rework (Rafael Wysocki) - Rework the core generic PM domains code to eliminate code that's not used, add DT support and add a generic mechanism by which devices can be added to PM domains automatically during enumeration (Ulf Hansson, Geert Uytterhoeven and Tomasz Figa). - Add debugfs-based mechanics for debugging generic PM domains (Maciej Matraszek). - ACPICA update to upstream version 20140828. Included are updates related to the SRAT and GTDT tables and the _PSx methods are in the METHOD_NAME list now (Bob Moore and Hanjun Guo). - Add _OSI("Darwin") support to the ACPI core (unfortunately, that can't really be done in a straightforward way) to prevent Thunderbolt from being turned off on Apple systems after boot (or after resume from system suspend) and rework the ACPI Smart Battery Subsystem (SBS) driver to work correctly with Apple platforms (Matthew Garrett and Andreas Noever). - ACPI LPSS (Low-Power Subsystem) driver update cleaning up the code, adding support for 133MHz I2C source clock on Intel Baytrail to it and making it avoid using UART RTS override with Auto Flow Control (Heikki Krogerus). - ACPI backlight updates removing the video_set_use_native_backlight quirk which is not necessary any more, making the code check the list of output devices returned by the _DOD method to avoid creating acpi_video interfaces that won't work and adding a quirk for Lenovo Ideapad Z570 (Hans de Goede, Aaron Lu and Stepan Bujnak) - New Win8 ACPI OSI quirks for some Dell laptops (Edward Lin) - Assorted ACPI code cleanups (Fabian Frederick, Rasmus Villemoes, Sudip Mukherjee, Yijing Wang, and Zhang Rui) - cpufreq core updates and cleanups (Viresh Kumar, Preeti U Murthy, Rasmus Villemoes) - cpufreq driver updates: cpufreq-cpu0/cpufreq-dt (driver name change among other things), ppc-corenet, powernv (Viresh Kumar, Preeti U Murthy, Shilpasri G Bhat, Lucas Stach) - cpuidle support for DT-based idle states infrastructure, new ARM64 cpuidle driver, cpuidle core cleanups (Lorenzo Pieralisi, Rasmus Villemoes) - ARM big.LITTLE cpuidle driver updates: support for DT-based initialization and Exynos5800 compatible string (Lorenzo Pieralisi, Kevin Hilman) - Rework of the test_suspend kernel command line argument and a new trace event for console resume (Srinivas Pandruvada, Todd E Brandt) - Second attempt to optimize swsusp_free() (hibernation core) to make it avoid going through all PFNs which may be way too slow on some systems (Joerg Roedel) - devfreq updates (Paul Bolle, Punit Agrawal, Ãrjan Eide). - rockchip-io Adaptive Voltage Scaling (AVS) driver and AVS entry update in MAINTAINERS (Heiko Stübner, Kevin Hilman) - PM core fix related to clock management (Geert Uytterhoeven) - PM core's sysfs code cleanup (Johannes Berg)" * tag 'pm+acpi-3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (105 commits) ACPI / fan: printk replacement PM / clk: Fix crash in clocks management code if !CONFIG_PM_RUNTIME PM / Domains: Rename cpu_data to cpuidle_data cpufreq: cpufreq-dt: fix potential double put of cpu OF node cpufreq: cpu0: rename driver and internals to 'cpufreq_dt' PM / hibernate: Iterate over set bits instead of PFNs in swsusp_free() cpufreq: ppc-corenet: remove duplicate update of cpu_data ACPI / sleep: Rework the handling of ACPI GPE wakeup from suspend-to-idle PM / sleep: Rename platform suspend/resume functions in suspend.c PM / sleep: Export dpm_suspend_late/noirq() and dpm_resume_early/noirq() ACPICA: Introduce acpi_enable_all_wakeup_gpes() ACPICA: Clear all non-wakeup GPEs in acpi_hw_enable_wakeup_gpe_block() ACPI / video: check _DOD list when creating backlight devices PM / Domains: Move dev_pm_domain_attach|detach() to pm_domain.h cpufreq: Replace strnicmp with strncasecmp cpufreq: powernv: Set the cpus to nominal frequency during reboot/kexec cpufreq: powernv: Set the pstate of the last hotplugged out cpu in policy->cpus to minimum cpufreq: Allow stop CPU callback to be used by all cpufreq drivers PM / devfreq: exynos: Enable building exynos PPMU as module PM / devfreq: Export helper functions for drivers ...
2014-10-09Merge tag 'gpio-v3.18-1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO changes from Linus Walleij: "This is the bulk of GPIO changes for the v3.18 development cycle: - Increase the default ARCH_NR_GPIO from 256 to 512. This was done to avoid having a custom <asm/gpio.h> header for the x86 architecture - GPIO is custom and complicated enough as it is already! We want to move to a radix to store the descriptors going forward, and finally get rid of this fixed array size altogether. - Endgame patching of the gpio_remove() semantics initiated by Abdoulaye Berthe. It is not accepted by the system that the removal of a GPIO chip fails during eg reboot or shutdown, and therefore the return value has now painfully been refactored away. For special cases like GPIO expanders on a hot-pluggable bus like USB, we may later add some gpiochip_try_remove() call, but for the cases we have now, return values are moot. - Some incremental refactoring of the gpiolib core and ACPI GPIO library for more descriptor usage. - Refactor the chained IRQ handler set-up method to handle also threaded, nested interrupts and set up the parent IRQ correctly. Switch STMPE and TC3589x drivers to use this registration method. - Add a .irq_not_threaded flag to the struct gpio_chip, so that also GPIO expanders that block but are still not using threaded IRQ handlers. - New drivers for the ARM64 X-Gene SoC GPIO controller. - The syscon GPIO driver has been improved to handle the "DSP GPIO" found on the TI Keystone 2 SoC:s. - ADNP driver switched to use gpiolib irqchip helpers. - Refactor the DWAPB driver to support being instantiated from and MFD cell (platform device). - Incremental feature improvement in the Zynq, MCP23S08, DWAPB, OMAP, Xilinx and Crystalcove drivers. - Various minor fixes" * tag 'gpio-v3.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (52 commits) gpio: pch: Build context save/restore only for PM pinctrl: abx500: get rid of unused variable gpio: ks8695: fix 'else should follow close brace '}'' gpio: stmpe: add verbose debug code gpio: stmpe: fix up interrupt enable logic gpio: staticize xway_stp_init() gpio: handle also nested irqchips in the chained handler set-up gpio: set parent irq on chained handlers gpiolib: irqchip: use irq_find_mapping while removing irqchip gpio: crystalcove: support virtual GPIO pinctrl: bcm281xx: make Kconfig dependency more strict gpio: kona: enable only on BCM_MOBILE or for compile testing gpio, bcm-kona, LLVMLinux: Remove use of __initconst gpio: Fix ngpio in gpio-xilinx driver gpio: dwapb: fix pointer to integer cast gpio: xgene: Remove unneeded #ifdef CONFIG_OF guard gpio: xgene: Remove unneeded forward declation for struct xgene_gpio gpio: xgene: Fix missing spin_lock_init() gpio: ks8695: fix switch case indentation gpiolib: add irq_not_threaded flag to gpio_chip ...
2014-10-07Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull "trivial tree" updates from Jiri Kosina: "Usual pile from trivial tree everyone is so eagerly waiting for" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits) Remove MN10300_PROC_MN2WS0038 mei: fix comments treewide: Fix typos in Kconfig kprobes: update jprobe_example.c for do_fork() change Documentation: change "&" to "and" in Documentation/applying-patches.txt Documentation: remove obsolete pcmcia-cs from Changes Documentation: update links in Changes Documentation: Docbook: Fix generated DocBook/kernel-api.xml score: Remove GENERIC_HAS_IOMAP gpio: fix 'CONFIG_GPIO_IRQCHIP' comments tty: doc: Fix grammar in serial/tty dma-debug: modify check_for_stack output treewide: fix errors in printk genirq: fix reference in devm_request_threaded_irq comment treewide: fix synchronize_rcu() in comments checkstack.pl: port to AArch64 doc: queue-sysfs: minor fixes init/do_mounts: better syntax description MIPS: fix comment spelling powerpc/simpleboot: fix comment ...
2014-10-06toshiba_acpi: Adapt kbd_bl_timeout_store to the new kbd typeAzael Avalos
With the introduction of the new keyboard backlight implementation, the *_timeout_store function is broken, as it only supports the first kbd_type. This patch adapts such function for the new kbd_type, as well as converts from using sscanf to kstrtoint. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-09-30toshiba_acpi: Change HCI/SCI functions return code typeAzael Avalos
Currently the HCI/SCI read/write functions are returning the status of the ACPI call and also assigning the returned value of the HCI/SCI function, however, only the HCI/SCI status is being checked. This patch changes such functions, returning the value of the HCI/SCI function instead of the ACPI call status, eliminating one parameter, and returning something useful that indeed is being checked. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-09-30toshiba_acpi: Unify return codes prefix from HCI/SCI to TOSAzael Avalos
The return codes are split in between HCI/SCI prefixes, but they are shared (used) by both interfaces, mixing hci_read/write calls with SCI_* return codes, and sci_read/write calls with HCI_* ones. This patch changes the prefix of the return codes definitions, dropping the HCI/SCI naming and instead replacing it with TOS (for TOShiba). Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-09-30toshiba_acpi: Rename hci_raw to tci_rawAzael Avalos
The function name hci_raw was used before to reflect a raw (read/write) call to Toshiba's Hardware Configuration Interface (HCI), however, since the introduction of the System Configuration Interface (SCI), that "name" no longer applies. This patch changes the name of that function to tci_raw (for Toshiba Configuration Interface), and change the comments about it. Also, the HCI_WORDS definition was changed to TCI_RAW, to better reflect that we're no longer using pure HCI calls, but a combination of HCI and SCI, which form part of the Toshiba Configuration Interface. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-09-29dell-wmi: Fix access out of memoryPali Rohár
Without this patch, dell-wmi is trying to access elements of dynamically allocated array without checking the array size. This can lead to memory corruption or a kernel panic. This patch adds the missing checks for array size. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-09-26treewide: Fix typos in KconfigMasanari Iida
This patch fix spelling typos found in Kconfig. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-22eeepc-laptop: clean up control flow in *_rfkill_notifierFrans Klaver
Handle errors immediately in eeepc_register_rfkill_notifier and eeepc_unregister_rfkill_notifier. This clears up the control flow for the reader. It also removes unnecessary indentation. Signed-off-by: Frans Klaver <fransklaver@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-09-19eeepc-laptop: store_cpufv: return error if set_acpi failsFrans Klaver
The result of set_acpi is left unchecked, but it may return errors. If one occurs, send the error to the caller. There's no reason to lie about it, if set_acpi fails. Signed-off-by: Frans Klaver <fransklaver@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-09-19eeepc-laptop: check proper return values in get_cpufvFrans Klaver
In get_cpufv the return value of get_acpi is stored in the cpufv struct. Right before this value is checked for errors, it is and'ed with 0xff. This means c->cur can never be less than zero. Besides that, the actual error value is ignored. c->num is also and'ed with 0xff, which means we can ignore values below zero. Check the result of get_acpi() right away. While at it, propagate the error if we got one. Signed-off-by: Frans Klaver <fransklaver@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-09-19eeepc-laptop: make fan1_input really read-onlyFrans Klaver
In the instantiation of the fan1_input device attribute, NULL is passed as set function to store_sys_hwmon. The function pointer is never checked before dereferencing it. This is fine if we can guarantee that it will never be called with an invalid pointer, but we can't. If someone from user space decides to change the permissions on this attribute and write to it, kernel will crash. Introduce EEEPC_CREATE_SENSOR_ATTR_RO() to instantiate a read-only attribute, and declare fan1_input with it. This ensures store_sys_hwmon is never called with NULL parameters. If someone tries to write the attribute, the system will at least keep its sanity. This also causes EEEPC_CREATE_SENSOR_ATTR() to be only used for R/W attributes.This enables us to drop the _mode argument from the macro and use DEVICE_ATTR_RW() internally while we're at it. Append _RW to the name for readability. Signed-off-by: Frans Klaver <fransklaver@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-09-19eeepc-laptop: pull out SENSOR_STORE_FUNC and SENSOR_SHOW_FUNC macrosFrans Klaver
Pull out EEEPC_SENSOR_STORE_FUNC and EEEPC_SENSOR_SHOW_FUNC. These macros define functions that call store_sys_hwmon() and show_sys_hwmon() respectively. This helps prevent duplication later on. Signed-off-by: Frans Klaver <fransklaver@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-09-19eeepc-laptop: tell sysfs that the disp attribute is write-onlyFrans Klaver
The disp attribute is write-only, but sysfs doesn't know this. Currently show_sys_acpi() is mimicking sysfs behavior, if the underlying acpi call should fail. This was introduced in 6dff29b63a5bf2eaf3 "eeepc-laptop: disp attribute should be write-only". This is not ideal; behaving like sysfs is better left to sysfs. Introduce EEEPC_CREATE_DEVICE_ATTR_WO() to instantiate a write-only attribute, and declare the disp attribute with it. Sysfs makes sure userspace can only write to disp at all times. This removes the need for mimicking the sysfs behavior in show_sys_acpi() and store_sys_acpi(), but we'll stick with -EIO, as changing sysfs return values should not be taken lightly. This change also causes EEEPC_CREATE_DEVICE_ATTR() to be used only for R/W attributes. This enables us to drop the _mode argument from the macro and use DEVICE_ATTR_RW() internally while we're at it. Append _RW to the name for readability. Signed-off-by: Frans Klaver <fransklaver@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-09-19eeepc-laptop: pull out ACPI_STORE_FUNC and ACPI_SHOW_FUNC macrosFrans Klaver
Pull out macros EEEPC_ACPI_STORE_FUNC and EEEPC_ACPI_SHOW_FUNC. These macros define functions that call store_sys_acpi() and show_sys_acpi() respectively. This helps prevent duplication later on. Signed-off-by: Frans Klaver <fransklaver@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-09-19eeepc-laptop: use DEVICE_ATTR* to instantiate device_attributesFrans Klaver
Device attributes are instantiated manually, while we have DEVICE_ATTR* macros available to do much of the work for us. Let's use them. Signed-off-by: Frans Klaver <fransklaver@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-09-19eeepc-laptop: change sysfs function names to API expectationsFrans Klaver
The eeepc-laptop driver follows the function naming convention <action>_<attrname>(), while the sysfs macros are built around the convention <attrname>_<action>(). Rename the sysfs functions to the convention used by sysfs. This makes it easier to use the available API later on. Signed-off-by: Frans Klaver <fransklaver@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-09-19eeepc-laptop: clean up coding styleFrans Klaver
Correct indentation and brace usage to comply with Documentation/CodingStyle. Signed-off-by: Frans Klaver <fransklaver@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-09-18driver:gpio remove all usage of gpio_remove retval in driverabdoulaye berthe
this remove all reference to gpio_remove retval in all driver except pinctrl and gpio. the same thing is done for gpio and pinctrl in two different patches. Signed-off-by: Abdoulaye Berthe <berthe.ab@gmail.com> Acked-by: Michael Büsch <m@bues.ch> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2014-09-18eeepc-laptop: simplify parse_arg()Paul Bolle
parse_arg() has three possible return values: -EINVAL if sscanf(), in short, fails; zero if "count" is zero; and "count" in all other cases But "count" will never be zero. See, parse_arg() is called by the various store functions. And the callchain of these functions starts with sysfs_kf_write(). And that function checks for a zero "count". So we can stop checking for a zero "count", drop the "count" argument entirely, and transform parse_arg() into a function that returns zero on success or a negative error. That, in turn, allows to make those store functions just return "count" on success. The net effect is that the code becomes a bit easier to understand. A nice side effect is that this GCC warning is silenced too: drivers/platform/x86/eeepc-laptop.c: In function ‘store_sys_acpi’: drivers/platform/x86/eeepc-laptop.c:279:10: warning: ‘value’ may be used uninitialized in this function [-Wmaybe-uninitialized] int rv, value; Which is, of course, the reason to have a look at parse_arg(). Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Darren Hart <dvhart@linux.intel.com>