summaryrefslogtreecommitdiffstats
path: root/drivers/platform
Commit message (Collapse)AuthorAgeFilesLines
* sony-laptop: do not scribble keyboard backlight registers on resumeMattia Dongili2013-11-261-27/+0
| | | | | | | | | | | | | Follow-up to commit 294d31e8227c ("sony-laptop: don't change keyboard backlight settings"): avoid messing up the state on resume. Leave it to what was before suspending as it's anyway likely that we still don't know what value we should write to the EC registers. This fix is also required in 3.12 Cc: stable@vger.kernel.org Tested-by: Karol Babioch <karol@babioch.de> Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* x86, wmi fix modalias_show return valuesPrarit Bhargava2013-11-201-2/+4
| | | | | | | | | | | I just fixed this same bug in arch/powerpc/kernel/vio.c and took a quick look for other similar errors in the kernel. modalias_show() should return an empty string on error, not errno. Signed-off-by: Prarit Bhargava <prarit@redhat.com> Cc: Matthew Garrett <matthew.garrett@nebula.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* ipc: Added support for IPC interrupt modeKuppuswamy Sathyanarayanan2013-11-201-3/+45
| | | | | | | | | | | | | | | This patch adds support for ipc command interrupt mode. Also added platform data option to select 'irq_mode' irq_mode = 1: configure the driver to receive IOC interrupt for each successful ipc_command. irq_mode = 0: makes driver use polling method to track the command completion status. Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Signed-off-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* ipc: Handle error conditions in ipc commandKuppuswamy Sathyanarayanan2013-11-201-3/+5
| | | | | | | | | Handle error conditions in intel_scu_ipc_command() and pwr_reg_rdwr(). Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Signed-off-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* ipc: Enabled ipc support for additional intel platformsKuppuswamy Sathyanarayanan2013-11-201-0/+24
| | | | | | | | Enabled ipc support for penwell, clovertrail & tangier platforms. Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Cc: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* ipc: Added platform data structureKuppuswamy Sathyanarayanan2013-11-201-8/+29
| | | | | | | | | | | | Since the same ipc driver can be used by many platforms, using macros for defining ipc_base and i2c_base addresses is not a scalable approach. So added a platform data structure to pass this information. Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Acked-by: Alan Cox <gnomes@lxorguk.ukuu.org.uk> Cc: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* thinkpad_acpi: Fix build error when CONFIG_SND_MAX_CARDS > 32Takashi Iwai2013-11-201-1/+6
| | | | | | | | | SNDRV_CARDS can be specified via Kconfig since 3.11 kernel, so this can be over 32bit integer range, which leads to a build error. Cc: <stable@vger.kernel.org> [v3.11+] Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* platform: add chrome platform directoryOlof Johansson2013-11-207-12/+32
| | | | | | | | | | | | | It makes sense to split out the Chromebook/Chromebox hardware platform drivers to a separate subdirectory, since some of it will be shared between ARM and x86. This moves over the existing chromeos_laptop driver without making any other changes, and adds appropriate Kconfig entries for the new directory. It also adds a MAINTAINERS entry for the new subdir. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* hp-wmi: detect "2009 BIOS or later" flag by WMI 0x0d for wireless cmdAlex Hung2013-11-201-1/+13
| | | | | | | | | Some HP BIOS has dummy WMI 0x05 cmd and it causes wireless set cmd to fail. This patch fixes the problem by detecting "2009 BIOS or later" flag which determines whether WMI 0x1b is supported and is used to replace WMI 0x05. Signed-off-by: Alex Hung <alex.hung@canonical.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* dell-wmi: Add KEY_MICMUTE to bios_to_linux_keycodeAlex Hung2013-11-201-3/+4
| | | | | Signed-off-by: Alex Hung <alex.hung@canonical.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* platform:x86: Remove OOM message after input_allocate_deviceJoe Perches2013-11-208-23/+8
| | | | | | | | Emitting an OOM message isn't necessary after input_allocate_device as there's a generic OOM and a dump_stack already done. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* sony-laptop: fixe typos in sony_laptop_input_keycode_mapStephen Gildea2013-11-201-2/+2
| | | | | | Signed-off-by: Stephen Gildea <stepheng+linux@gildea.com> Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* sony-laptop: warn on multiple KBD backlight handlesMattia Dongili2013-11-201-4/+12
| | | | | | | | | | | | | | | | | | | | | | | Some BIOS versions/Vaio models apparently ship with two nearly identical functions to handle backlight related controls. The only difference seems to be: If (LEqual (BUF1, 0x40)) { Store (0x40, P80H) Store (BUF2, Local0) - And (Local0, One, Local0) + And (Local0, 0x03, Local0) Store (Local0, ^^H_EC.KLPC) } Avoid erroring out on initialization and messing things up on cleanup for now since we never call into these methods with anything different than 1 or 0. This issue was found on a Sony VPCSE1V9E/BIOS R2087H4. Cc: Marco Krüger <krgsch@gmail.com> Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* dell-laptop: Only enable rfkill functionality on laptops with a hw killswitchHans de Goede2013-11-201-3/+10
| | | | | | | | | | All my testing has been on laptops with a hw killswitch, so to be on the safe side disable rfkill functionality on models without a hw killswitch for now. Once we gather some feedback on laptops without a hw killswitch this decision maybe reconsidered. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* dell-laptop: Add a force_rfkill module parameterHans de Goede2013-11-201-1/+5
| | | | | | | | | Setting force_rfkill will cause the dell-laptop rfkill code to skip its whitelist checks, this will allow individual users to override the whitelist, as well as to gather info from users to improve the checks. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* dell-laptop: Wait less long before updating rfkill after an rfkill keypressHans de Goede2013-11-201-1/+1
| | | | | | | Some time is needed for the BIOS to do its work, but 250ms should be plenty. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* dell-laptop: Do not skip setting blocked bit rfkill_set while hw-blockedHans de Goede2013-11-201-3/+2
| | | | | | | | | Instead when hw-blocked always write 1 to the blocked bit for the radio in question. This is necessary to properly set all the blocked bits for hw-switch controlled radios to 1 after power-on and resume. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* dell-laptop: Sync current block state to BIOS on hw switch changeHans de Goede2013-11-201-3/+11
| | | | | | | | | | | | | | This is necessary for 3 reasons: 1) To apply sw_state changes made while hw-blocked 2) To set all the blocked bits for hw-switch controlled radios to 1 when the switch gets changed to off, this is necessary on some models to actually turn the radio status LEDs off. 3) On some models non hw-switch controlled radios will have their block bit cleared (potentially undoing a soft-block) on hw-switch toggle, this restores the sw-block in this case. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* dell-laptop: Allow changing the sw_state while the radio is blocked by hwHans de Goede2013-11-201-5/+2
| | | | | | | | This makes dell-laptop's rfkill code consistent with other drivers which allow sw_state changes while hw blocked. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* dell-laptop: Don't read-back sw_state on machines with a hardware switchHans de Goede2013-11-201-1/+4
| | | | | | | | | | | | | | | | On machines with a hardware switch, the blocking settings can not be changed through a Fn + wireless-key combo, so there is no reason to read back the blocking state from the BIOS. Reading back is not only not necessary it is actually harmful, since on some machines the blocking state will be cleared to all 0 after a wireless switch toggle, even for radios not controlled by the hw-switch (yeah firmware bugs). This causes "magic" changes to the sw_state. This is inconsistent with other rfkill drivers which preserve the sw_state over a hw kill on / off. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* dell-laptop: Don't set sw_state from the query callbackHans de Goede2013-11-201-8/+19
| | | | | | | | | | | The query callback should only update the hw_state, see the comment in net/rfkill/core.c in rfkill_set_block, which is its only caller. rfkill_set_block will modify the sw_state directly after calling query so calling set_sw_state is an expensive NOP. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* dell-laptop: Only get status from BIOS once when updatingHans de Goede2013-11-201-9/+19
| | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* dell-laptop: If there is no hwswitch, then clear all hw-controlled bitsHans de Goede2013-11-201-0/+3
| | | | | | | | To ensure we don't enter any hw-switch related code paths on machines without a hw-switch. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* dell-laptop: Only enable rfkill on LatitudesHans de Goede2013-11-201-50/+7
| | | | | | | | | | | | | | | The rfkill functionality was removed from the dell-laptop driver because it was causing problems on various non Latitude models, and the blacklist kept growing and growing. In the thread discussing this Dell mentioned that they only QA the rfkill acpi interface on Latitudes and indeed there have been no blacklist entries for Latitudes. Note that the blacklist contained no Vostros either, and most Vostros have a hardware switch too, so we could consider supporting Vostros with a hardware switch too. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* Revert "dell-laptop: Remove rfkill code"Hans de Goede2013-11-201-0/+289
| | | | | | | | | | | | | | | | | | | | | | | | | | Without rfkill functionality in dell-laptop I have the following problems: -If the hardware radio switch is set to disable the radio, then userspace will still think it can use wireless and bluetooth. -The wwan / 3g modem cannot be soft blocked without the dell-laptop rfkill functionality I know the rfkill functionality was removed from the dell-laptop driver because it caused more problems then it fixed, and the blacklist for it was growing out of control. But in the thread discussing this Dell mentioned that they only QA the rfkill acpi interface on Latitudes and indeed there have been no blacklist entries for Latitudes. Therefor I would like to bring the rfkill functionality back only for Latitudes. This patch is a straight-forward revert. The next patch in this set will drop the blacklist and replace it with a Latitude check. This reverts commit a6c2390cd6d2083d27a2359658e08f2d3df375ac. Conflicts: drivers/platform/x86/dell-laptop.c Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* Merge tag 'pm+acpi-2-3.13-rc1' of ↵Linus Torvalds2013-11-201-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more ACPI and power management updates from Rafael Wysocki: - ACPI-based device hotplug fixes for issues introduced recently and a fix for an older error code path bug in the ACPI PCI host bridge driver - Fix for recently broken OMAP cpufreq build from Viresh Kumar - Fix for a recent hibernation regression related to s2disk - Fix for a locking-related regression in the ACPI EC driver from Puneet Kumar - System suspend error code path fix related to runtime PM and runtime PM documentation update from Ulf Hansson - cpufreq's conservative governor fix from Xiaoguang Chen - New processor IDs for intel_idle and turbostat and removal of an obsolete Kconfig option from Len Brown - New device IDs for the ACPI LPSS (Low-Power Subsystem) driver and ACPI-based PCI hotplug (ACPIPHP) cleanup from Mika Westerberg - Removal of several ACPI video DMI blacklist entries that are not necessary any more from Aaron Lu - Rework of the ACPI companion representation in struct device and code cleanup related to that change from Rafael J Wysocki, Lan Tianyu and Jarkko Nikula - Fixes for assigning names to ACPI-enumerated I2C and SPI devices from Jarkko Nikula * tag 'pm+acpi-2-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (24 commits) PCI / hotplug / ACPI: Drop unused acpiphp_debug declaration ACPI / scan: Set flags.match_driver in acpi_bus_scan_fixed() ACPI / PCI root: Clear driver_data before failing enumeration ACPI / hotplug: Fix PCI host bridge hot removal ACPI / hotplug: Fix acpi_bus_get_device() return value check cpufreq: governor: Remove fossil comment in the cpufreq_governor_dbs() ACPI / video: clean up DMI table for initial black screen problem ACPI / EC: Ensure lock is acquired before accessing ec struct members PM / Hibernate: Do not crash kernel in free_basic_memory_bitmaps() ACPI / AC: Remove struct acpi_device pointer from struct acpi_ac spi: Use stable dev_name for ACPI enumerated SPI slaves i2c: Use stable dev_name for ACPI enumerated I2C slaves ACPI: Provide acpi_dev_name accessor for struct acpi_device device name ACPI / bind: Use (put|get)_device() on ACPI device objects too ACPI: Eliminate the DEVICE_ACPI_HANDLE() macro ACPI / driver core: Store an ACPI device pointer in struct acpi_dev_node cpufreq: OMAP: Fix compilation error 'r & ret undeclared' PM / Runtime: Fix error path for prepare PM / Runtime: Update documentation around probe|remove|suspend cpufreq: conservative: set requested_freq to policy max when it is over policy max ...
| * ACPI: Eliminate the DEVICE_ACPI_HANDLE() macroRafael J. Wysocki2013-11-141-1/+1
| | | | | | | | | | | | | | | | | | Since DEVICE_ACPI_HANDLE() is now literally identical to ACPI_HANDLE(), replace it with the latter everywhere and drop its definition from include/acpi.h. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | tree-wide: use reinit_completion instead of INIT_COMPLETIONWolfram Sang2013-11-151-1/+1
|/ | | | | | | | | | | | Use this new function to make code more comprehensible, since we are reinitialzing the completion, not initializing. [akpm@linux-foundation.org: linux-next resyncs] Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13) Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge tag 'pm+acpi-3.13-rc1' of ↵Linus Torvalds2013-11-1411-356/+264
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI and power management updates from Rafael J Wysocki: - New power capping framework and the the Intel Running Average Power Limit (RAPL) driver using it from Srinivas Pandruvada and Jacob Pan. - Addition of the in-kernel switching feature to the arm_big_little cpufreq driver from Viresh Kumar and Nicolas Pitre. - cpufreq support for iMac G5 from Aaro Koskinen. - Baytrail processors support for intel_pstate from Dirk Brandewie. - cpufreq support for Midway/ECX-2000 from Mark Langsdorf. - ARM vexpress/TC2 cpufreq support from Sudeep KarkadaNagesha. - ACPI power management support for the I2C and SPI bus types from Mika Westerberg and Lv Zheng. - cpufreq core fixes and cleanups from Viresh Kumar, Srivatsa S Bhat, Stratos Karafotis, Xiaoguang Chen, Lan Tianyu. - cpufreq drivers updates (mostly fixes and cleanups) from Viresh Kumar, Aaro Koskinen, Jungseok Lee, Sudeep KarkadaNagesha, Lukasz Majewski, Manish Badarkhe, Hans-Christian Egtvedt, Evgeny Kapaev. - intel_pstate updates from Dirk Brandewie and Adrian Huang. - ACPICA update to version 20130927 includig fixes and cleanups and some reduction of divergences between the ACPICA code in the kernel and ACPICA upstream in order to improve the automatic ACPICA patch generation process. From Bob Moore, Lv Zheng, Tomasz Nowicki, Naresh Bhat, Bjorn Helgaas, David E Box. - ACPI IPMI driver fixes and cleanups from Lv Zheng. - ACPI hotplug fixes and cleanups from Bjorn Helgaas, Toshi Kani, Zhang Yanfei, Rafael J Wysocki. - Conversion of the ACPI AC driver to the platform bus type and multiple driver fixes and cleanups related to ACPI from Zhang Rui. - ACPI processor driver fixes and cleanups from Hanjun Guo, Jiang Liu, Bartlomiej Zolnierkiewicz, Mathieu Rhéaume, Rafael J Wysocki. - Fixes and cleanups and new blacklist entries related to the ACPI video support from Aaron Lu, Felipe Contreras, Lennart Poettering, Kirill Tkhai. - cpuidle core cleanups from Viresh Kumar and Lorenzo Pieralisi. - cpuidle drivers fixes and cleanups from Daniel Lezcano, Jingoo Han, Bartlomiej Zolnierkiewicz, Prarit Bhargava. - devfreq updates from Sachin Kamat, Dan Carpenter, Manish Badarkhe. - Operation Performance Points (OPP) core updates from Nishanth Menon. - Runtime power management core fix from Rafael J Wysocki and update from Ulf Hansson. - Hibernation fixes from Aaron Lu and Rafael J Wysocki. - Device suspend/resume lockup detection mechanism from Benoit Goby. - Removal of unused proc directories created for various ACPI drivers from Lan Tianyu. - ACPI LPSS driver fix and new device IDs for the ACPI platform scan handler from Heikki Krogerus and Jarkko Nikula. - New ACPI _OSI blacklist entry for Toshiba NB100 from Levente Kurusa. - Assorted fixes and cleanups related to ACPI from Andy Shevchenko, Al Stone, Bartlomiej Zolnierkiewicz, Colin Ian King, Dan Carpenter, Felipe Contreras, Jianguo Wu, Lan Tianyu, Yinghai Lu, Mathias Krause, Liu Chuansheng. - Assorted PM fixes and cleanups from Andy Shevchenko, Thierry Reding, Jean-Christophe Plagniol-Villard. * tag 'pm+acpi-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (386 commits) cpufreq: conservative: fix requested_freq reduction issue ACPI / hotplug: Consolidate deferred execution of ACPI hotplug routines PM / runtime: Use pm_runtime_put_sync() in __device_release_driver() ACPI / event: remove unneeded NULL pointer check Revert "ACPI / video: Ignore BIOS initial backlight value for HP 250 G1" ACPI / video: Quirk initial backlight level 0 ACPI / video: Fix initial level validity test intel_pstate: skip the driver if ACPI has power mgmt option PM / hibernate: Avoid overflow in hibernate_preallocate_memory() ACPI / hotplug: Do not execute "insert in progress" _OST ACPI / hotplug: Carry out PCI root eject directly ACPI / hotplug: Merge device hot-removal routines ACPI / hotplug: Make acpi_bus_hot_remove_device() internal ACPI / hotplug: Simplify device ejection routines ACPI / hotplug: Fix handle_root_bridge_removal() ACPI / hotplug: Refuse to hot-remove all objects with disabled hotplug ACPI / scan: Start matching drivers after trying scan handlers ACPI: Remove acpi_pci_slot_init() headers from internal.h ACPI / blacklist: fix name of ThinkPad Edge E530 PowerCap: Fix build error with option -Werror=format-security ... Conflicts: arch/arm/mach-omap2/opp.c drivers/Kconfig drivers/spi/spi.c
| * Merge branch 'acpi-video'Rafael J. Wysocki2013-10-281-7/+24
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * acpi-video: ACPI: Add Toshiba NB100 to Vista _OSI blacklist ACPI / video: Ignore BIOS initial backlight value for HP 250 G1 ACPI / video: Add Lenovo IdeaPad Yoga 13 to acpi video detect blacklist thinkpad-acpi: fix handle locate for video and query of _BCL ACPI / video: Do not register backlight if win8 and native interface exists ACPI / video: seperate backlight control and event interface backlight: introduce backlight_device_registered ACPI: add missing win8 OSI comment to blacklist ACPI: update win8 OSI blacklist
| | * thinkpad-acpi: fix handle locate for video and query of _BCLAaron Lu2013-10-161-7/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tpacpi_acpi_handle_locate function makes use of acpi_get_devices to locate handle for ACPI video by HID, the problem is, ACPI video node doesn't really have HID defined(i.e. no _HID control method is defined for video device), so.. that function would fail. This can be solved by enhancing the callback function for acpi_get_devices, where we can use acpi_device_hid function to check if the ACPI node corresponds to a video controller. In addition to that, the _BCL control method only exists under a video output device node, not a video controller device node. So to evaluate _BCL, we need the handle of a video output device node, which is child of the located video controller node from tpacpi_acpi_handle_locate. The two fix are necessary for some Thinkpad models to emit notification on backlight hotkey press as a result of evaluation of _BCL. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * | Merge branch 'acpi-conversion'Rafael J. Wysocki2013-10-281-160/+184
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * acpi-conversion: ACPI / AC: Remove AC's proc directory. ideapad_laptop: convert ideapad device/driver to platform bus ideapad_laptop: remove ideapad_handle and ideapad_priv ideapad_laptop: convert internal function calls to use ideapad_private as parameter ideapad_laptop: introduce struct acpi_device pointer to ideapad_private structure ideapad_laptop: introduce #ifdef CONFIG_PM_SLEEP for PM specific code ACPI / AC: convert ACPI ac driver to platform bus
| | * | ideapad_laptop: convert ideapad device/driver to platform busZhang Rui2013-09-251-102/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does two things, 1. enumerate the ideapad device node to platform bus. 2. convert the current driver from ACPI bus to platform bus. Note, with this patch, the platform device node created by ACPI, with the name VPC2004:00, is used as the parent device of the input, backlight, rfkill sysfs class device. Plus the ideapad_platform private sysfs attributes, i.e. camera_power and fan_mode, are also moved to the new platform device node. The previous platform device node "ideapad" is removed. Signed-off-by: Zhang Rui <rui.zhang@intel.com> CC: Matthew Garrett <matthew.garrett@nebula.com> CC: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | ideapad_laptop: remove ideapad_handle and ideapad_privZhang Rui2013-09-251-45/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code use ideapad_handle and ideapad_priv to store some information for the ideapad device. But as they are global/static variables, the driver will be broken if there are more than one ideapad ACPI device node on a platform. Although this does not happen for now and may not happen in the future, but still, this is a software bug. Remove these two variables in this patch. Signed-off-by: Zhang Rui <rui.zhang@intel.com> CC: Matthew Garrett <matthew.garrett@nebula.com> CC: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | ideapad_laptop: convert internal function calls to use ideapad_private as ↵Zhang Rui2013-09-251-17/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parameter As struct ideapad_private has all the information needed for any operations, convert ideapad_register_rfkill()/ideapad_unregister_rfkill() and ideapad_sync_touchpad_state() to use struct ideapad_private as the parameter, to be consistent with the others. Signed-off-by: Zhang Rui <rui.zhang@intel.com> CC: Matthew Garrett <matthew.garrett@nebula.com> CC: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | ideapad_laptop: introduce struct acpi_device pointer to ideapad_private ↵Zhang Rui2013-09-251-23/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | structure Introduce struct acpi_device pointer to ideapad_private structure. At the same time, replace all adevice with adev to be short and consistent. Signed-off-by: Zhang Rui <rui.zhang@intel.com> CC: Matthew Garrett <matthew.garrett@nebula.com> CC: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | ideapad_laptop: introduce #ifdef CONFIG_PM_SLEEP for PM specific codeZhang Rui2013-09-251-0/+4
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ideapad_acpi_resume() and ideapad_pm is meaningful only if CONFIG_PM_SLEEP is set. Thus introduce #ifdef for this piece of code. Signed-off-by: Zhang Rui <rui.zhang@intel.com> CC: Matthew Garrett <matthew.garrett@nebula.com> CC: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * | Merge branch 'acpi-cleanup'Rafael J. Wysocki2013-10-289-189/+56
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * acpi-cleanup: (34 commits) ACPI / proc: Remove alarm proc file ACPI: Remove CONFIG_ACPI_PROCFS_POWER and cm_sbsc.c ACPI / SBS: Remove SBS's proc directory ACPI / Battery: Remove battery's proc directory ACP / fan: trivial style cleanup ACPI / processor: remove superfluous pr == NULL checks ACPI / mm: use NUMA_NO_NODE toshiba_acpi: convert acpi_evaluate_object() to acpi_evaluate_integer() intel-smartconnect: convert acpi_evaluate_object() to acpi_evaluate_integer() intel-rst: convert acpi_evaluate_object() to acpi_evaluate_integer() fujitsu-laptop: convert acpi_evaluate_object() to acpi_evaluate_integer() i2c-hid: convert acpi_evaluate_object() to acpi_evaluate_integer() ACPI: dock: convert acpi_evaluate_object() to acpi_evaluate_integer() acpi_processor: convert acpi_evaluate_object() to acpi_evaluate_integer() pnpacpi: convert acpi_get_handle() to acpi_has_method() wmi: convert acpi_get_handle() to acpi_has_method() toshiba_acpi: convert acpi_get_handle() to acpi_has_method() sony-laptop: convert acpi_get_handle() to acpi_has_method() intel_menlow: convert acpi_get_handle() to acpi_has_method() fujitsu-laptop: convert acpi_get_handle() to acpi_has_method() ...
| | * | toshiba_acpi: convert acpi_evaluate_object() to acpi_evaluate_integer()Zhang Rui2013-09-241-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | acpi_evaluate_integer() is an ACPI API introduced to evaluate an ACPI control method that is known to have an integer return value. This API can simplify the code because the calling function does not need to use the specified acpi_buffer structure required by acpi_evaluate_object(); Convert acpi_evaluate_object() to acpi_evaluate_integer() in drivers/platform/x86/toshiba_acpi.c in this patch. Signed-off-by: Zhang Rui <rui.zhang@intel.com> CC: Matthew Garrett <matthew.garrett@nebula.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | intel-smartconnect: convert acpi_evaluate_object() to acpi_evaluate_integer()Zhang Rui2013-09-241-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | acpi_evaluate_integer() is an ACPI API introduced to evaluate an ACPI control method that is known to have an integer return value. This API can simplify the code because the calling function does not need to use the specified acpi_buffer structure required by acpi_evaluate_object(); Convert acpi_evaluate_object() to acpi_evaluate_integer() in drivers/platform/x86/intel-smartconnect.c in this patch. Signed-off-by: Zhang Rui <rui.zhang@intel.com> CC: Matthew Garrett <matthew.garrett@nebula.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | intel-rst: convert acpi_evaluate_object() to acpi_evaluate_integer()Zhang Rui2013-09-241-22/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | acpi_evaluate_integer() is an ACPI API introduced to evaluate an ACPI control method that is known to have an integer return value. This API can simplify the code because the calling function does not need to use the specified acpi_buffer structure required by acpi_evaluate_object(); Convert acpi_evaluate_object() to acpi_evaluate_integer() in drivers/platform/x86/intel-rst.c in this patch. Plus, this should also fix a memory leak that the acpi_buffer is not freed in some cases. Signed-off-by: Zhang Rui <rui.zhang@intel.com> CC: Matthew Garrett <matthew.garrett@nebula.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | fujitsu-laptop: convert acpi_evaluate_object() to acpi_evaluate_integer()Zhang Rui2013-09-241-16/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | acpi_evaluate_integer() is an ACPI API introduced to evaluate an ACPI control method that is known to have an integer return value. This API can simplify the code because the calling function does not need to use the specified acpi_buffer structure required by acpi_evaluate_object(); Convert acpi_evaluate_object() to acpi_evaluate_integer() in drivers/platform/x86/fujitsu-laptop.c in this patch. Signed-off-by: Zhang Rui <rui.zhang@intel.com> CC: Matthew Garrett <matthew.garrett@nebula.com> Acked-by: Jonathan Woithe <jwoithe@just42.net> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | wmi: convert acpi_get_handle() to acpi_has_method()Zhang Rui2013-09-241-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | acpi_has_method() is a new ACPI API introduced to check the existence of an ACPI control method. It can be used to replace acpi_get_handle() in the case that 1. the calling function doesn't need the ACPI handle of the control method. and 2. the calling function doesn't care the reason why the method is unavailable. Convert acpi_get_handle() to acpi_has_method() in drivers/platform/x86/wmi.c in this patch. Signed-off-by: Zhang Rui <rui.zhang@intel.com> CC: Matthew Garrett <matthew.garrett@nebula.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | toshiba_acpi: convert acpi_get_handle() to acpi_has_method()Zhang Rui2013-09-241-15/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | acpi_has_method() is a new ACPI API introduced to check the existence of an ACPI control method. It can be used to replace acpi_get_handle() in the case that 1. the calling function doesn't need the ACPI handle of the control method. and 2. the calling function doesn't care the reason why the method is unavailable. Convert acpi_get_handle() to acpi_has_method() in drivers/platform/x86/toshiba_acpi.c in this patch. Signed-off-by: Zhang Rui <rui.zhang@intel.com> CC: Matthew Garrett <matthew.garrett@nebula.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | sony-laptop: convert acpi_get_handle() to acpi_has_method()Zhang Rui2013-09-241-19/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | acpi_has_method() is a new ACPI API introduced to check the existence of an ACPI control method. It can be used to replace acpi_get_handle() in the case that 1. the calling function doesn't need the ACPI handle of the control method. and 2. the calling function doesn't care the reason why the method is unavailable. Convert acpi_get_handle() to acpi_has_method() in drivers/platform/x86/sony-laptop.c in this patch. Signed-off-by: Zhang Rui <rui.zhang@intel.com> CC: Matthew Garrett <matthew.garrett@nebula.com> CC: Mattia Dongili <malattia@linux.it> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | intel_menlow: convert acpi_get_handle() to acpi_has_method()Zhang Rui2013-09-241-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | acpi_has_method() is a new ACPI API introduced to check the existence of an ACPI control method. It can be used to replace acpi_get_handle() in the case that 1. the calling function doesn't need the ACPI handle of the control method. and 2. the calling function doesn't care the reason why the method is unavailable. Convert acpi_get_handle() to acpi_has_method() in drivers/platform/x86/intel_menlow.c in this patch. Signed-off-by: Zhang Rui <rui.zhang@intel.com> CC: Matthew Garrett <matthew.garrett@nebula.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | fujitsu-laptop: convert acpi_get_handle() to acpi_has_method()Zhang Rui2013-09-241-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | acpi_has_method() is a new ACPI API introduced to check the existence of an ACPI control method. It can be used to replace acpi_get_handle() in the case that 1. the calling function doesn't need the ACPI handle of the control method. and 2. the calling function doesn't care the reason why the method is unavailable. Convert acpi_get_handle() to acpi_has_method() in drivers/platform/x86/fujitsu-laptop.c in this patch. Signed-off-by: Zhang Rui <rui.zhang@intel.com> CC: Matthew Garrett <matthew.garrett@nebula.com> Acked-by: Jonathan Woithe <jwoithe@just42.net> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | wmi: convert acpi_evaluate_object() to acpi_execute_simple_method()Zhang Rui2013-09-241-19/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | acpi_execute_simple_method() is a new ACPI API introduced to invoke an ACPI control method that has single integer parameter and no return value. Convert acpi_evaluate_object() to acpi_execute_simple_method() in drivers/platform/x86/wmi.c Signed-off-by: Zhang Rui <rui.zhang@intel.com> CC: Matthew Garrett <matthew.garrett@nebula.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | toshiba_acpi: convert acpi_evaluate_object() to acpi_execute_simple_method()Zhang Rui2013-09-241-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | acpi_execute_simple_method() is a new ACPI API introduced to invoke an ACPI control method that has single integer parameter and no return value. Convert acpi_evaluate_object() to acpi_execute_simple_method() in drivers/platform/x86/toshiba_acpi.c Signed-off-by: Zhang Rui <rui.zhang@intel.com> CC: Matthew Garrett <matthew.garrett@nebula.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | topstar-laptop: convert acpi_evaluate_object() to acpi_execute_simple_method()Zhang Rui2013-09-241-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | acpi_execute_simple_method() is a new ACPI API introduced to invoke an ACPI control method that has single integer parameter and no return value. Convert acpi_evaluate_object() to acpi_execute_simple_method() in drivers/platform/x86/topstar-laptop.c Signed-off-by: Zhang Rui <rui.zhang@intel.com> CC: Herton Ronaldo Krzesinski <herton@mandriva.com.br> CC: Matthew Garrett <matthew.garrett@nebula.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
OpenPOWER on IntegriCloud