aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-08-18platform/x86: intel-hid: reduce unnecessary messages for normal usersAlex Hung1-2/+2
Unsupported events is only useful for developers and does not meaningful for users. Using dev_dbg makes more sense and reduces noise in kernel messages. Signed-off-by: Alex Hung <alex.hung@canonical.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-08-18platform/x86: thinkpad_acpi: Fix warning about deprecated hwmon_device_registerStanislav Fomichev1-27/+11
Use hwmon_device_register_with_groups instead of deprecated hwmon_device_register and fix a dmesg warning. This patch however changes the userspace API. hwmon_device_register_with_groups takes `hwmon' name as an argument and creates a name file in the `hwmon' device, not in the `platform_device'. This allows us to remove custom `name' device attribute, but in order to make lm-sensors happy we also have to move fans and thermal attributes to the `hwmon' device. Even though this patch changes userspace API, it's still compatible with the lm-sensors. Starting with lm-sensors 3.0 (circa 2007), it looks at both hwmon and the backing device for the name and other attributes. before: $ cat /sys/devices/platform/thinkpad_hwmon/{name,fan1_input} thinkpad 2007 $ cat /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon1/{name,fan1_input} cat: /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon1/name: No such file or directory cat: /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon1/fan1_input: No such file or directory $ cat /sys/class/hwmon/hwmon1/{name,fan1_input} cat: /sys/class/hwmon/hwmon1/name: No such file or directory cat: /sys/class/hwmon/hwmon1/fan1_input: No such file or directory $ sensors thinkpad-isa-0000 Adapter: ISA adapter fan1: 3533 RPM after: $ cat /sys/devices/platform/thinkpad_hwmon/{name,fan1_input} cat: /sys/devices/platform/thinkpad_hwmon/name: No such file or directory cat: /sys/devices/platform/thinkpad_hwmon/fan1_input: No such file or directory $ cat /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon1/{name,fan1_input} thinkpad 3478 $ cat /sys/class/hwmon/hwmon1/{name,fan1_input} thinkpad 3478 $ sensors thinkpad-isa-0000 Adapter: ISA adapter fan1: 3489 RPM $ sensors -v sensors version 3.4.0 with libsensors version 3.4.0 Signed-off-by: Stanislav Fomichev <kernel@fomichev.me> [dvhart: cleaned up commit log, bumped version to 4.14 in the doc change] Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-08-18platform/x86: wmi: Fix check for method instance numberPali Rohár1-3/+3
instance_count defines number of instances of data block and instance itself is indexed from zero, which means first instance has number 0. Therefore check for invalid instance should be non-strict inequality. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Reviewed-by: Darren Hart (VMware) <dvhart@infradead.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-08-14platform/x86: ideapad-laptop: Expose conservation mode switchHao Wei Tee1-0/+69
This exposes the battery conservation mode present on some (?) IdeaPads. The mode is set by calling ACPI method SBMC with argument 3 (on) or 5 (off). Status is reported in bit 5 of the return value of ACPI method GBMD. Signed-off-by: Hao Wei Tee <angelsl@in04.sg> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-08-13platform/x86: intel_pmc_core: Make the driver PCH family agnosticSrinivas Pandruvada2-11/+50
Although this driver did pretty good job in abstracting PCH specific interfaces, but still there are some loose ends. For example SLP_S0 counter (for reading SLP_S0 residency), PM config offset (for checking permissions to read XRAM) and PPFEAR offset (for reading IP status) is still hardcoded for a specific family of PCH. This change extended the struct pmc_reg_map to allow per family configuration of offsets and bits. No functional change is expected with this change. This change allows seamless additions to new PCH and create a baseline for other platform specific extensions. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-08-13platform/x86: peaq-wmi: Evaluate wmi method with instance number 0x0Pali Rohár1-1/+1
According to Hans de Goede, WMI interface of thh peaq-wmi module has 10 instances but corresponding ACPI WMBC method does not check Arg0 (instance number) at all. Therefore evaluate WMI method with first instance number (0x0) instead of second (0x1). Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Cc: Hans de Goede <hdegoede@redhat.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-08-13platform/x86: mxm-wmi: Evaluate wmi method with instance number 0x0Pali Rohár1-2/+2
According to MXM 2.1 specification, there is the only one instance of the WMI GUID F6CB5C3C-9CAE-4EBD-B577-931EA32A2CC0 and so it is instance 0x0. MXM 2.1 specification: https://lekensteyn.nl/files/docs/mxm-2.1-software-spec.pdf _WDG dump: // Methods GUID {F6CB5C3C-9CAE-4EBD-B577-931EA32A2CC0} 0x3C, 0x5C, 0xCB, 0xF6, 0xAE, 0x9C, 0xBD, 0x4E, 0xB5, 0x77, 0x93, 0x1E, 0xA3, 0x2A, 0x2C, 0xC0, 0x4D, 0x58, // Object ID "MX" = method "WMMX" 1, // Instance Count 0x02, // Flags (WMIACPI_REGFLAG_METHOD) Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-08-13platform/x86: asus-wmi: Evaluate wmi method with instance number 0x0Pali Rohár1-2/+2
According to available DSDT dump from Asus machine, there is the only one instance of the WMI GUID 97845ED0-4E6D-11DE-8A39-0800200C9A66 and so it is 0x0. Moreover corresponding method WMBC does not check Arg0 (instance number) at all. DSDT dump is available at: https://lwn.net/Articles/391249/ _WDG dump: 0xD0, 0x5E, 0x84, 0x97, 0x6D, 0x4E, 0xDE, 0x11, 0x8A, 0x39, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66, 0x42, 0x43, // Object ID "BC" = method "WMBC" 0x01, // Instance count 0x02, // Flags Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-08-13platform/x86: intel_scu_ipc: make intel_scu_ipc_pdata_t constBhumika Goyal1-3/+3
Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-08-13platform/x86: intel_mid_powerbtn: make mid_pb_ddata constBhumika Goyal1-2/+2
Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-08-13platform/x86: intel_mid_powerbtn: fix error return code in mid_pb_probe()Gustavo A. R. Silva1-2/+4
platform_get_irq() returns an error code, but the intel_mid_powerbtn driver ignores it and always returns -EINVAL. This is not correct and, prevents -EPROBE_DEFER from being propagated properly. Print error message and propagate the return value of platform_get_irq on failure. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-08-13platform/x86: hp-wmi: Remove unused macro helperPaulo Alcantara1-7/+0
The commit d8193cff3390 ("platform/x86: hp-wmi: Standardize enum usage for constants") introduced a macro that had been never used. Remove it. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com> [andy wrote commit message] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-08-13platform/x86: hp-wmi: Correctly determine method id in WMI callsPaulo Alcantara1-1/+22
The WMI queries are performed by evaluating the WMPV() method from ACPI DSDT tables, and it takes three arguments: instance index, method id and input data (buffer). Currently the method id is hard-coded to 0x3 in hp_wmi_perform_query() which means that it will perform WMI calls that expect an output data of size 0x80 (128). The output size is usually OK for the WMI queries we perform, however it would be better to pick the correct one before evaluating the WMI method. Which correct method id to choose can be figured out by looking at the following ASL code from WVPI() method: ... Name (PVSZ, Package (0x05) { Zero, 0x04, 0x80, 0x0400, 0x1000 }) Store (Zero, Local0) If (LAnd (LGreaterEqual (Arg1, One), LLessEqual (Arg1, 0x05))) { Store (DerefOf (Index (PVSZ, Subtract (Arg1, One))), Local0) } ... Arg1 is the method id and PVSZ is the package used to index the corresponding output size; 1 -> 0, 2 -> 4, 3 -> 128, 4 -> 1024, 5 -> 4096. This patch maps the output size passed in hp_wmi_perform_query() to the correct method id before evaluating the WMI method. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-08-05platform/x86: intel-vbtn: match power button on press rather than releaseMario Limonciello1-2/+2
This fixes a problem where the system gets stuck in a loop unable to wakeup via power button in s2idle. The problem happens because: - press power button: - system emits 0xc0 (power press), event ignored - system emits 0xc1 (power release), event processed, emited as KEY_POWER - set wakeup_mode to true - system goes to s2idle - press power button - system emits 0xc0 (power press), wakeup_mode is true, system wakes - system emits 0xc1 (power release), event processed, emited as KEY_POWER - system goes to s2idle again To avoid this situation, process the presses (which matches what intel-hid does too). Verified on an Dell XPS 9365 Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-08-05platform/x86: intel-vbtn: match power button on press rather than releaseMario Limonciello1-2/+2
This fixes a problem where the system gets stuck in a loop unable to wakeup via power button in s2idle. The problem happens because: - press power button: - system emits 0xc0 (power press), event ignored - system emits 0xc1 (power release), event processed, emited as KEY_POWER - set wakeup_mode to true - system goes to s2idle - press power button - system emits 0xc0 (power press), wakeup_mode is true, system wakes - system emits 0xc1 (power release), event processed, emited as KEY_POWER - system goes to s2idle again To avoid this situation, process the presses (which matches what intel-hid does too). Verified on an Dell XPS 9365 Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-08-01platform/x86: dell-wmi: Fix driver interface version queryAndy Lutomirski1-5/+7
When I converted dell-wmi to the new bus infrastructure, I left the call to dell_wmi_check_descriptor_buffer() in dell_wmi_init(). This could cause two problems: - An error message when loading the driver on a system without dell-wmi. We'd try to read the event descriptor even if the WMI GUID wasn't there. - A possible race if dell-wmi was loaded manually before wmi was fully initialized. Fix it by moving the call to the probe function where it belongs. Fixes: bff589be59c5 ("platform/x86: dell-wmi: Convert to the WMI bus infrastructure") Signed-off-by: Andy Lutomirski <luto@kernel.org> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-08-01platform/x86: intel-hid: Wake up Dell Latitude 7275 from suspend-to-idleRafael J. Wysocki1-3/+14
On Dell Latitude 7275 the 5-button array is not exposed in the ACPI tables, but still notifies are sent to the Intel HID device object (device ID INT33D5) in response to power button actions while suspended to idle. However, they are currently ignored as the intel-hid driver is not prepared to take care of them. As a result, power button wakeup from suspend-to-idle doesn't work on this platform, but suspend-to-idle is the only reliable suspend variant on it (the S3 implementation in the platform firmware turns out to be broken), so it would be good to handle it properly. For this reason, add an upfront check against the power button press event (0xCE) to notify_handler() in the wakeup mode which allows it to catch the power button wakeup notification on the affected platform (even though priv->array is NULL on it) and should not change the behavior on platforms with priv->array present (because priv->array contains the event in question in those cases). Link: https://bugzilla.kernel.org/show_bug.cgi?id=196115 Tested-by: Jérôme de Bretagne <jerome.debretagne@gmail.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-By: Mario Limonciello <mario.limonciello@dell.com>
2017-08-01platform/x86: dell-wmi: Fix driver interface version queryAndy Lutomirski1-5/+7
When I converted dell-wmi to the new bus infrastructure, I left the call to dell_wmi_check_descriptor_buffer() in dell_wmi_init(). This could cause two problems: - An error message when loading the driver on a system without dell-wmi. We'd try to read the event descriptor even if the WMI GUID wasn't there. - A possible race if dell-wmi was loaded manually before wmi was fully initialized. Fix it by moving the call to the probe function where it belongs. Fixes: bff589be59c5 ("platform/x86: dell-wmi: Convert to the WMI bus infrastructure") Signed-off-by: Andy Lutomirski <luto@kernel.org> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-07-25platform/x86: intel_telemetry: remove redundant macro definitionRajneesh Bhardwaj1-1/+0
Telemetry driver includes intel_telemetry.h which defines TELEM_MAX_OS_ALLOCATED_EVENTS already. Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com> Reviewed-by: Souvik K Chakravarty <souvik.k.chakravarty@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-07-25platform/x86: intel_telemetry: Add GLK PSS Event TableRajneesh Bhardwaj2-0/+36
Some of the Primary Subsystem events differ on Gemini Lake but the IOSS events remain same. This patch adds the updated PSS event table to enable Telemetry driver on Gemini Lake. Signed-off-by: Shanth Murthy <shanth.murthy@intel.com> Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com> Reviewed-by: Souvik K Chakravarty <souvik.k.chakravarty@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-07-25platform/x86: alienware-wmi: fix format string overflow warningArnd Bergmann1-19/+21
gcc points out a possible format string overflow for a large value of 'zone': drivers/platform/x86/alienware-wmi.c: In function 'alienware_wmi_init': drivers/platform/x86/alienware-wmi.c:461:24: error: '%02X' directive writing between 2 and 8 bytes into a region of size 6 [-Werror=format-overflow=] sprintf(buffer, "zone%02X", i); ^~~~ drivers/platform/x86/alienware-wmi.c:461:19: note: directive argument in the range [0, 2147483646] sprintf(buffer, "zone%02X", i); ^~~~~~~~~~ drivers/platform/x86/alienware-wmi.c:461:3: note: 'sprintf' output between 7 and 13 bytes into a destination of size 10 This replaces the 'int' variable with an 'u8' to make sure it always fits, renaming the variable to 'zone' for clarity. Unfortunately, gcc-7.1.1 still warns about it with that change, which seems to be unintended by the gcc developers. I have opened a bug against gcc with a reduced test case. As a workaround, I also change the format string to use "%02hhX", which shuts up the warning in that version. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81483 Link: https://patchwork.ozlabs.org/patch/788415/ Suggested-by: Andy Shevchenko <andy@infradead.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> [andy: added empty lines after u8 zone; definitions] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-07-25platform/x86: ibm_rtl: remove unnecessary static in ibm_rtl_write()Gustavo A. R. Silva1-1/+1
Remove unnecessary static on local variable cmd_port_val. Such variable is initialized before being used, on every execution path throughout the function. The static has no benefit and, removing it reduces the object file size. This issue was detected using Coccinelle and the following semantic patch: https://github.com/GustavoARSilva/coccinelle/blob/master/static/static_unused.cocci In the following log you can see a difference in the object file size. This log is the output of the size command, before and after the code change: before: text data bss dec hex filename 3932 3440 512 7884 1ecc drivers/platform/x86/ibm_rtl.o after: text data bss dec hex filename 3887 3384 448 7719 1e27 drivers/platform/x86/ibm_rtl.o Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-07-25platform/x86: msi-wmi: remove unnecessary static in msi_wmi_notify()Gustavo A. R. Silva1-1/+1
Remove unnecessary static on local variable _key_. Such variable is initialized before being used, on every execution path throughout the function. The static has no benefit and, removing it reduces the object file size. This issue was detected using Coccinelle and the following semantic patch: https://github.com/GustavoARSilva/coccinelle/blob/master/static/static_unused.cocci In the following log you can see a significant difference in the object file size. Also, there is a significant difference in the bss segment. This log is the output of the size command, before and after the code change: before: text data bss dec hex filename 6530 3736 320 10586 295a drivers/platform/x86/msi-wmi.o after: text data bss dec hex filename 6494 3648 256 10398 289e drivers/platform/x86/msi-wmi.o Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-07-25platform/x86: peaq-wmi: silence a static checker warningDan Carpenter1-1/+1
There is a harmless static checker warning here that unsigned values are always >= 0. The code looks like: if (peaq_ignore_events_counter && --peaq_ignore_events_counter >= 0) The first part of the condition ensures that we never wrap around so the code works as intended. I've tweaked it slightly to avoid the warning. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-07-21platform/x86: wmi: Fix error handling in acpi_wmi_init()Alexey Khoroshilov1-3/+3
The order of resource deallocations is messed up in acpi_wmi_init(). It should be vice versa. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-07-20platform/x86: peaq-wmi: select INPUT_POLLDEVArnd Bergmann1-0/+1
The new driver fails to build without INPUT_POLLDEV drivers/platform/x86/peaq-wmi.o: In function `peaq_wmi_exit': peaq-wmi.c:(.exit.text+0x1c): undefined reference to `input_unregister_polled_device' drivers/platform/x86/peaq-wmi.o: In function `peaq_wmi_init': peaq-wmi.c:(.init.text+0x23): undefined reference to `input_allocate_polled_device' peaq-wmi.c:(.init.text+0x18e): undefined reference to `input_register_polled_device' For some reason, all other drivers that need this use 'select' here rather than 'depends on', so I'm doing the same. Fixes: 13bb0fd5519d ("platform/x86: peaq-wmi: Add new peaq-wmi driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-07-15Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linusLinus Torvalds1-65/+71
Pull MIPS updates from Ralf Baechle: "Boston platform support: - Document DT bindings - Add CLK driver for board clocks CM: - Avoid per-core locking with CM3 & higher - WARN on attempt to lock invalid VP, not BUG CPS: - Select CONFIG_SYS_SUPPORTS_SCHED_SMT for MIPSr6 - Prevent multi-core with dcache aliasing - Handle cores not powering down more gracefully - Handle spurious VP starts more gracefully DSP: - Add lwx & lhx missaligned access support eBPF: - Add MIPS support along with many supporting change to add the required infrastructure Generic arch code: - Misc sysmips MIPS_ATOMIC_SET fixes - Drop duplicate HAVE_SYSCALL_TRACEPOINTS - Negate error syscall return in trace - Correct forced syscall errors - Traced negative syscalls should return -ENOSYS - Allow samples/bpf/tracex5 to access syscall arguments for sane traces - Cleanup from old Kconfig options in defconfigs - Fix PREF instruction usage by memcpy for MIPS R6 - Fix various special cases in the FPU eulation - Fix some special cases in MIPS16e2 support - Fix MIPS I ISA /proc/cpuinfo reporting - Sort MIPS Kconfig alphabetically - Fix minimum alignment requirement of IRQ stack as required by ABI / GCC - Fix special cases in the module loader - Perform post-DMA cache flushes on systems with MAARs - Probe the I6500 CPU - Cleanup cmpxchg and add support for 1 and 2 byte operations - Use queued read/write locks (qrwlock) - Use queued spinlocks (qspinlock) - Add CPU shared FTLB feature detection - Handle tlbex-tlbp race condition - Allow storing pgd in C0_CONTEXT for MIPSr6 - Use current_cpu_type() in m4kc_tlbp_war() - Support Boston in the generic kernel Generic platform: - yamon-dt: Pull YAMON DT shim code out of SEAD-3 board - yamon-dt: Support > 256MB of RAM - yamon-dt: Use serial* rather than uart* aliases - Abstract FDT fixup application - Set RTC_ALWAYS_BCD to 0 - Add a MAINTAINERS entry core kernel: - qspinlock.c: include linux/prefetch.h Loongson 3: - Add support Perf: - Add I6500 support SEAD-3: - Remove GIC timer from DT - Set interrupt-parent per-device, not at root node - Fix GIC interrupt specifiers SMP: - Skip IPI setup if we only have a single CPU VDSO: - Make comment match reality - Improvements to time code in VDSO" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (86 commits) locking/qspinlock: Include linux/prefetch.h MIPS: Fix MIPS I ISA /proc/cpuinfo reporting MIPS: Fix minimum alignment requirement of IRQ stack MIPS: generic: Support MIPS Boston development boards MIPS: DTS: img: Don't attempt to build-in all .dtb files clk: boston: Add a driver for MIPS Boston board clocks dt-bindings: Document img,boston-clock binding MIPS: Traced negative syscalls should return -ENOSYS MIPS: Correct forced syscall errors MIPS: Negate error syscall return in trace MIPS: Drop duplicate HAVE_SYSCALL_TRACEPOINTS select MIPS16e2: Provide feature overrides for non-MIPS16 systems MIPS: MIPS16e2: Report ASE presence in /proc/cpuinfo MIPS: MIPS16e2: Subdecode extended LWSP/SWSP instructions MIPS: MIPS16e2: Identify ASE presence MIPS: VDSO: Fix a mismatch between comment and preprocessor constant MIPS: VDSO: Add implementation of gettimeofday() fallback MIPS: VDSO: Add implementation of clock_gettime() fallback MIPS: VDSO: Fix conversions in do_monotonic()/do_monotonic_coarse() MIPS: Use current_cpu_type() in m4kc_tlbp_war() ...
2017-07-13Merge tag 'platform-drivers-x86-v4.13-2' of git://git.infradead.org/linux-platform-drivers-x86Linus Torvalds11-19/+165
Pull more x86 platform driver updates from Darren Hart: "Add new platform matches for silead_dmi and ideapad-laptop. Several constify patches for attribute_group structures. Fixes for peaq-wmi and intel_telemetry. silead_dmi: - Add entry for Ployer Momo7w tablet touchscreen - Add touchscreen info for I.T.Works TW891 2-in-1 toshiba_acpi: - constify attribute_group structures. asus-wmi: - constify attribute_group structures. panasonic-laptop: - constify attribute_group structures. alienware-wmi: - constify attribute_group structures. samsung-laptop: - constify attribute_group structures. compal-laptop: - constify attribute_group structures. fujitsu-laptop: - constify attribute_group structures. - add NULL check on devm_kzalloc() return value peaq-wmi: - Fix peaq_ignore_events_counter handling off by 1 ideapad-laptop: - Fix indentation in DMI table - Add several models to no_hw_rfkill - Add IdeaPad V510-15IKB to no_hw_rfkill intel_telemetry: - Add debugfs entry for S0ix residency intel_telemetry_debugfs: - fix some error codes in init - fix oops when load/unload module" * tag 'platform-drivers-x86-v4.13-2' of git://git.infradead.org/linux-platform-drivers-x86: platform/x86: silead_dmi: Add entry for Ployer Momo7w tablet touchscreen platform/x86: toshiba_acpi: constify attribute_group structures. platform/x86: asus-wmi: constify attribute_group structures. platform/x86: panasonic-laptop: constify attribute_group structures. platform/x86: alienware-wmi: constify attribute_group structures. platform/x86: samsung-laptop: constify attribute_group structures. platform/x86: compal-laptop: constify attribute_group structures. platform/x86: fujitsu-laptop: constify attribute_group structures. platform/x86: peaq-wmi: Fix peaq_ignore_events_counter handling off by 1 platform/x86: fujitsu-laptop: add NULL check on devm_kzalloc() return value platform/x86: silead_dmi: Add touchscreen info for I.T.Works TW891 2-in-1 platform/x86: ideapad-laptop: Fix indentation in DMI table platform/x86: ideapad-laptop: Add several models to no_hw_rfkill platform/x86: ideapad-laptop: Add IdeaPad V510-15IKB to no_hw_rfkill platform/x86: intel_telemetry: Add debugfs entry for S0ix residency platform/x86: intel_telemetry_debugfs: fix some error codes in init platform/x86: intel_telemetry_debugfs: fix oops when load/unload module
2017-07-12platform/x86: silead_dmi: Add entry for Ployer Momo7w tablet touchscreenHans de Goede1-0/+10
This Ployer Momo7w revision has the same hardware as the Trekstor ST70416-6, so we re-use the surftab_wintron70_st70416_6_data. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-07-11Merge tag 'chrome-platform-for-linus-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platformLinus Torvalds11-76/+1173
Pull chrome platform updates from Benson Leung: "Changes in this pull request are around catching up cros_ec with the internal chromeos-kernel versions of cros_ec, cros_ec_lpc, and cros_ec_lightbar. Also, switching maintainership from olof to bleung" * tag 'chrome-platform-for-linus-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform: platform/chrome : Add myself as Maintainer platform/chrome: cros_ec_lightbar - hide unused PM functions cros_ec: Don't signal wake event for non-wake host events cros_ec: Fix deadlock when EC is not responsive at probe cros_ec: Don't return error when checking command version platform/chrome: cros_ec_lightbar - Avoid I2C xfer to EC during suspend platform/chrome: cros_ec_lightbar - Add userspace lightbar control bit to EC platform/chrome: cros_ec_lightbar - Control of suspend/resume lightbar sequence platform/chrome: cros_ec_lightbar - Add lightbar program feature to sysfs platform/chrome: cros_ec_lpc: Add MKBP events support over ACPI platform/chrome: cros_ec_lpc: Add power management ops platform/chrome: cros_ec_lpc: Add support for GOOG004 ACPI device platform/chrome: cros_ec_lpc: Add support for mec1322 EC platform/chrome: cros_ec_lpc: Add R/W helpers to LPC protocol variants mfd: cros_ec: Add support for dumping panic information cros_ec_debugfs: Pass proper struct sizes to cros_ec_cmd_xfer() mfd: cros_ec: add debugfs, console log file mfd: cros_ec: Add EC console read structures definitions mfd: cros_ec: Add helper for event notifier.
2017-07-11platform/x86: toshiba_acpi: constify attribute_group structures.Arvind Yadav1-1/+1
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 26360 1072 24 27456 6b40 drivers/platform/x86/toshiba_acpi.o File size After adding 'const': text data bss dec hex filename 26424 1008 24 27456 6b40 drivers/platform/x86/toshiba_acpi.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-07-11platform/x86: asus-wmi: constify attribute_group structures.Arvind Yadav1-2/+2
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 13140 840 1 13981 369d drivers/platform/x86/asus-wmi.o File size After adding 'const': text data bss dec hex filename 13268 712 1 13981 368d drivers/platform/x86/asus-wmi.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-07-11platform/x86: panasonic-laptop: constify attribute_group structures.Arvind Yadav1-1/+1
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 2505 600 4 3109 c25 drivers/platform/x86/panasonic-laptop.o File size After adding 'const': text data bss dec hex filename 2569 536 4 3109 c25 drivers/platform/x86/panasonic-laptop.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-07-11platform/x86: alienware-wmi: constify attribute_group structures.Arvind Yadav1-3/+3
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 6932 1016 48 7996 1f3c drivers/platform/x86/alienware-wmi.o File size After adding 'const': text data bss dec hex filename 7060 888 48 7996 1f64 drivers/platform/x86/alienware-wmi.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-07-11platform/x86: samsung-laptop: constify attribute_group structures.Arvind Yadav1-1/+1
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 8710 5452 23 14185 3769 drivers/platform/x86/samsung-laptop.o File size After adding 'const': text data bss dec hex filename 8774 5388 23 14185 3769 drivers/platform/x86/samsung-laptop.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-07-11platform/x86: compal-laptop: constify attribute_group structures.Arvind Yadav1-1/+1
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 6781 6144 34 12959 329f drivers/platform/x86/compal-laptop.o File size After adding 'const': text data bss dec hex filename 6845 6080 34 12959 329f drivers/platform/x86/compal-laptop.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-07-11platform/x86: fujitsu-laptop: constify attribute_group structures.Arvind Yadav1-1/+1
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 7474 1205 24 8703 21ff drivers/platform/x86/fujitsu-laptop.o File size After adding 'const': text data bss dec hex filename 7538 1141 24 8703 21ff drivers/platform/x86/fujitsu-laptop.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Reviewed-by: Jonathan Woithe <jwoithe@just42.net> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-07-11platform/x86: peaq-wmi: Fix peaq_ignore_events_counter handling off by 1Hans de Goede1-1/+1
If peaq_ignore_events_counter gets set to 1 we should skip polling 1 time, rather then ignoring it. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-07-07Merge (most of) tag 'mfd-next-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfdLinus Torvalds1-4/+0
Pull MFD updates from Lee Jones: "New Drivers: - Intel Cherry Trail Whiskey Cove PMIC - TI LP87565 PMIC New Device Support: - Add support for Cannonlake to intel-lpss-pci - Add support for Simatic IOT2000 to intel_quark_i2c_gpio New Functionality: - Add Regulator support (axp20x) Fix-ups: - Rework IRQ handling (intel_soc_pmic_bxtwc, rtsx_pcr, cros_ec) - Remove unused/unwelcome code (ipaq-micro, wm831x-core, da9062-core) - Provide deregistration on unbind (rn5t618) - Rework DT code/documentation (arizona) - Constify things (fsl-imx25-tsadc) - MAINTAINERS updates (DA9062/61) - Kconfig configuration adaptions (INTEL_SOC_PMIC, MFD_AXP20X_I2C) - Switch to DMI matching (intel_quark_i2c_gpio) - Provide an appropriate level of error checking (wm831x-{i2c,spi}, twl4030-irq, tc6393xb) - Make use of devm_* (resource handling) calls (intel_soc_pmic_bxtwc, stm32-timers, atmel-flexcom, cros_ec, fsl-imx25-tsadc, exynos-lpass, palmas, qcom-spmi-pmic, smsc-ece1099, motorola-cpcap)" [ Skipped the last commit in that series that added eight thousand lines of pointless repeated register definitions. - Linus ] * tag 'mfd-next-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (38 commits) mfd: Add LP87565 PMIC support mfd: cros_ec: Free IRQ on exit dt-bindings: vendor-prefixes: Add arctic to vendor prefix mfd: da9061: Fix to remove BBAT_CONT register from chip model mfd: da9061: Fix to remove BBAT_CONT register from chip model mfd: axp20x-i2c: Document that this must be builtin on x86 mfd: Add Cherry Trail Whiskey Cove PMIC driver mfd: tc6393xb: Handle return value of clk_prepare_enable mfd: intel_quark_i2c_gpio: Add support for SIMATIC IOT2000 platform mfd: intel_quark_i2c_gpio: Use dmi_system_id table for retrieving frequency mfd: motorola-cpcap: Use devm_of_platform_populate() mfd: smsc-ece: Use devm_of_platform_populate() mfd: qcom-spmi-pmic: Use devm_of_platform_populate() mfd: palmas: Use devm_of_platform_populate() mfd: exynos: Use devm_of_platform_populate() mfd: fsl-imx25: Use devm_of_platform_populate() mfd: cros_ec: Use devm_of_platform_populate() mfd: atmel: Use devm_of_platform_populate() mfd: stm32-timers: Use devm_of_platform_populate() mfd: intel_soc_pmic: Select designware i2c-bus driver ...
2017-07-07platform/x86: fujitsu-laptop: add NULL check on devm_kzalloc() return valueGustavo A. R. Silva1-0/+12
Check return value from call to devm_kzalloc() in order to prevent a NULL pointer dereference. This issue was detected using Coccinelle and the following semantic patch: @@ expression x; identifier fld; @@ * x = devm_kzalloc(...); ... when != x == NULL x->fld Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Reviewed-by: Jonathan Woithe <jwoithe@just42.net> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-07-06platform/x86: silead_dmi: Add touchscreen info for I.T.Works TW891 2-in-1Hans de Goede1-0/+22
Add touchscreen info for I.T.Works TW891 2-in-1. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-07-06Merge tag 'platform-drivers-x86-v4.13-1' of git://git.infradead.org/linux-platform-drivers-x86Linus Torvalds27-671/+1376
Pull x86 platform driver updates from Darren Hart: "Introduce new bus architecture for WMI and expose BMOF data through sysfs. Correct several assumptions about WMI instance number from 1 to 0. Further fujitsu-laptop cleanups, continuing to prepare for separation into two modules. Add support for several new ideapad laptops and silead-based tablets. Various minor fixes and const cleanups. Detail summary: sony-laptop: - constify attribute_group and input index array fujitsu-laptop: - rework debugging - do not evaluate ACPI _INI methods - do not update ACPI device power status - sanitize hotkey input device identification - use strcpy to set ACPI device names and classes - remove redundant safety checks - use device-specific data in remaining module code - use device-specific data in LED-related code - explicitly pass ACPI device to call_fext_func() - track the last instantiated FUJ02E3 ACPI device - allocate fujitsu_laptop in acpi_fujitsu_laptop_add() - use device-specific data in backlight code - allocate fujitsu_bl in acpi_fujitsu_bl_add() - distinguish current uses of device-specific data msi-laptop: - constify msipf*_attribute_group eeepc-laptop: - constify platform_attribute_group toshiba_haps: - constify haps_attr_group dell-wmi-led: - Adjust instance of wmi_evaluate_method calls to 0 alienware-wmi: - Adjust instance of wmi_evaluate_method calls to 0 intel_menlow: - Add const to thermal_cooling_device_ops structure acerhdf: - Add const to thermal_cooling_device_ops structure dell-laptop: - Fix bogus keyboard backlight sysfs interface acer-wmi: - Using zero as first WMI instance number - Detect RF Button capability ideapad-laptop: - Add Y720-15IKBN to no_hw_rfkill - Add Y520-15IKBN to no_hw_rfkill - constify rfkill_ops structure - Squelch ACPI event 1 - hide unused 'touchpad_store' - Switch touchpad attribute to be RO - Add sysfs interface for touchpad state silead_dmi: - Add touchscreen info for PoV mobii wintab p800w - Add touchscreen info for Pipo W2S tablet - Add touchscreen info for GP-electronic T701 dell-rbtn: - constify rfkill_ops structures - Improve explanation about DELLABC6 samsung-laptop: - constify rfkill_ops structures panasonic-laptop: - remove unused code samsung-laptop: - Initialize loca variable dell-wmi: - Convert to the WMI bus infrastructure - Add a better description for "stealth mode" - Add a comment explaining the 0xb2 magic number wmi-bmof: - New driver to expose embedded Binary WMI MOF metadata wmi*: - Fix printing info about WDG structure - Add recent copyright statements - Require query for data blocks, rename writable to setable - Add an interface for subdrivers to access sibling devices - Bind the platform device, not the ACPI node - Add a new interface to read block data - Incorporate acpi_install_notify_handler - Instantiate all devices before adding them - Probe data objects for read and write capabilities - Split devices into types and add basic sysfs attributes - Fix error handling when creating devices - Turn WMI into a bus driver - Track wmi devices per ACPI device - Clean up acpi_wmi_add - Pass the acpi_device through to parse_wdg - Drop "Mapper (un)loaded" messages intel_cht_int33fe: - Set supplied-from property on max17047 dev intel_pmc_ipc: - Mark ipc_data_readb() as __maybe_unused topstar-laptop: - Add new device id peaq-wmi: - Add new peaq-wmi driver thinkpad_acpi: - Add a comment about 0 in module_param_call() - Join string literals back toshiba_acpi: - use memdup_user_nul" * tag 'platform-drivers-x86-v4.13-1' of git://git.infradead.org/linux-platform-drivers-x86: (67 commits) platform/x86: sony-laptop: constify attribute_group and input index array platform/x86: fujitsu-laptop: rework debugging platform/x86: fujitsu-laptop: do not evaluate ACPI _INI methods platform/x86: fujitsu-laptop: do not update ACPI device power status platform/x86: fujitsu-laptop: sanitize hotkey input device identification platform/x86: fujitsu-laptop: use strcpy to set ACPI device names and classes platform/x86: fujitsu-laptop: remove redundant safety checks platform/x86: msi-laptop: constify msipf*_attribute_group platform/x86: eeepc-laptop: constify platform_attribute_group platform/x86: toshiba_haps: constify haps_attr_group platform/x86: dell-wmi-led: Adjust instance of wmi_evaluate_method calls to 0 platform/x86: alienware-wmi: Adjust instance of wmi_evaluate_method calls to 0 platform/x86: intel_menlow: Add const to thermal_cooling_device_ops structure platform/x86: acerhdf: Add const to thermal_cooling_device_ops structure platform/x86: dell-laptop: Fix bogus keyboard backlight sysfs interface platform/x86: acer-wmi: Using zero as first WMI instance number platform/x86: ideapad-laptop: Add Y720-15IKBN to no_hw_rfkill platform/x86: ideapad-laptop: Add Y520-15IKBN to no_hw_rfkill platform/x86: silead_dmi: Add touchscreen info for PoV mobii wintab p800w platform/x86: silead_dmi: Add touchscreen info for Pipo W2S tablet ...
2017-07-05platform/x86: ideapad-laptop: Fix indentation in DMI tableAndy Shevchenko1-4/+4
There are couple of places where 8 spaces are used instead of tabs. Replace former by latter. No functional change intended. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-07-05platform/x86: ideapad-laptop: Add several models to no_hw_rfkillYang Jiaxun1-0/+70
Some Lenovo ideapad models do not have hardware rfkill switches, but trying to read the rfkill switches through the ideapad-laptop module. It caused to always reported blocking breaking wifi. Fix it by adding those models to no_hw_rfkill_list. Signed-off-by: Yang Jiaxun <yjx@flygoat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-07-05platform/x86: ideapad-laptop: Add IdeaPad V510-15IKB to no_hw_rfkillSven Eckelmann1-0/+7
Like other Lenovo models the IdeaPad V510-15IKB does not have an hw rfkill switch. This results in hard-blocked radios after boot, resulting in always blocked radios rendering them unusable. Add the IdeaPad V510-15IKB to the no_hw_rfkill DMI list and allows using the built-in radios. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-07-05platform/x86: intel_telemetry: Add debugfs entry for S0ix residencyRajneesh Bhardwaj1-0/+26
This adds a debugfs consumer for the exported kernel API intel_pmc_read_s0ix_residency. This debugfs entry reads S0ix residency directly from the PMC hardware counters. TEST: - echo freeze > /sys/power/state - Wake the system, read the S0ix residency i.e. cat /sys/kernel/debug/telemetry/s0ix_residency_usec Signed-off-by: Shanth Murthy <shanth.murthy@intel.com> Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-07-05platform/x86: intel_telemetry_debugfs: fix some error codes in initDan Carpenter1-4/+3
There are bunch of "goto out;" paths where we don't set the error code. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-07-05platform/x86: intel_telemetry_debugfs: fix oops when load/unload modulePriyalee Kushwaha1-9/+7
This fixes an oops found while testing load/unload of the intel_telemetry_debugfs module. module_init uses register_pm_notifier for PM callbacks, but unregister_pm_notifier was missing from module_exit. [ 97.481860] BUG: unable to handle kernel paging request at ffffffffa006f010 [ 97.489742] IP: blocking_notifier_chain_register+0x3a/0xa0 [ 97.495898] PGD 2e0a067 [ 97.495899] PUD 2e0b063 [ 97.498737] PMD 179e29067 [ 97.501573] PTE 0 [ 97.508423] Oops: 0000 1 PREEMPT SMP [ 97.512724] Modules linked in: intel_telemetry_debugfs intel_rapl gpio_keys dwc3 udc_core intel_telemetry_pltdrv intel_punit_ipc intel_telemetry_core rtc_cmos efivars x86_pkg_temp_thermal iwlwifi snd_hda_codec_hdmi soc_button_array btusb cfg80211 btrtl mei_me hci_uart btbcm mei btintel i915 bluetooth intel_pmc_ipc snd_hda_intel spi_pxa2xx_platform snd_hda_codec dwc3_pci snd_hda_core tpm_tis tpm_tis_core tpm efivarfs [ 97.558453] CPU: 0 PID: 889 Comm: modprobe Not tainted 4.11.0-rc6-intel-dev-bkc #1 [ 97.566950] Hardware name: Intel Corp. Joule DVT3/SDS, BIOS GTPP181A.X64.0143.B30.1701132137 01/13/2017 [ 97.577518] task: ffff8801793a21c0 task.stack: ffff8801793f0000 [ 97.584162] RIP: 0010:blocking_notifier_chain_register+0x3a/0xa0 [ 97.590903] RSP: 0018:ffff8801793f3c58 EFLAGS: 00010286 [ 97.596802] RAX: ffffffffa006f000 RBX: ffffffff81e3ea20 RCX: 0000000000000000 [ 97.604812] RDX: ffff880179eaf210 RSI: ffffffffa0131000 RDI: ffffffff81e3ea20 [ 97.612821] RBP: ffff8801793f3c68 R08: 0000000000000006 R09: 000000000000005c [ 97.620847] R10: 0000000000000000 R11: 0000000000000006 R12: ffffffffa0131000 [ 97.628855] R13: 0000000000000000 R14: ffff880176e35f48 R15: ffff8801793f3ea8 [ 97.636865] FS: 00007f7eeba07700(0000) GS:ffff88017fc00000(0000) knlGS:0000000000000000 [ 97.645948] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 97.652423] CR2: ffffffffa006f010 CR3: 00000001775ef000 CR4: 00000000003406f0 [ 97.660423] Call Trace: [ 97.663166] ? 0xffffffffa0031000 [ 97.666885] register_pm_notifier+0x18/0x20 [ 97.671581] telemetry_debugfs_init+0x92/0x1000 Signed-off-by: Priyalee Kushwaha <priyalee.kushwaha@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-07-04Merge tag 'pm-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pmLinus Torvalds5-8/+310
Pull power management updates from Rafael Wysocki: "The big ticket items here are the rework of suspend-to-idle in order to add proper support for power button wakeup from it on recent Dell laptops and the rework of interfaces exporting the current CPU frequency on x86. In addition to that, support for a few new pieces of hardware is added, the PCI/ACPI device wakeup infrastructure is simplified significantly and the wakeup IRQ framework is fixed to unbreak the IRQ bus locking infrastructure. Also, there are some functional improvements for intel_pstate, tools updates and small fixes and cleanups all over. Specifics: - Rework suspend-to-idle to allow it to take wakeup events signaled by the EC into account on ACPI-based platforms in order to properly support power button wakeup from suspend-to-idle on recent Dell laptops (Rafael Wysocki). That includes the core suspend-to-idle code rework, support for the Low Power S0 _DSM interface, and support for the ACPI INT0002 Virtual GPIO device from Hans de Goede (required for USB keyboard wakeup from suspend-to-idle to work on some machines). - Stop trying to export the current CPU frequency via /proc/cpuinfo on x86 as that is inaccurate and confusing (Len Brown). - Rework the way in which the current CPU frequency is exported by the kernel (over the cpufreq sysfs interface) on x86 systems with the APERF and MPERF registers by always using values read from these registers, when available, to compute the current frequency regardless of which cpufreq driver is in use (Len Brown). - Rework the PCI/ACPI device wakeup infrastructure to remove the questionable and artificial distinction between "devices that can wake up the system from sleep states" and "devices that can generate wakeup signals in the working state" from it, which allows the code to be simplified quite a bit (Rafael Wysocki). - Fix the wakeup IRQ framework by making it use SRCU instead of RCU which doesn't allow sleeping in the read-side critical sections, but which in turn is expected to be allowed by the IRQ bus locking infrastructure (Thomas Gleixner). - Modify some computations in the intel_pstate driver to avoid rounding errors resulting from them (Srinivas Pandruvada). - Reduce the overhead of the intel_pstate driver in the HWP (hardware-managed P-states) mode and when the "performance" P-state selection algorithm is in use by making it avoid registering scheduler callbacks in those cases (Len Brown). - Rework the energy_performance_preference sysfs knob in intel_pstate by changing the values that correspond to different symbolic hint names used by it (Len Brown). - Make it possible to use more than one cpuidle driver at the same time on ARM (Daniel Lezcano). - Make it possible to prevent the cpuidle menu governor from using the 0 state by disabling it via sysfs (Nicholas Piggin). - Add support for FFH (Fixed Functional Hardware) MWAIT in ACPI C1 on AMD systems (Yazen Ghannam). - Make the CPPC cpufreq driver take the lowest nonlinear performance information into account (Prashanth Prakash). - Add support for hi3660 to the cpufreq-dt driver, fix the imx6q driver and clean up the sfi, exynos5440 and intel_pstate drivers (Colin Ian King, Krzysztof Kozlowski, Octavian Purdila, Rafael Wysocki, Tao Wang). - Fix a few minor issues in the generic power domains (genpd) framework and clean it up somewhat (Krzysztof Kozlowski, Mikko Perttunen, Viresh Kumar). - Fix a couple of minor issues in the operating performance points (OPP) framework and clean it up somewhat (Viresh Kumar). - Fix a CONFIG dependency in the hibernation core and clean it up slightly (Balbir Singh, Arvind Yadav, BaoJun Luo). - Add rk3228 support to the rockchip-io adaptive voltage scaling (AVS) driver (David Wu). - Fix an incorrect bit shift operation in the RAPL power capping driver (Adam Lessnau). - Add support for the EPP field in the HWP (hardware managed P-states) control register, HWP.EPP, to the x86_energy_perf_policy tool and update msr-index.h with HWP.EPP values (Len Brown). - Fix some minor issues in the turbostat tool (Len Brown). - Add support for AMD family 0x17 CPUs to the cpupower tool and fix a minor issue in it (Sherry Hurwitz). - Assorted cleanups, mostly related to the constification of some data structures (Arvind Yadav, Joe Perches, Kees Cook, Krzysztof Kozlowski)" * tag 'pm-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (69 commits) cpufreq: Update scaling_cur_freq documentation cpufreq: intel_pstate: Clean up after performance governor changes PM: hibernate: constify attribute_group structures. cpuidle: menu: allow state 0 to be disabled intel_idle: Use more common logging style PM / Domains: Fix missing default_power_down_ok comment PM / Domains: Fix unsafe iteration over modified list of domains PM / Domains: Fix unsafe iteration over modified list of domain providers PM / Domains: Fix unsafe iteration over modified list of device links PM / Domains: Handle safely genpd_syscore_switch() call on non-genpd device PM / Domains: Call driver's noirq callbacks PM / core: Drop run_wake flag from struct dev_pm_info PCI / PM: Simplify device wakeup settings code PCI / PM: Drop pme_interrupt flag from struct pci_dev ACPI / PM: Consolidate device wakeup settings code ACPI / PM: Drop run_wake from struct acpi_device_wakeup_flags PM / QoS: constify *_attribute_group. PM / AVS: rockchip-io: add io selectors and supplies for rk3228 powercap/RAPL: prevent overridding bits outside of the mask PM / sysfs: Constify attribute groups ...
2017-07-03Merge tag 'char-misc-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-miscLinus Torvalds1-1/+1
Pull char/misc updates from Greg KH: "Here is the "big" char/misc driver patchset for 4.13-rc1. Lots of stuff in here, a large thunderbolt update, w1 driver header reorg, the new mux driver subsystem, google firmware driver updates, and a raft of other smaller things. Full details in the shortlog. All of these have been in linux-next for a while with the only reported issue being a merge problem with this tree and the jc-docs tree in the w1 documentation area" * tag 'char-misc-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (147 commits) misc: apds990x: Use sysfs_match_string() helper mei: drop unreachable code in mei_start mei: validate the message header only in first fragment. DocBook: w1: Update W1 file locations and names in DocBook mux: adg792a: always require I2C support nvmem: rockchip-efuse: add support for rk322x-efuse nvmem: core: add locking to nvmem_find_cell nvmem: core: Call put_device() in nvmem_unregister() nvmem: core: fix leaks on registration errors nvmem: correct Broadcom OTP controller driver writes w1: Add subsystem kernel public interface drivers/fsi: Add module license to core driver drivers/fsi: Use asynchronous slave mode drivers/fsi: Add hub master support drivers/fsi: Add SCOM FSI client device driver drivers/fsi/gpio: Add tracepoints for GPIO master drivers/fsi: Add GPIO based FSI master drivers/fsi: Document FSI master sysfs files in ABI drivers/fsi: Add error handling for slave drivers/fsi: Add tracepoints for low-level operations ...