15 Feb, 2020
1 commit
-
commit 5e0c94d3aeeecc68c573033f08d9678fecf253bd upstream.
The driver gets driver_data from memory that is marked as const (which
is probably put to read-only memory) and it then modifies it. This
likely causes some sort of fault to happen.Fix this by taking a copy of the structure.
Fixes: c94a8ff14de3 ("platform/x86: intel_mid_powerbtn: make mid_pb_ddata const")
Signed-off-by: Mika Westerberg
Reviewed-by: Andy Shevchenko
Signed-off-by: Andy Shevchenko
Signed-off-by: Greg Kroah-Hartman
11 Feb, 2020
1 commit
-
commit e48b72a568bbd641c91dad354138d3c17d03ee6f upstream.
Currently the driver has disabled interrupt support for Tangier but
actually interrupt works just fine if the command is not written twice
in a row. Also we need to ack the interrupt in the handler.Signed-off-by: Mika Westerberg
Reviewed-by: Andy Shevchenko
Cc: stable@vger.kernel.org
Signed-off-by: Andy Shevchenko
Signed-off-by: Greg Kroah-Hartman
06 Feb, 2020
2 commits
-
[ Upstream commit 515ff674bb9bf06186052e352c4587dab8defaf0 ]
Adding new CML CPU model ID into platform driver support list.
Signed-off-by: Harry Pan
Signed-off-by: Andy Shevchenko
Signed-off-by: Sasha Levin -
[ Upstream commit 1f27dbd8265dbb379926c8f6a4453fe7fe26d7a3 ]
Allow the user to configure the fan to turn on / speed-up at lower
thresholds then before (20 degrees Celcius as minimum instead of 40) and
likewise also allow the user to delay the fan speeding-up till the
temperature hits 90 degrees Celcius (was 70).Cc: Jason Anderson
Reported-by: Jason Anderson
Signed-off-by: Hans de Goede
Signed-off-by: Andy Shevchenko
Signed-off-by: Sasha Levin
01 Feb, 2020
1 commit
-
[ Upstream commit 10b65e2915b2fcc606d173e98a972850101fb4c4 ]
This patch adds a quirk disabling keyboard backlight support for the
Dell Inspiron 1012 and 1018.Those models wrongly report supporting keyboard backlight control
features (through SMBIOS tokens) even though they're not equipped with
a backlit keyboard. This led to broken controls being exposed
through sysfs by this driver which froze the system when used.Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=107651
Signed-off-by: Pacien TRAN-GIRARD
Reviewed-by: Mario Limonciello
Reviewed-by: Pali Rohár
Signed-off-by: Andy Shevchenko
Signed-off-by: Sasha Levin
26 Jan, 2020
1 commit
-
[ Upstream commit 856a0a6e2d09d31fd8f00cc1fc6645196a509d56 ]
This is caused by dereferencing 'dev_data' after put_device() in
the telem_device_remove() function.
This patch just moves the put_device() down a bit to avoid this
issue.Fixes: 1210d1e6bad1 ("platform/chrome: wilco_ec: Add telemetry char device interface")
Signed-off-by: Wen Yang
Cc: Benson Leung
Cc: Enric Balletbo i Serra
Cc: Nick Crews
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Enric Balletbo i Serra
Signed-off-by: Sasha Levin
18 Jan, 2020
4 commits
-
commit dece3c2a320b0a6d891da6ff774ab763969b6860 upstream.
When call function hwmon_device_register failed, use the actual
return value instead of always -ENOMEM.Fixes: 64f09aa967e1 ("MIPS: Loongson-3: Add CPU Hwmon platform driver")
Signed-off-by: Tiezhu Yang
Signed-off-by: Paul Burton
Cc: Ralf Baechle
Cc: James Hogan
Cc: Huacai Chen
Cc: Jiaxun Yang
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman -
commit 6ae01050e49f0080ae30575d9b45a6d4a3d7ee23 upstream.
Use our default values when wrong module-parameters are given, instead of
refusing to load. Refusing to load leaves the fan at the BIOS default
setting, which is "Off". The CPU's thermal throttling should protect the
system from damage, but not-loading is really not the best fallback in this
case.This commit fixes this by re-setting module-parameter values to their
defaults if they are out of range, instead of failing the probe with
-EINVAL.Cc: stable@vger.kernel.org
Cc: Jason Anderson
Reported-by: Jason Anderson
Fixes: 594ce6db326e ("platform/x86: GPD pocket fan: Use a min-speed of 2 while charging")
Signed-off-by: Hans de Goede
Signed-off-by: Andy Shevchenko
Signed-off-by: Greg Kroah-Hartman -
commit 176a7fca81c5090a7240664e3002c106d296bf31 upstream.
Some of ASUS laptops like UX431FL keyboard backlight cannot be set to
brightness 0. According to ASUS' information, the brightness should be
0x80 ~ 0x83. This patch fixes it by following the logic.Fixes: e9809c0b9670 ("asus-wmi: add keyboard backlight support")
Signed-off-by: Jian-Hong Pan
Reviewed-by: Daniel Drake
Signed-off-by: Andy Shevchenko
Signed-off-by: Greg Kroah-Hartman -
commit 638bc4ca3d28c25986cce4cbad69d9b8abf1e434 upstream.
This commit fixes the potential deadlock caused by the console Rx
and Tx processing at the same time. Rx and Tx both take the console
and tmfifo spinlock but in different order which causes potential
deadlock. The fix is to use different tmfifo spinlock for Rx and
Tx since they protect different resources and it's safe to split
the lock.Below is the reported call trace when copying/pasting large string
in the console.Rx:
_raw_spin_lock_irqsave (hvc lock)
__hvc_poll
hvc_poll
in_intr
vring_interrupt
mlxbf_tmfifo_rxtx_one_desc (tmfifo lock)
mlxbf_tmfifo_rxtx
mlxbf_tmfifo_work_rxtx
Tx:
_raw_spin_lock_irqsave (tmfifo lock)
mlxbf_tmfifo_virtio_notify
virtqueue_notify
virtqueue_kick
put_chars
hvc_push
hvc_write (hvc lock)
...
do_tty_write
tty_writeFixes: 1357dfd7261f ("platform/mellanox: Add TmFifo driver for Mellanox BlueField Soc")
Cc: # 5.4+
Reviewed-by: David Woods
Signed-off-by: Liming Sun
Signed-off-by: Andy Shevchenko
Signed-off-by: Greg Kroah-Hartman
12 Jan, 2020
1 commit
-
[ Upstream commit d4ac8f83dafec205c5db9b86b21587fba43bc017 ]
The mapping entry has to hold the GPIO line index instead of
controller's register number.Fixes: 5037d4ddda31 ("platform/x86: pcengines-apuv2: wire up simswitch gpio as led")
Signed-off-by: Enrico Weigelt, metux IT consult
Signed-off-by: Andy Shevchenko
Signed-off-by: Sasha Levin
09 Jan, 2020
1 commit
-
commit e8796c6c69d129420ee94a1906b18d86b84644d4 upstream.
The CONNECT X300 uses the PMC clock for on-board components and gets
stuck during boot if the clock is disabled. Therefore, add this
device to the critical systems list.
Tested on CONNECT X300.Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
Signed-off-by: Michael Haener
Signed-off-by: Andy Shevchenko
Signed-off-by: Greg Kroah-Hartman
05 Jan, 2020
3 commits
-
[ Upstream commit 5406327d43edd9a171bd260f49c752d148727eaf ]
Add Comet Lake to the list of the platforms that intel_pmc_core driver
supports for pmc_core device.Just like Ice Lake, Comet Lake can also reuse all the Cannon Lake PCH
IPs. No additional effort is needed to enable but to simply reuse them.Cc: Mario Limonciello
Cc: Peter Zijlstra
Cc: Srinivas Pandruvada
Cc: Andy Shevchenko
Cc: Kan Liang
Cc: David E. Box
Cc: Rajneesh Bhardwaj
Cc: Tony Luck
Signed-off-by: Gayatri Kammela
Signed-off-by: Andy Shevchenko
Signed-off-by: Sasha Levin -
[ Upstream commit 43e82d8aa92503d264309fb648b251b2d85caf1a ]
Intel's SoCs follow a naming convention which spells out the SoC name as
two words instead of one word (E.g: Cannon Lake vs Cannonlake). Thus fix
the naming inconsistency across the intel_pmc_core driver, so future
SoCs can follow the naming consistency as below.Cometlake -> Comet Lake
Tigerlake -> Tiger Lake
Elkhartlake -> Elkhart LakeCc: Mario Limonciello
Cc: Peter Zijlstra
Cc: Srinivas Pandruvada
Cc: Andy Shevchenko
Cc: Kan Liang
Cc: David E. Box
Cc: Rajneesh Bhardwaj
Cc: Tony Luck
Suggested-by: Andy Shevchenko
Signed-off-by: Gayatri Kammela
Signed-off-by: Andy Shevchenko
Signed-off-by: Sasha Levin -
[ Upstream commit 60d15095336cfb56dce5c7767ed3b8c6c1cf79a3 ]
We have added polled mode to the normal input devices with the intent of
retiring input_polled_dev. This converts peaq-wmi driver to use the
polling mode of standard input devices and removes dependency on
INPUT_POLLDEV.Because the new polling coded does not allow peeking inside the poller
structure to get the poll interval, we change the "debounce" process to
operate on the time basis, instead of counting events.We also fix error handling during initialization, as previously we leaked
input device structure when we failed to register it.Signed-off-by: Dmitry Torokhov
Reviewed-by: Hans de Goede
Tested-by: Hans de Goede
Signed-off-by: Andy Shevchenko
Signed-off-by: Sasha Levin
31 Dec, 2019
1 commit
-
commit 133b2acee3871ae6bf123b8fe34be14464aa3d2c upstream.
At least on the HP Envy x360 15-cp0xxx model the WMI interface
for HPWMI_FEATURE2_QUERY requires an outsize of at least 128 bytes,
otherwise it fails with an error code 5 (HPWMI_RET_INVALID_PARAMETERS):Dec 06 00:59:38 kernel: hp_wmi: query 0xd returned error 0x5
We do not care about the contents of the buffer, we just want to know
if the HPWMI_FEATURE2_QUERY command is supported.This commits bumps the buffer size, fixing the error.
Fixes: 8a1513b4932 ("hp-wmi: limit hotkey enable")
Cc: stable@vger.kernel.org
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1520703
Signed-off-by: Hans de Goede
Signed-off-by: Andy Shevchenko
Signed-off-by: Greg Kroah-Hartman
05 Dec, 2019
2 commits
-
commit f3e4f3fc8ee9729c4b1b27a478c68b713df53c0c upstream.
The AML code implementing the WMI methods creates a variable length
field to hold the input data we pass like this:CreateDWordField (Arg1, 0x0C, DSZI)
Local5 = DSZI /* \HWMC.DSZI */
CreateField (Arg1, 0x80, (Local5 * 0x08), DAIN)If we pass 0 as bios_args.datasize argument then (Local5 * 0x08)
is 0 which results in these errors:[ 71.973305] ACPI BIOS Error (bug): Attempt to CreateField of length zero (20190816/dsopcode-133)
[ 71.973332] ACPI Error: Aborting method \HWMC due to previous error (AE_AML_OPERAND_VALUE) (20190816/psparse-529)
[ 71.973413] ACPI Error: Aborting method \_SB.WMID.WMAA due to previous error (AE_AML_OPERAND_VALUE) (20190816/psparse-529)And in our HPWMI_WIRELESS2_QUERY calls always failing. for read commands
like HPWMI_WIRELESS2_QUERY the DSZI value is not used / checked, except for
read commands where extra input is needed to specify exactly what to read.So for HPWMI_WIRELESS2_QUERY we can safely pass the size of the expected
output as insize to hp_wmi_perform_query(), as we are already doing for all
other HPWMI_READ commands we send. Doing so fixes these errors.Cc: stable@vger.kernel.org
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=197007
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=201981
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1520703
Signed-off-by: Hans de Goede
Signed-off-by: Andy Shevchenko
Signed-off-by: Greg Kroah-Hartman -
commit 16245db1489cd9aa579506f64afeeeb13d825a93 upstream.
The HP WMI calls may take up to 128 bytes of data as input, and
the AML methods implementing the WMI calls, declare a couple of fields for
accessing input in different sizes, specifycally the HWMC method contains:CreateField (Arg1, 0x80, 0x0400, D128)
Even though we do not use any of the WMI command-types which need a buffer
of this size, the APCI interpreter still tries to create it as it is
declared in generoc code at the top of the HWMC method which runs before
the code looks at which command-type is requested.This results in many of these errors on many different HP laptop models:
[ 14.459261] ACPI Error: Field [D128] at 1152 exceeds Buffer [NULL] size 160 (bits) (20170303/dsopcode-236)
[ 14.459268] ACPI Error: Method parse/execution failed [\HWMC] (Node ffff8edcc61507f8), AE_AML_BUFFER_LIMIT (20170303/psparse-543)
[ 14.459279] ACPI Error: Method parse/execution failed [\_SB.WMID.WMAA] (Node ffff8edcc61523c0), AE_AML_BUFFER_LIMIT (20170303/psparse-543)This commit increases the size of the data element of the bios_args struct
to 128 bytes fixing these errors.Cc: stable@vger.kernel.org
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=197007
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=201981
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1520703
Signed-off-by: Hans de Goede
Signed-off-by: Andy Shevchenko
Signed-off-by: Greg Kroah-Hartman
14 Oct, 2019
1 commit
-
For APIC case of interrupt we don't fail a ->probe() of the driver,
which makes kernel to print a lot of warnings from the children.We have two options here:
- switch to platform_get_irq_optional(), though it won't stop children
to be probed and failed
- fail the ->probe() of i2c-multi-instantiateSince the in reality we never had devices in the wild where IRQ resource
is optional, the latter solution suits the best.Fixes: 799d3379a672 ("platform/x86: i2c-multi-instantiate: Introduce IOAPIC IRQ support")
Reported-by: Ammy Yi
Cc: Heikki Krogerus
Cc: Hans de Goede
Signed-off-by: Andy Shevchenko
Reviewed-by: Heikki Krogerus
10 Oct, 2019
2 commits
-
Since the commit
7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()")
the platform_get_irq() started issuing an error message which is not
what we want here.Switch to platform_get_irq_optional() to have only warning message
provided by the driver.Fixes: 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()")
Signed-off-by: Andy Shevchenko -
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/platform/x86/classmate-laptop.c: In function cmpc_accel_remove_v4:
drivers/platform/x86/classmate-laptop.c:424:21: warning: variable accel
set but not used [-Wunused-but-set-variable]
drivers/platform/x86/classmate-laptop.c: In function cmpc_accel_remove:
drivers/platform/x86/classmate-laptop.c:660:21: warning: variable accel
set but not used [-Wunused-but-set-variable]In function cmpc_accel_remove_v4 and cmpc_accel_remove, variable accel is
set but not used, so it can be removed. In that case, variable inputdev is
set but not used and can be removed.Fixes: 7125587df4e8 ("classmate-laptop: Add support for Classmate V4 accelerometer.")
Reported-by: Hulk Robot
Signed-off-by: yu kuai
Signed-off-by: Andy Shevchenko
25 Sep, 2019
1 commit
-
Pull x86 platform-drivers fixes from Andy Shevchenko:
- Fix compilation error of ASUS WMI driver when CONFIG_ACPI_BATTERY=n
- Fix I²C multi-instantiate driver to work with several USB PD devices
- Fix boot issue on Siemens SIMATIC IPC277E when PMC critical clock is
being disabled- Plenty of fixes to Intel Speed-Select Technology tools
* tag 'platform-drivers-x86-v5.4-2' of git://git.infradead.org/linux-platform-drivers-x86:
platform/x86: i2c-multi-instantiate: Derive the device name from parent
platform/x86: pmc_atom: Add Siemens SIMATIC IPC277E to critclk_systems DMI table
tools/power/x86/intel-speed-select: Fix perf-profile command output
tools/power/x86/intel-speed-select: Extend core-power command set
tools/power/x86/intel-speed-select: Fix some debug prints
tools/power/x86/intel-speed-select: Format get-assoc information
tools/power/x86/intel-speed-select: Allow online/offline based on tdp
tools/power/x86/intel-speed-select: Fix high priority core mask over count
platform/x86: asus-wmi: Make it depend on ACPI battery API
20 Sep, 2019
4 commits
-
When naming the new devices, instead of using the ACPI ID in
the name as base, using the parent device's name. That makes
it possible to support multiple multi-instance i2c devices
of the same type in the same system.This fixes an issue seen on some Intel Kaby Lake based
boards:sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-INT3515-tps6598x.0'
Fixes: 2336dfadfb1e ("platform/x86: i2c-multi-instantiate: Allow to have same slaves")
Cc: stable@vger.kernel.org
Signed-off-by: Heikki Krogerus
Reviewed-by: Hans de Goede
Signed-off-by: Andy Shevchenko -
The SIMATIC IPC277E uses the PMC clock for on-board components
and gets stuck during boot if the clock is disabled. Therefore,
add this device to the critical systems list.Tested on SIMATIC IPC277E.
Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
Reviewed-by: Jan Kiszka
Cc: Cedric Hombourger
Signed-off-by: Srikanth Krishnakar
Signed-off-by: Andy Shevchenko -
…ernel/git/chrome-platform/linux
Pull chrome platform updates from Benson Leung:
"CrOS EC / MFD Migration:
- Move cros_ec core driver from mfd into chrome platform.Wilco EC:
- Add batt_ppid_info command to Wilco telemetry driver.CrOS EC:
- cros_ec_rpmsg : Add support to inform EC of suspend/resume status
- cros_ec_rpmsg : Fix race condition on probe failed
- cros_ec_chardev : Add a poll handler to receive MKBP eventsMisc:
- bugfixes in cros_usbpd_logger and cros_ec_ishtp"* tag 'tag-chrome-platform-for-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
platform/chrome: cros_usbpd_logger: null check create_singlethread_workqueue
platform/chrome: cros_ec_chardev: Add a poll handler to receive MKBP events
platform/chrome: cros_ec_rpmsg: Fix race with host command when probe failed
platform/chrome: chromeos_tbmc: Report wake events
mfd: cros_ec: Use mfd_add_hotplug_devices() helper
mfd: cros_ec: Add convenience struct to define autodetectable CrOS EC subdevices
mfd: cros_ec: Add convenience struct to define dedicated CrOS EC MCUs
mfd: cros_ec: Use kzalloc and cros_ec_cmd_xfer_status helper
mfd / platform: cros_ec: Reorganize platform and mfd includes
mfd / platform: cros_ec: Rename config to a better name
mfd: cros_ec: Switch to use the new cros-ec-chardev driver
mfd / platform: cros_ec: Miscellaneous character device to talk with the EC
mfd / platform: cros_ec: Move cros-ec core driver out from MFD
mfd / platform: cros_ec: Handle chained ECs as platform devices
platform/chrome: cros_ec_rpmsg: Add host command AP sleep state support
platform/chrome: chromeos_laptop: drop checks of NULL-safe functions
platform/chrome: wilco_ec: Add batt_ppid_info command to telemetry driver -
Pull input updates from Dmitry Torokhov:
- input core allows hardware drivers to specify a [more precise]
timestamp (normally taken in top half) to better track velocity of
contacts- input_dev instances now support "polling" mode so that drivers could
use the same object for polled and interrupt-driven operation. The
plan is to convert existing drivers and retire input_polled_dev API- a new driver for the FlySky FS-iA6B RC receiver
- a refresh of BU21013 touchpad driver
- w90x900 keyboard and touchpad drivers are removed as the platform is
gone- assorted fixes
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (45 commits)
Input: sidewinder - make array seq static const, makes object smaller
Input: reset device timestamp on sync
Input: bu21013_ts - switch to using standard touchscreen properties
Input: bu21013_ts - switch to using MT-B (slotted) protocol
Input: bu21013_ts - fix suspend when wake source
Input: bu21013_ts - use interrupt from I2C client
Input: bu21013_ts - remove support for platform data
Input: bu21013_ts - convert to using managed resources
Input: bu21013_ts - remove useless comments
Input: bu21013_ts - annotate supend/resume methods as __maybe_unused
Input: bu21013_ts - rename some variables
Input: bu21013_ts - convert to use GPIO descriptors
ARM: ux500: improve BU21013 touchpad bindings
Input: i8042 - enable wakeup on a stable struct device
Input: soc_button_array - use platform_device_register_resndata()
Input: psmouse - drop all unneeded functions from mouse headers
Input: add support for polling to input devices
Input: wacom_w8001 - allocate additional space for 'phys'
Input: cros_ec_keyb - add back missing mask for event_type
Input: remove dev_err() usage after platform_get_irq()
...
19 Sep, 2019
1 commit
-
Pull driver core updates from Greg Kroah-Hartman:
"Here is the big driver core update for 5.4-rc1.There was a bit of a churn in here, with a number of core and OF
platform patches being added to the tree, and then after much
discussion and review and a day-long in-person meeting, they were
decided to be reverted and a new set of patches is currently being
reviewed on the mailing list.Other than that churn, there are two "persistent" branches in here
that other trees will be pulling in as well during the merge window.
One branch to add support for drivers to have the driver core
automatically add sysfs attribute files when a driver is bound to a
device so that the driver doesn't have to manually do it (and then
clean it up, as it always gets it wrong).There's another branch in here for generic lookup helpers for the
driver core that lots of busses are starting to use. That's the
majority of the non-driver-core changes in this patch series.There's also some on-going debugfs file creation cleanup that has been
slowly happening over the past few releases, with the goal to
hopefully get that done sometime next year.All of these have been in linux-next for a while now with no reported
issues"[ Note that the above-mentioned generic lookup helpers branch was
already brought in by the LED merge (commit 4feaab05dc1e) that had
shared it.Also note that that common branch introduced an i2c bug due to a bad
conversion, which got fixed here. - Linus ]* tag 'driver-core-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (49 commits)
coccinelle: platform_get_irq: Fix parse error
driver-core: add include guard to linux/container.h
sysfs: add BIN_ATTR_WO() macro
driver core: platform: Export platform_get_irq_optional()
hwmon: pwm-fan: Use platform_get_irq_optional()
driver core: platform: Introduce platform_get_irq_optional()
Revert "driver core: Add support for linking devices during device addition"
Revert "driver core: Add edit_links() callback for drivers"
Revert "of/platform: Add functional dependency link from DT bindings"
Revert "driver core: Add sync_state driver/bus callback"
Revert "of/platform: Pause/resume sync state during init and of_platform_populate()"
Revert "of/platform: Create device links for all child-supplier depencencies"
Revert "of/platform: Don't create device links for default busses"
Revert "of/platform: Fix fn definitons for of_link_is_valid() and of_link_property()"
Revert "of/platform: Fix device_links_supplier_sync_state_resume() warning"
Revert "of/platform: Disable generic device linking code for PowerPC"
devcoredump: fix typo in comment
devcoredump: use memory_read_from_buffer
of/platform: Disable generic device linking code for PowerPC
device.h: Fix warnings for mismatched parameter names in comments
...
18 Sep, 2019
2 commits
-
Pull device properties framework updates from Rafael Wysocki:
"Improve software node support (Heikki Krogerus) and clean up two
assorted pieces of code (Andy Shevchenko, Geert Uytterhoeven)"* tag 'devprop-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
software node: Initialize the return value in software_node_find_by_name()
software node: Initialize the return value in software_node_to_swnode()
ACPI / property: Fix acpi_graph_get_remote_endpoint() name in kerneldoc
device property: Remove duplicate test for NULL
platform/x86: intel_cht_int33fe: Use new API to gain access to the role switch
usb: roles: intel_xhci: Supplying software node for the role mux
software node: Add software_node_find_by_name() -
Pull power management updates from Rafael Wysocki:
"These include a rework of the main suspend-to-idle code flow (related
to the handling of spurious wakeups), a switch over of several users
of cpufreq notifiers to QoS-based limits, a new devfreq driver for
Tegra20, a new cpuidle driver and governor for virtualized guests, an
extension of the wakeup sources framework to expose wakeup sources as
device objects in sysfs, and more.Specifics:
- Rework the main suspend-to-idle control flow to avoid repeating
"noirq" device resume and suspend operations in case of spurious
wakeups from the ACPI EC and decouple the ACPI EC wakeups support
from the LPS0 _DSM support (Rafael Wysocki).- Extend the wakeup sources framework to expose wakeup sources as
device objects in sysfs (Tri Vo, Stephen Boyd).- Expose system suspend statistics in sysfs (Kalesh Singh).
- Introduce a new haltpoll cpuidle driver and a new matching governor
for virtualized guests wanting to do guest-side polling in the idle
loop (Marcelo Tosatti, Joao Martins, Wanpeng Li, Stephen Rothwell).- Fix the menu and teo cpuidle governors to allow the scheduler tick
to be stopped if PM QoS is used to limit the CPU idle state exit
latency in some cases (Rafael Wysocki).- Increase the resolution of the play_idle() argument to microseconds
for more fine-grained injection of CPU idle cycles (Daniel
Lezcano).- Switch over some users of cpuidle notifiers to the new QoS-based
frequency limits and drop the CPUFREQ_ADJUST and CPUFREQ_NOTIFY
policy notifier events (Viresh Kumar).- Add new cpufreq driver based on nvmem for sun50i (Yangtao Li).
- Add support for MT8183 and MT8516 to the mediatek cpufreq driver
(Andrew-sh.Cheng, Fabien Parent).- Add i.MX8MN support to the imx-cpufreq-dt cpufreq driver (Anson
Huang).- Add qcs404 to cpufreq-dt-platdev blacklist (Jorge Ramirez-Ortiz).
- Update the qcom cpufreq driver (among other things, to make it
easier to extend and to use kryo cpufreq for other nvmem-based
SoCs) and add qcs404 support to it (Niklas Cassel, Douglas
RAILLARD, Sibi Sankar, Sricharan R).- Fix assorted issues and make assorted minor improvements in the
cpufreq code (Colin Ian King, Douglas RAILLARD, Florian Fainelli,
Gustavo Silva, Hariprasad Kelam).- Add new devfreq driver for NVidia Tegra20 (Dmitry Osipenko, Arnd
Bergmann).- Add new Exynos PPMU events to devfreq events and extend that
mechanism (Lukasz Luba).- Fix and clean up the exynos-bus devfreq driver (Kamil Konieczny).
- Improve devfreq documentation and governor code, fix spelling typos
in devfreq (Ezequiel Garcia, Krzysztof Kozlowski, Leonard Crestez,
MyungJoo Ham, Gaël PORTAY).- Add regulators enable and disable to the OPP (operating performance
points) framework (Kamil Konieczny).- Update the OPP framework to support multiple opp-suspend properties
(Anson Huang).- Fix assorted issues and make assorted minor improvements in the OPP
code (Niklas Cassel, Viresh Kumar, Yue Hu).- Clean up the generic power domains (genpd) framework (Ulf Hansson).
- Clean up assorted pieces of power management code and documentation
(Akinobu Mita, Amit Kucheria, Chuhong Yuan).- Update the pm-graph tool to version 5.5 including multiple fixes
and improvements (Todd Brandt).- Update the cpupower utility (Benjamin Weis, Geert Uytterhoeven,
Sébastien Szymanski)"* tag 'pm-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (126 commits)
cpuidle-haltpoll: Enable kvm guest polling when dedicated physical CPUs are available
cpuidle-haltpoll: do not set an owner to allow modunload
cpuidle-haltpoll: return -ENODEV on modinit failure
cpuidle-haltpoll: set haltpoll as preferred governor
cpuidle: allow governor switch on cpuidle_register_driver()
PM: runtime: Documentation: add runtime_status ABI document
pm-graph: make setVal unbuffered again for python2 and python3
powercap: idle_inject: Use higher resolution for idle injection
cpuidle: play_idle: Increase the resolution to usec
cpuidle-haltpoll: vcpu hotplug support
cpufreq: Add qcs404 to cpufreq-dt-platdev blacklist
cpufreq: qcom: Add support for qcs404 on nvmem driver
cpufreq: qcom: Refactor the driver to make it easier to extend
cpufreq: qcom: Re-organise kryo cpufreq to use it for other nvmem based qcom socs
dt-bindings: opp: Add qcom-opp bindings with properties needed for CPR
dt-bindings: opp: qcom-nvmem: Support pstates provided by a power domain
Documentation: cpufreq: Update policy notifier documentation
cpufreq: Remove CPUFREQ_ADJUST and CPUFREQ_NOTIFY policy notifier events
PM / Domains: Verify PM domain type in dev_pm_genpd_set_performance_state()
PM / Domains: Simplify genpd_lookup_dev()
...
17 Sep, 2019
5 commits
-
* pm-sleep: (29 commits)
ACPI: PM: s2idle: Always set up EC GPE for system wakeup
ACPI: PM: s2idle: Avoid rearming SCI for wakeup unnecessarily
PM / wakeup: Unexport wakeup_source_sysfs_{add,remove}()
PM / wakeup: Register wakeup class kobj after device is added
PM / wakeup: Fix sysfs registration error path
PM / wakeup: Show wakeup sources stats in sysfs
PM / wakeup: Use wakeup_source_register() in wakelock.c
PM / wakeup: Drop wakeup_source_init(), wakeup_source_prepare()
PM: sleep: Replace strncmp() with str_has_prefix()
PM: suspend: Fix platform_suspend_prepare_noirq()
intel-hid: Disable button array during suspend-to-idle
intel-hid: intel-vbtn: Avoid leaking wakeup_mode set
ACPI: PM: s2idle: Execute LPS0 _DSM functions with suspended devices
ACPI: EC: PM: Make acpi_ec_dispatch_gpe() print debug message
ACPI: EC: PM: Consolidate some code depending on PM_SLEEP
ACPI: PM: s2idle: Eliminate acpi_sleep_no_ec_events()
ACPI: PM: s2idle: Switch EC over to polling during "noirq" suspend
ACPI: PM: s2idle: Add acpi.sleep_no_lps0 module parameter
ACPI: PM: s2idle: Rearrange lps0_device_attach()
PM/sleep: Expose suspend stats in sysfs
... -
* pm-s2idle-rework: (21 commits)
ACPI: PM: s2idle: Always set up EC GPE for system wakeup
ACPI: PM: s2idle: Avoid rearming SCI for wakeup unnecessarily
PM: suspend: Fix platform_suspend_prepare_noirq()
intel-hid: Disable button array during suspend-to-idle
intel-hid: intel-vbtn: Avoid leaking wakeup_mode set
ACPI: PM: s2idle: Execute LPS0 _DSM functions with suspended devices
ACPI: EC: PM: Make acpi_ec_dispatch_gpe() print debug message
ACPI: EC: PM: Consolidate some code depending on PM_SLEEP
ACPI: PM: s2idle: Eliminate acpi_sleep_no_ec_events()
ACPI: PM: s2idle: Switch EC over to polling during "noirq" suspend
ACPI: PM: s2idle: Add acpi.sleep_no_lps0 module parameter
ACPI: PM: s2idle: Rearrange lps0_device_attach()
ACPI: PM: Set up EC GPE for system wakeup from drivers that need it
PM: sleep: Drop dpm_noirq_begin() and dpm_noirq_end()
PM: sleep: Integrate suspend-to-idle with generig suspend flow
PM: sleep: Simplify suspend-to-idle control flow
ACPI: PM: Set s2idle_wakeup earlier and clear it later
PM: sleep: Fix possible overflow in pm_system_cancel_wakeup()
ACPI: EC: Return bool from acpi_ec_dispatch_gpe()
ACPICA: Return u32 from acpi_dispatch_gpe()
... -
Pull x86 platform-drivers updates from Andy Shevchenko:
- ASUS WMI driver got a couple of updates, i.e. support of FAN is fixed
for recent products and the charge threshold support has been added- Two uknown key events for Dell laptops are being ignored now to avoid
spamming users with harmless messages- HP ZBook 17 G5 and ASUS Zenbook UX430UNR got accelerometer support.
- Intel CherryTrail platforms had a regression with wake up. Now it's
fixed- Intel PMC driver got fixed in order to work nicely in Xen
environment- Intel Speed Select driver provides bucket vs core count relationship.
Besides that the tools has been updated for better output- The PrivacyGuard is enabled on Lenovo ThinkPad laptops
- Three tablets - Trekstor Primebook C11B 2-in-1, Irbis TW90 and Chuwi
Surbook Mini - got touchscreen support* tag 'platform-drivers-x86-v5.4-1' of git://git.infradead.org/linux-platform-drivers-x86: (53 commits)
MAINTAINERS: Switch PDx86 subsystem status to Odd Fixes
platform/x86: asus-wmi: Refactor charge threshold to use the battery hooking API
platform/x86: asus-wmi: Rename CHARGE_THRESHOLD to RSOC
platform/x86: asus-wmi: Reorder ASUS_WMI_CHARGE_THRESHOLD
tools/power/x86/intel-speed-select: Display core count for bucket
platform/x86: ISST: Allow additional TRL MSRs
tools/power/x86/intel-speed-select: Fix memory leak
tools/power/x86/intel-speed-select: Output success/failed for command output
tools/power/x86/intel-speed-select: Output human readable CPU list
tools/power/x86/intel-speed-select: Change turbo ratio output to maximum turbo frequency
tools/power/x86/intel-speed-select: Switch output to MHz
tools/power/x86/intel-speed-select: Simplify output for turbo-freq and base-freq
tools/power/x86/intel-speed-select: Fix cpu-count output
tools/power/x86/intel-speed-select: Fix help option typo
tools/power/x86/intel-speed-select: Fix package typo
tools/power/x86/intel-speed-select: Fix a read overflow in isst_set_tdp_level_msr()
platform/x86: intel_int0002_vgpio: Use device_init_wakeup
platform/x86: intel_int0002_vgpio: Fix wakeups not working on Cherry Trail
platform/x86: compal-laptop: Initialize "value" in ec_read_u8()
platform/x86: touchscreen_dmi: Add info for the Trekstor Primebook C11B 2-in-1
... -
Pull x86 cpu-feature updates from Ingo Molnar:
- Rework the Intel model names symbols/macros, which were decades of
ad-hoc extensions and added random noise. It's now a coherent, easy
to follow nomenclature.- Add new Intel CPU model IDs:
- "Tiger Lake" desktop and mobile models
- "Elkhart Lake" model ID
- and the "Lightning Mountain" variant of Airmont, plus support code- Add the new AVX512_VP2INTERSECT instruction to cpufeatures
- Remove Intel MPX user-visible APIs and the self-tests, because the
toolchain (gcc) is not supporting it going forward. This is the
first, lowest-risk phase of MPX removal.- Remove X86_FEATURE_MFENCE_RDTSC
- Various smaller cleanups and fixes
* 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits)
x86/cpu: Update init data for new Airmont CPU model
x86/cpu: Add new Airmont variant to Intel family
x86/cpu: Add Elkhart Lake to Intel family
x86/cpu: Add Tiger Lake to Intel family
x86: Correct misc typos
x86/intel: Add common OPTDIFFs
x86/intel: Aggregate microserver naming
x86/intel: Aggregate big core graphics naming
x86/intel: Aggregate big core mobile naming
x86/intel: Aggregate big core client naming
x86/cpufeature: Explain the macro duplication
x86/ftrace: Remove mcount() declaration
x86/PCI: Remove superfluous returns from void functions
x86/msr-index: Move AMD MSRs where they belong
x86/cpu: Use constant definitions for CPU models
lib: Remove redundant ftrace flag removal
x86/crash: Remove unnecessary comparison
x86/bitops: Use __builtin_constant_p() directly instead of IS_IMMEDIATE()
x86: Remove X86_FEATURE_MFENCE_RDTSC
x86/mpx: Remove MPX APIs
... -
Pull GPIO updates from Linus Walleij:
"This is the bulk of changes in the GPIO subsystem for the v5.4 kernel
cycle.Core changes:
- Support hierarchical GPIO irqchips.
We now have three consumers that can use this: Intel IXP4xx,
ThunderX and Qualcomm SPMI GPIO (in the pinctrl subsystem).The support code has been long in the making and hashed out so it
should be easily adaptable for all hierarchical irqchip parents.
The code only gets compiled in if hierarchical irqchip is used at
the topmost irq controller at least, as the hierarchical irqchip
requires strict hierarchy all the way up in the system.- Determine the need for a "valid_mask" for GPIO lines on the
gpio_chip and conversely for the "valid_mask" for the GPIO
interrupt chip interrupt lines by looking for a .init_valid_mask()
callback in the main chip or GPIO interrupt chip respectively.
Allocate it with bitmap_alloc().- Isolate the device tree/open firmware GPIO description code out in
its own file properly.- Isolate the ACPI GPIO description code out in its own file
properly.- Drop a whole lot of #ifdef:s in the main includes: it does not hurt
to keep the include items around, and we get quicker and clearer
compile failures if the appropriate kernel symbols are not selected
for drivers.New/deleted drivers:
- New driver for Aspeed SGPIO.
- The KS8695 driver is deleted as the platform gets deleted from
arch/arm in this kernel cycle.- The Cirrus Logic Madera driver now supports CS47L92 and CS47L15.
- The Freescale MPC8xxx now supports LS1028A and LS1088A.
Driver improvements:
- We pass the GPIO irqchip intialization by directly filling in the
struct instead of using set-up functions (the new way) for Intel
MID, Lynxpoint, Merrifield, XLP, HLWD, Aspeed, ZX, VF610, TQMX86,
MT7621, Zynq and EP93xx.Out-of-band changes:
- Fix a GPIO header inclusion in Unicore - no response from
maintainer.- Drop FMC subsystem from MAINTAINERS - was deleted in the GPIO tree
last cycle so let's mop up the shards"* tag 'gpio-v5.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (82 commits)
gpiolib: of: add a fallback for wlf,reset GPIO name
gpio: htc-egpio: Remove unused exported htc_egpio_get_wakeup_irq()
gpio: remove explicit comparison with 0
gpio: creg-snps: use devm_platform_ioremap_resource() to simplify code
gpio: devres: Switch to EXPORT_SYMBOL_GPL()
gpio: of: Switch to EXPORT_SYMBOL_GPL()
gpio: of: Make of_gpio_simple_xlate() private
gpio: of: Make of_get_named_gpiod_flags() private
gpio: aspeed: Add in ast2600 details to Aspeed driver
gpio: aspeed: Use ngpio property from device tree if available
gpio: aspeed: Setup irqchip dynamically
gpio/aspeed: Fix incorrect number of banks
gpio: aspeed: Update documentation with ast2600 controllers
gpio: Initialize the irqchip valid_mask with a callback
gpiolib: acpi: make acpi_can_fallback_to_crs() static
gpio: Fix further merge errors
gpio: Fix up merge collision in include file
gpio: of: Normalize return code variable name
gpio: gpiolib: Normalize return code variable name
gpio: ep93xx: Pass irqchip when adding gpiochip
...
15 Sep, 2019
2 commits
-
When driver has been switched to use ACPI battery API in the commit
7973353e92ee ("Refactor charge threshold to use the battery hooking API")
it makes it implicitly dependent to a corresponding kernel configuration
option.Make this dependency explicit in Kconfig.
Fixes: 7973353e92ee ("Refactor charge threshold to use the battery hooking API")
Reported-by: kbuild test robot
Cc: Kristian Klausen
Signed-off-by: Andy Shevchenko
12 Sep, 2019
4 commits
-
In cros_usbpd_logger_probe the return value of
create_singlethread_workqueue may be null, it should be checked.Signed-off-by: Navid Emamdoost
Signed-off-by: Enric Balletbo i Serra -
Allow to poll on the cros_ec device to receive the MKBP events.
The /dev/cros_[ec|fp|..] file operations now implements the poll
operation. The userspace can now receive specific MKBP events by doing
the following:- Open the /dev/cros_XX file.
- Call the CROS_EC_DEV_IOCEVENTMASK ioctl with the bitmap of the MKBP
events it wishes to receive as argument.
- Poll on the file descriptor.
- When it gets POLLIN, do a read on the file descriptor, the first
queued event will be returned (using the struct
ec_response_get_next_event format: one byte of event type, then
the payload).The read() operation returns at most one event even if there are several
queued, and it might be truncated if the buffer is smaller than the
event (but the caller should know the maximum size of the events it is
reading).read() used to return the EC version string, it still does it when no
event mask or an empty event is set for backward compatibility (despite
nobody really using this feature).This will be used, for example, by the userspace daemon to receive and
treat the EC_MKBP_EVENT_FINGERPRINT sent by the FP MCU.Signed-off-by: Vincent Palatin
Signed-off-by: Enric Balletbo i Serra
Acked-by: Andy Shevchenko
Reviewed-by: Gwendal Grignou -
Since the rpmsg_endpoint is created before probe is called, it's
possible that a host event is received during cros_ec_register, and
there would be some pending work in the host_event_work workqueue while
cros_ec_register is called.If cros_ec_register fails, when the leftover work in host_event_work
run, the ec_dev from the drvdata of the rpdev could be already set to
NULL, causing kernel crash when trying to run cros_ec_get_next_event.Fix this by creating the rpmsg_endpoint by ourself, and when
cros_ec_register fails (or on remove), destroy the endpoint first (to
make sure there's no more new calls to cros_ec_rpmsg_callback), and then
cancel all works in the host_event_work workqueue.Cc: stable@vger.kernel.org
Fixes: 2de89fd98958 ("platform/chrome: cros_ec: Add EC host command support using rpmsg")
Signed-off-by: Pi-Hsun Shih
Signed-off-by: Enric Balletbo i Serra -
Mark chromeos_tbmc as wake capable and report wake events. This helps to
abort suspend on seeing a tablet mode switch event when kernel is
suspending. This also helps identifying if chromeos_tbmc is the wake
source.Signed-off-by: Ravi Chandra Sadineni
Signed-off-by: Enric Balletbo i Serra