Pull thermal updates from Daniel Lezcano:
- Add upper and lower limits clamps for the cooling device state in the
power allocator governor (Michael Kao)
- Add upper and lower limits support for the power allocator governor
(Lukasz Luba)
- Optimize conditions testing for the trip points (Bernard Zhao)
- Replace spin_lock_irqsave by spin_lock in hard IRQ on the rcar driver
(Tian Tao)
- Add MT8516 dt-bindings and device reset optional support (Fabien
Parent)
- Add a quiescent period to cool down the PCH when entering S0iX
(Sumeet Pawnikar)
- Use bitmap API instead of re-inventing the wheel on sun8i (Yangtao
Li)
- Remove useless NULL check in the hwmon driver (Bernard Zhao)
- Update the current state in the cpufreq cooling device only if the
frequency change is effective (Zhuguangqing)
- Improve the schema validation for the rcar DT bindings (Geert
Uytterhoeven)
- Fix the user time unit in the documentation (Viresh Kumar)
- Add PCI ids for Lewisburg PCH (Andres Freund)
- Add hwmon support on amlogic (Martin Blumenstingl)
- Fix build failure for PCH entering on in S0iX (Randy Dunlap)
- Improve the k_* coefficient for the power allocator governor (Lukasz
Luba)
- Fix missing const on a sysfs attribute (Rikard Falkeborn)
- Remove broken interrupt support on rcar to be replaced by a new one
(Niklas Söderlund)
- Improve the error code handling at init time on imx8mm (Fabio
Estevam)
- Compute interval validity once instead at each temperature reading
iteration on acerhdf (Daniel Lezcano)
- Add r8a779a0 support (Niklas Söderlund)
- Add PCI ids for AlderLake PCH and mmio refactoring (Srinivas
Pandruvada)
- Add RFIM and mailbox support on int340x (Srinivas Pandruvada)
- Use macro for temperature calculation on PCH (Sumeet Pawnikar)
- Simplify return conditions at probe time on Broadcom (Zheng Yongjun)
- Fix workload name on PCH (Srinivas Pandruvada)
- Migrate the devfreq cooling device code to the energy model API
(Lukasz Luba)
- Emit a warning if the thermal_zone_device_update is called without
the .get_temp() ops (Daniel Lezcano)
- Add critical and hot ops for the thermal zone (Daniel Lezcano)
- Remove notification usage when critical is reached on rcar (Daniel
Lezcano)
- Fix devfreq build when ENERGY_MODEL is not set (Lukasz Luba)
* tag 'thermal-v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (45 commits)
thermal/drivers/devfreq_cooling: Fix the build when !ENERGY_MODEL
thermal/drivers/rcar: Remove notification usage
thermal/core: Add critical and hot ops
thermal/core: Emit a warning if the thermal zone is updated without ops
drm/panfrost: Register devfreq cooling and attempt to add Energy Model
thermal: devfreq_cooling: remove old power model and use EM
thermal: devfreq_cooling: add new registration functions with Energy Model
thermal: devfreq_cooling: use a copy of device status
thermal: devfreq_cooling: change tracing function and arguments
thermal: int340x: processor_thermal: Correct workload type name
thermal: broadcom: simplify the return expression of bcm2711_thermal_probe()
thermal: intel: pch: use macro for temperature calculation
thermal: int340x: processor_thermal: Add mailbox driver
thermal: int340x: processor_thermal: Add RFIM driver
thermal: int340x: processor_thermal: Add AlderLake PCI device id
thermal: int340x: processor_thermal: Refactor MMIO interface
thermal: rcar_gen3_thermal: Add r8a779a0 support
dt-bindings: thermal: rcar-gen3-thermal: Add r8a779a0 support
platform/x86/drivers/acerhdf: Check the interval value when it is set
platform/x86/drivers/acerhdf: Use module_param_cb to set/get polling interval
...
Highlights:
- New driver for changing BIOS settings from within Linux on Dell devices,
this introduces a new generic sysfs API for this. Lenovo is working on
also supporting this API on their devices
- New Intel PMT telemetry and crashlog drivers
- Support for SW_TABLET_MODE reporting for the acer-wmi and intel-hid drivers
- Preparation work for improving support for Microsoft Surface hardware
- Various fixes / improvements / quirks for the panasonic-laptop and others
The following is an automated git shortlog grouped by driver:
ISST:
- Mark mmio_range_devid_0 and mmio_range_devid_1 with static keyword
- Change PCI device macros
- Allow configurable offset range
- Check for unaligned mmio address
Intel PMT Crashlog capability driver:
- Intel PMT Crashlog capability driver
Intel PMT Telemetry capability driver:
- Intel PMT Telemetry capability driver
Intel PMT class driver:
- Intel PMT class driver
Introduce support for Systems Management Driver over WMI for Dell Systems:
- Introduce support for Systems Management Driver over WMI for Dell Systems
MAINTAINERS:
- new panasonic-laptop maintainer
- rectify DELL WMI SYSMAN DRIVERS section
Merge tag 'ib-mfd-x86-v5.11' into review-hans:
- Merge tag 'ib-mfd-x86-v5.11' into review-hans
PCI:
- Add defines for Designated Vendor-Specific Extended Capability
Revert "platform/x86:
- wmi: Destroy on cleanup rather than unregister"
acer-wireless:
- send an EV_SYN/SYN_REPORT between state changes
acer-wmi:
- Add ACER_CAP_KBD_DOCK quirk for the Aspire Switch 10E SW3-016
- add automatic keyboard background light toggle key as KEY_LIGHTS_TOGGLE
- Add support for SW_TABLET_MODE on Switch devices
- Add ACER_CAP_SET_FUNCTION_MODE capability flag
- Add new force_caps module parameter
- Cleanup accelerometer device handling
- Cleanup ACER_CAP_FOO defines
- Drop no-op set_quirks call from find_quirks
amd-pmc:
- Add AMD platform support for S2Idle
asus-wmi:
- Add userspace notification for performance mode change
- Add support for SW_TABLET_MODE on UX360
dell-smbios-base:
- Fix error return code in dell_smbios_init
dell-wmi-sysman:
- work around for BIOS bug
- fix init_bios_attributes() error handling
docs:
- ABI: sysfs-class-firmware-attributes: solve some warnings
i2c-multi-instantiate:
- Use device_get_match_data() to get driver data
- Simplify with dev_err_probe()
- Drop redundant ACPI_PTR()
intel-hid:
- add Rocket Lake ACPI device ID
- Do not create SW_TABLET_MODE input-dev when a KIOX010A ACPI dev is present
- Add alternative method to enable switches
- Add support for SW_TABLET_MODE
- fix _DSM function index handling
intel-vbtn:
- Fix SW_TABLET_MODE always reporting 1 on some HP x360 models
- Allow switch events on Acer Switch Alpha 12
- Support for tablet mode on HP Pavilion 13 x360 PC
intel_pmc_core:
- Assign boolean values to a bool variable
mfd:
- Intel Platform Monitoring Technology support
mlx-platform:
- Fix item counter assignment for MSN2700/ComEx system
- Fix item counter assignment for MSN2700, MSN24xx systems
- remove an unused variable
- Remove PSU EEPROM from MSN274x platform configuration
- Remove PSU EEPROM from default platform configuration
panasonic-laptop:
- Add sysfs attributes for firmware brightness registers
- Add support for battery charging threshold (eco mode)
- Resolve hotkey double trigger bug
- Add write support to mute
- Fix sticky key init bug
- Fix naming of platform files for consistency with other modules
- Split MODULE_AUTHOR() by one author per macro call
- Replace ACPI prints with pr_*() macros
- Add support for optical driver power in Y and W series
platform:
- Add Surface platform directory
platform/mellanox:
- mlxbf-pmc: Add Mellanox BlueField PMC driver
platform/surface:
- gpe: Add support for 15" Intel version of Surface Laptop 3
- Add Driver to set up lid GPEs on MS Surface device
- Move Surface Pro 3 Button driver to platform/surface
- Move Surface 3 Power OpRegion driver to platform/surface
- Move Surface 3 Button driver to platform/surface
- Move Surface 3 WMI driver to platform/surface
platform/x86/dell-wmi-sysman:
- Make some symbols static
- Make wmi_sysman_kobj_sysfs_ops static
pmt:
- Fix a potential Oops on error in probe
remove unneeded break:
- remove unneeded break
thinkpad_acpi:
- remove trailing semicolon in macro definition
- Whitelist P15 firmware for dual fan control
- Add palm sensor support
- Send tablet mode switch at wakeup time
- Add BAT1 is primary battery quirk for Thinkpad Yoga 11e 4th gen
- Do not report SW_TABLET_MODE on Yoga 11e
- add P1 gen3 second fan support
tools/power/x86/intel-speed-select:
- Update version for v5.11
- Account for missing sysfs for die_id
- Read TRL from mailbox
toshiba_acpi:
- Fix the wrong variable assignment
touchscreen_dmi:
- Add info for the Irbis TW118 tablet
- Add info for the Predia Basic tablet
x86/platform:
- classmate-laptop: add WiFi media button
-----BEGIN PGP SIGNATURE-----
iQFIBAABCAAyFiEEuvA7XScYQRpenhd+kuxHeUQDJ9wFAl/XTkEUHGhkZWdvZWRl
QHJlZGhhdC5jb20ACgkQkuxHeUQDJ9z5EAf7BzqZDyFBpsDd8+o0FsjCq1DEzw0R
lZdhZt65wSMqe0sndgfStPQG1yet8JgABgq8aCkBQLhj55hjiOUYHe5iXmylSRQn
iWhu2xI+qYb9rhPW3lYilGcWAIfC5jrEZHFLtpXKx/p5iwCJQRvI6sV8HwcwJjnQ
p3eyxIUEQieAtO90scqsOWZTKtT/no9UMTLbZwrO3Spv05WGopIMtkHPWYTd96pa
6SRBdhZj3mrHHc7mRe0u4Wx2dzeUwiPLfubt/kmRPoo1HWTGE2Ck4KPqN/nSY3R2
z882CMZjWpbwoc3OP2fK26uIHjTh45+yVH8DVZbaQW9BWIOdE87iADzuWA==
=Df8H
-----END PGP SIGNATURE-----
Merge tag 'platform-drivers-x86-v5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver updates from Hans de Goede:
"Highlights:
- New driver for changing BIOS settings from within Linux on Dell
devices. This introduces a new generic sysfs API for this. Lenovo
is working on also supporting this API on their devices
- New Intel PMT telemetry and crashlog drivers
- Support for SW_TABLET_MODE reporting for the acer-wmi and intel-hid
drivers
- Preparation work for improving support for Microsoft Surface
hardware
- Various fixes / improvements / quirks for the panasonic-laptop and
others"
* tag 'platform-drivers-x86-v5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (81 commits)
platform/x86: ISST: Mark mmio_range_devid_0 and mmio_range_devid_1 with static keyword
platform/x86: intel-hid: add Rocket Lake ACPI device ID
x86/platform: classmate-laptop: add WiFi media button
platform/x86: mlx-platform: Fix item counter assignment for MSN2700/ComEx system
platform/x86: mlx-platform: Fix item counter assignment for MSN2700, MSN24xx systems
tools/power/x86/intel-speed-select: Update version for v5.11
tools/power/x86/intel-speed-select: Account for missing sysfs for die_id
tools/power/x86/intel-speed-select: Read TRL from mailbox
platform/x86: intel-hid: Do not create SW_TABLET_MODE input-dev when a KIOX010A ACPI dev is present
platform/x86: intel-hid: Add alternative method to enable switches
platform/x86: intel-hid: Add support for SW_TABLET_MODE
platform/x86: intel-vbtn: Fix SW_TABLET_MODE always reporting 1 on some HP x360 models
platform/x86: ISST: Change PCI device macros
platform/x86: ISST: Allow configurable offset range
platform/x86: ISST: Check for unaligned mmio address
acer-wireless: send an EV_SYN/SYN_REPORT between state changes
platform/x86: dell-wmi-sysman: work around for BIOS bug
platform/x86: mlx-platform: remove an unused variable
platform/x86: thinkpad_acpi: remove trailing semicolon in macro definition
platform/x86: dell-smbios-base: Fix error return code in dell_smbios_init
...
(Justin Ernst and Mike Travis)
- The usual set of small fixes.
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEzv7L6UO9uDPlPSfHEsHwGGHeVUoFAl/XWLkACgkQEsHwGGHe
VUpgoQ//WnhLoyByrxyKScOLW2aCCX4sIQ2R0Mjqt4z6wHHL6OB1GIswtIWsFlpw
UtFOhTmKV0A5q/yXIGYY1EOZPhA4wrrTesYHsOoVcJ3xdwrAarc3fzw02uKT/uQp
sW0JxTtJ5iK0XZp+K81344sQy26iuTiLh0Lwg9lJ5mpUotW+1iSOp7LAgcN462r9
3l8To6qWyWnnMWgJlV7jdcsswk0V2TkT/iipQITNqEGtwqRm/uFGRgK/669IbqP/
P/qROhU1XseHxVFfPMXfFVeFjNTpkcgD11C8YeqWiHXrmBesCHIC9cd2pYfJepLJ
F4sIh6zqt6v6z5UOD+yo8IjdmL0v9nPLJiCeiu9ES59pVIx7DsR+p005fBLTAXp8
QpbiAhJn4ajpu78QAkkhieAvldXP2+1h42wK8HUTWKt2wPsnyGozvY71kp8UkMSd
1Kh3mahrAN57TfvlewrMr/ynhGMMuWQHIr3ScYei0L6vF2c6f98HSiNzzZ1PiiY7
6OwR+qISucV8ZeXMv6va5POI/T67UZjjuT5Zw0ls1LpqJ6CkGmcrCeq6qYbxK7Fy
Vd8T/v51FknrTF0J42GMLb9ICIFmC0yAvzflTytFvWqgGEZpEEpRzmKfeC+a0G7B
m3XEm/xE3+3TKnID+2tPSFOEU4mdwKC0+lguD7DV8aTYpdjsxXs=
=VZBo
-----END PGP SIGNATURE-----
Merge tag 'x86_platform_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 platform updates from Borislav Petkov:
- add a new uv_sysfs driver and expose read-only information from UV
BIOS (Justin Ernst and Mike Travis)
- the usual set of small fixes
* tag 'x86_platform_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/platform/uv: Update sysfs documentation
x86/platform/uv: Add deprecated messages to /proc info leaves
x86/platform/uv: Add sysfs hubless leaves
x86/platform/uv: Add sysfs leaves to replace those in procfs
x86/platform/uv: Add kernel interfaces for obtaining system info
x86/platform/uv: Make uv_pcibus_kset and uv_hubs_kset static
x86/platform/uv: Fix an error code in uv_hubs_init()
x86/platform/uv: Update MAINTAINERS for uv_sysfs driver
x86/platform/uv: Update ABI documentation of /sys/firmware/sgi_uv/
x86/platform/uv: Add new uv_sysfs platform driver
x86/platform/uv: Add and export uv_bios_* functions
x86/platform/uv: Remove existing /sys/firmware/sgi_uv/ interface
Fix the following sparse warnings:
drivers/platform/x86/intel_speed_select_if/isst_if_mmio.c:23:24: warning: symbol 'mmio_range_devid_0' was not declared. Should it be static?
drivers/platform/x86/intel_speed_select_if/isst_if_mmio.c:28:24: warning: symbol 'mmio_range_devid_1' was not declared. Should it be static?
Signed-off-by: Zou Wei <zou_wei@huawei.com>
Link: https://lore.kernel.org/r/1607430489-116200-1-git-send-email-zou_wei@huawei.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
The WiFi media button on the Quanta NL3 reports keycodes 0x8b and 0x9b
to the platform driver. Add the mapping to support these codes.
Signed-off-by: Carlo Caione <carlo@endlessm.com>
Reviewed-by: Chris Chiu <chiu@endlessos.org>
Link: https://lore.kernel.org/r/20201208061111.29073-1-chiu@endlessos.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Fix array names to match assignments for data items and data items
counter in 'mlxplat_mlxcpld_comex_items' structure for:
.data = mlxplat_mlxcpld_default_pwr_items_data,
.count = ARRAY_SIZE(mlxplat_mlxcpld_pwr),
and
.data = mlxplat_mlxcpld_default_fan_items_data,
.count = ARRAY_SIZE(mlxplat_mlxcpld_fan),
Replace:
- 'mlxplat_mlxcpld_pwr' by 'mlxplat_mlxcpld_default_pwr_items_data' for
ARRAY_SIZE() calculation.
- 'mlxplat_mlxcpld_fan' by 'mlxplat_mlxcpld_default_fan_items_data'
for ARRAY_SIZE() calculation.
Fixes: bdd6e155e0 ("platform/x86: mlx-platform: Add support for new system type")
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Link: https://lore.kernel.org/r/20201207174745.22889-3-vadimp@nvidia.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Fix array names to match assignments for data items and data items
counter in 'mlxplat_mlxcpld_default_items' structure for:
.data = mlxplat_mlxcpld_default_pwr_items_data,
.count = ARRAY_SIZE(mlxplat_mlxcpld_pwr),
and
.data = mlxplat_mlxcpld_default_fan_items_data,
.count = ARRAY_SIZE(mlxplat_mlxcpld_fan),
Replace:
- 'mlxplat_mlxcpld_pwr' by 'mlxplat_mlxcpld_default_pwr_items_data' for
ARRAY_SIZE() calculation.
- 'mlxplat_mlxcpld_fan' by 'mlxplat_mlxcpld_default_fan_items_data'
for ARRAY_SIZE() calculation.
Fixes: c6acad68eb ("platform/mellanox: mlxreg-hotplug: Modify to use a regmap interface")
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Link: https://lore.kernel.org/r/20201207174745.22889-2-vadimp@nvidia.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Add uv_sysfs leaves to display the info.
Signed-off-by: Mike Travis <mike.travis@hpe.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Steve Wahl <steve.wahl@hpe.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lkml.kernel.org/r/20201128034227.120869-3-mike.travis@hpe.com
Some 360 degree hinges (yoga) style 2-in-1 devices use 2 accelerometers
to allow the OS to determine the angle between the display and the base
of the device. On Windows these are read by a special HingeAngleService
process which calls an ACPI DSM (Device Specific Method) on the
ACPI KIOX010A device node for the sensor in the display, to let the
firmware know if the 2-in-1 is in tablet- or laptop-mode so that it can
disable the kbd and touchpad to avoid spurious input in tablet-mode.
The linux kxcjk1013 driver calls the DSM for this once at probe time
to ensure that the builtin kbd and touchpad work. On some devices this
causes a "spurious" 0xcd event on the intel-hid ACPI dev. In this case
there is not a functional tablet-mode switch, so we should not register
the tablet-mode switch device.
Cc: Elia Devito <eliadevito@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20201207165129.396298-1-hdegoede@redhat.com
Some convertible have unreliable VGBS return, in these cases we enable
support when receiving the first event.
Signed-off-by: Elia Devito <eliadevito@gmail.com>
Link: https://lore.kernel.org/r/20201204160234.36832-1-elia@xvalue.it
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Some convertible use the intel-hid ACPI interface to report SW_TABLET_MODE,
implement this with DMI based allow-list to be sure to activate support
only on models that effectively have it.
Signed-off-by: Elia Devito <eliadevito@gmail.com>
Link: https://lore.kernel.org/r/20201204160121.36703-1-elia@xvalue.it
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Currently the code checks the interval value when the temperature is
read which is bad for two reasons:
- checking and setting the interval in the get_temp callback is
inaccurate and awful, that can be done when changing the value.
- Changing the thermal zone structure internals is an abuse of the
exported structure, moreover no lock is taken here.
The goal of this patch is to solve the first item by using the 'set'
function called when changing the interval. The check is done there
and removed from the get_temp function. If the thermal zone was not
initialized yet, the interval is not updated in this case as that will
happen in the init function when registering the thermal zone device.
I don't have any hardware to test the changes.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Peter Kaestle <peter@piie.net>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20201203071738.2363701-2-daniel.lezcano@linaro.org
The module parameter can be set by using ops to get and set the
values. The change will allow to check the correctness of the interval
value everytime it is changed instead of checking in the get_temp
function.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Peter Kaestle <peter@piie.net>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20201203071738.2363701-1-daniel.lezcano@linaro.org
Some HP x360 models have an ACPI VGBS method which sets bit 4 instead of
bit 6 when NOT in tablet mode at boot. Inspecting all the DSDTs in my DSDT
collection shows only one other model, the Medion E1239T ever setting bit 4
and it always sets this together with bit 6.
So lets treat bit 4 as a second bit which when set indicates the device not
being in tablet-mode, as we already do for bit 6.
While at it also prefix all VGBS constant defines with "VGBS_".
Note this wrokaround was first added to the kernel as
commit d823346876 ("platform/x86: intel-vbtn: Fix SW_TABLET_MODE always
reporting 1 on the HP Pavilion 11 x360").
After commit 8169bd3e6e ("platform/x86: intel-vbtn: Switch to an
allow-list for SW_TABLET_MODE reporting") got added to the kernel this
was reverted, because with the new allow-list approach the workaround
was no longer necessary for the model on which the issue was first
reported.
But it turns out that the workaround is still necessary because some
affected models report a chassis-type of 31 which is on the allow-list.
BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1894017
Fixes: 21d64817c7 ("platform/x86: intel-vbtn: Revert "Fix SW_TABLET_MODE always reporting 1 on the HP Pavilion 11 x360"")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
The mmio offset range can be different based on the PCI device id. Here
for INTEL_RAPL_PRIO_DEVID_1, the range is increased from 45 to 64. Pass
the range as the driver_data. Also account for different ranges during
save/restore via suspend/resume callbacks.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://lore.kernel.org/r/20201204015746.1168941-2-srinivas.pandruvada@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Sending the switch state change twice within the same frame is invalid
evdev protocol and only works if the client handles keys immediately as
well. Processing events immediately is incorrect, it forces a fake
order of events that does not exist on the device.
Recent versions of libinput changed to only process the device state and
SYN_REPORT time, so now the key event is lost.
Same fix as 'commit <bff5bf9db1c94> ("platform/x86: asus-wireless: send
an EV_SYN/SYN_REPORT between state changes")'
Signed-off-by: Daniel Drake <drake@endlessos.org>
Signed-off-by: Chris Chiu <chiu@endlessos.org>
Link: https://lore.kernel.org/r/20201207064322.13992-1-chiu@endlessos.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
BIOS sets incorrect value (zero) when SET value passed for integer
attribute with + sign. Added workaround to remove + sign before passing
input to BIOS.
Co-developed-by: Mario Limonciello <mario.limonciello@dell.com>
Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
Co-developed-by: Prasanth KSR <prasanth.ksr@dell.com>
Signed-off-by: Prasanth KSR <prasanth.ksr@dell.com>
Signed-off-by: Divya Bharathi <divya.bharathi@dell.com>
Link: https://lore.kernel.org/r/20201202131935.307372-1-divya.bharathi@dell.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
The only reference to the mlxplat_mlxcpld_psu[] array got removed,
so there is now a warning from clang:
drivers/platform/x86/mlx-platform.c:322:30: error: variable 'mlxplat_mlxcpld_psu' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
static struct i2c_board_info mlxplat_mlxcpld_psu[] = {
Remove the array as well and adapt the ARRAY_SIZE() call
accordingly.
Fixes: 912b341585 ("platform/x86: mlx-platform: Remove PSU EEPROM from MSN274x platform configuration")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Vadim Pasternak <vadimp@nvidia.com>
Link: https://lore.kernel.org/r/20201203223105.1195709-1-arnd@kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Fix the following sparse warnings:
drivers/platform/x86/uv_sysfs.c:22:13: warning: symbol \
'uv_pcibus_kset' was not declared. Should it be static?
drivers/platform/x86/uv_sysfs.c:23:13: warning: symbol \
'uv_hubs_kset' was not declared. Should it be static?
Signed-off-by: Zou Wei <zou_wei@huawei.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lkml.kernel.org/r/1606734713-43919-1-git-send-email-zou_wei@huawei.com
Fix to return the error code -ENODEV when fails to init wmi and
smm.
Fixes: 41e36f2f85 ("platform/x86: dell-smbios: Link all dell-smbios-* modules together")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Reviewed-by: Mario Limonciello <mario.limonciello@dell.com>
Link: https://lore.kernel.org/r/20201125065032.154125-1-miaoqinglang@huawei.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This 2-in-1 model (Product name: Switch SA5-271) features a SW_TABLET_MODE
that works as it would be expected, both when detaching the keyboard and
when folding it behind the tablet body.
It used to work until the introduction of the allow list at
commit 8169bd3e6e ("platform/x86: intel-vbtn: Switch to an allow-list
for SW_TABLET_MODE reporting"). Add this model to it, so that the Virtual
Buttons device announces the EV_SW features again.
Fixes: 8169bd3e6e ("platform/x86: intel-vbtn: Switch to an allow-list for SW_TABLET_MODE reporting")
Cc: stable@vger.kernel.org
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Link: https://lore.kernel.org/r/20201201135727.212917-1-carlosg@gnome.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
The Pavilion 13 x360 PC has a chassis-type which does not indicate it is
a convertible, while it is actually a convertible. Add it to the
dmi_switches_allow_list.
Signed-off-by: Max Verevkin <me@maxverevkin.tk>
Link: https://lore.kernel.org/r/20201124131652.11165-1-me@maxverevkin.tk
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
The commit 78429e55e4 ("platform/x86: toshiba_acpi: Clean up
variable declaration") cleans up variable declaration in
video_proc_write(). Seems it does the variable assignment in the
wrong place, this results in dead code and changes the source code
logic. Fix it by doing the assignment at the beginning of the funciton.
Fixes: 78429e55e4 ("platform/x86: toshiba_acpi: Clean up variable declaration")
Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
Link: https://lore.kernel.org/r/1606024177-16481-1-git-send-email-kaixuxia@tencent.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Got a dmesg message on my AMD Renoir based Acer laptop:
"acer_wmi: Unknown key number - 0x84" when toggling keyboard
background light
Signed-off-by: Timo Witte <timo.witte@gmail.com>
Reviewed-by: "Lee, Chun-Yi" <jlee@suse.com>
Link: https://lore.kernel.org/r/20200804001423.36778-1-timo.witte@gmail.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
The lid state may change while the machine is suspended. As such, we may
need to re-check the state at wake-up time (at least when waking up from
hibernation).
Add the appropriate call to the resume handler in order to sync the
SW_TABLET_MODE switch state with the hardware state.
Fixes: dda3ec0aa6 ("platform/x86: thinkpad_acpi: Implement tablet mode using GMMS method")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210269
Signed-off-by: Benjamin Berg <bberg@redhat.com>
Acked-by: Henrique de Moraes Holschuh <hnh@hmh.eng.br>
Link: https://lore.kernel.org/r/20201123132157.866303-1-benjamin@sipsolutions.net
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
The Thinkpad Yoga 11e 4th gen with the N3450 / Celeron CPU only has
one battery which is named BAT1 instead of the expected BAT0, add a
quirk for this. This fixes not being able to set the charging tresholds
on this model; and this alsoe fixes the following errors in dmesg:
ACPI: \_SB_.PCI0.LPCB.EC__.HKEY: BCTG evaluated but flagged as error
thinkpad_acpi: Error probing battery 2
battery: extension failed to load: ThinkPad Battery Extension
battery: extension unregistered: ThinkPad Battery Extension
Note that the added quirk is for the "R0K" BIOS versions which are
used on the Thinkpad Yoga 11e 4th gen's with a Celeron CPU, there
is a separate "R0L" BIOS for the i3/i5 based versions. This may also
need the same quirk, but if that really is necessary is unknown.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20201109103550.16265-1-hdegoede@redhat.com
The Yoga 11e series has 2 accelerometers described by a BOSC0200 ACPI node.
This setup relies on a Windows service which reads both accelerometers and
then calculates the angle between the 2 halves to determine laptop / tent /
tablet mode and then reports the calculated mode back to the EC by calling
special ACPI methods on the BOSC0200 node.
The bmc150 iio driver does not support this (it involves double
calculations requiring sqrt and arccos so this really needs to be done
in userspace), as a result of this on the Yoga 11e the thinkpad_acpi
code always reports SW_TABLET_MODE=0, starting with GNOME 3.38 reporting
SW_TABLET_MODE=0 causes GNOME to:
1. Not show the onscreen keyboard when a text-input field is focussed
with the touchscreen.
2. Disable accelerometer based auto display-rotation.
This makes sense when in laptop-mode but not when in tablet-mode. But
since for the Yoga 11e the thinkpad_acpi code always reports
SW_TABLET_MODE=0, GNOME does not know when the device is in tablet-mode.
Stop reporting the broken (always 0) SW_TABLET_MODE on Yoga 11e models
to fix this.
Note there are plans for userspace to support 360 degree hinges style
2-in-1s with 2 accelerometers and figure out the mode by itself, see:
https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/issues/216
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20201106140130.46820-1-hdegoede@redhat.com
Tested on my P1 gen3, works fine with `thinkfan`. Since thinkpad_acpi fan
control is off by default, it is safe to add 2nd fan control for brave
overclockers
Signed-off-by: Iakov 'Jake' Kirilenko <jake.kirilenko@gmail.com>
Link: https://lore.kernel.org/r/20201105152556.34073-1-jake.kirilenko@gmail.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Remove PSU EEPROM configuration for systems class equipped with
Mellanox chip Spectrum and ATOM CPU - system types MSN274x. Till now
all the systems from this class used few types of power units, all
equipped with EEPROM device with address space two bytes. Thus, all
these devices have been handled by EEPROM driver "24c02".
There is a new requirement is to support power unit replacement by "off
the shelf" device, matching electrical required parameters. Such device
can be equipped with different EEPROM type, which could be one byte
address space addressing or even could be not equipped with EEPROM.
In such case "24c02" will not work.
Fixes: ef08e14a3 ("platform/x86: mlx-platform: Add support for new msn274x system type")
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Link: https://lore.kernel.org/r/20201125101056.174708-3-vadimp@nvidia.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Remove PSU EEPROM configuration for systems class equipped with
Mellanox chip Spectrum and Celeron CPU - system types MSN2700, MSN2100.
Till now all the systems from this class used few types of power units,
all equipped with EEPROM device with address space two bytes. Thus, all
these devices have been handled by EEPROM driver "24c02".
There is a new requirement is to support power unit replacement by "off
the shelf" device, matching electrical required parameters. Such device
can be equipped with different EEPROM type, which could be one byte
address space addressing or even could be not equipped with EEPROM.
In such case "24c02" will not work.
Fixes: c6acad68e ("platform/mellanox: mlxreg-hotplug: Modify to use a regmap interface")
Fixes: ba814fdd0 ("platform/x86: mlx-platform: Use defines for bus assignment")
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Link: https://lore.kernel.org/r/20201125101056.174708-2-vadimp@nvidia.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Add the uv_sysfs driver to construct a read-only sysfs interface at
/sys/firmware/sgi_uv/ to expose information gathered from UV BIOS. This
information includes:
* UV Hub descriptions, including physical location
* Cabling layout between hubs on the fabric
* PCI topology, including physical location of PCI cards
Together, the information provides a robust physical description of a UV
system, useful for correlating to performance data or performing remote
support.
Signed-off-by: Justin Ernst <justin.ernst@hpe.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Steve Wahl <steve.wahl@hpe.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lkml.kernel.org/r/20201125175444.279074-4-justin.ernst@hpe.com
Add support to thinkpad_acpi for returning the status of the palm
sensor.
This patch builds on the work done previously for the input device
implementation (which was not needed). Both lap and palm sensor are using
sysfs and they are combined into the proxsensor block.
Note: On some platforms, because of an issue in the HW implementation,
the palm sensor presence may be incorrectly advertised as always
enabled even if a palm sensor is not present. The palm sensor is
intended for WWAN transmission power control and should be available
and correct on all WWAN enabled systems. It is not recommended to use
this interface for other use cases.
Signed-off-by: Mark Pearson <markpearson@lenovo.com>
Link: https://lore.kernel.org/r/20201124181154.547518-1-markpearson@lenovo.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
When user presses Fn-F5, the driver automatically changes throttle
thermal policy (or fan boost mode, depending on laptop model).
It would be convenient for userspace software to be able to poll on
corresponding sysfs variable. For example, to show a notification about
mode change.
Note that there is currently no way to handle Fn-F5 from userspace
directly, driver does not pass it.
Signed-off-by: Vasiliy Kupriakov <rublag-ns@yandex.ru>
Link: https://lore.kernel.org/r/20200828214932.20866-2-rublag-ns@yandex.ru
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
The Pavilion 13 x360 PC has a chassis-type which does not indicate it is
a convertible, while it is actually a convertible. Add it to the
dmi_switches_allow_list.
Signed-off-by: Max Verevkin <me@maxverevkin.tk>
Link: https://lore.kernel.org/r/20201124131652.11165-1-me@maxverevkin.tk
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
The lid state may change while the machine is suspended. As such, we may
need to re-check the state at wake-up time (at least when waking up from
hibernation).
Add the appropriate call to the resume handler in order to sync the
SW_TABLET_MODE switch state with the hardware state.
Fixes: dda3ec0aa6 ("platform/x86: thinkpad_acpi: Implement tablet mode using GMMS method")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210269
Signed-off-by: Benjamin Berg <bberg@redhat.com>
Acked-by: Henrique de Moraes Holschuh <hnh@hmh.eng.br>
Link: https://lore.kernel.org/r/20201123132157.866303-1-benjamin@sipsolutions.net
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
The commit 78429e55e4 ("platform/x86: toshiba_acpi: Clean up
variable declaration") cleans up variable declaration in
video_proc_write(). Seems it does the variable assignment in the
wrong place, this results in dead code and changes the source code
logic. Fix it by doing the assignment at the beginning of the funciton.
Fixes: 78429e55e4 ("platform/x86: toshiba_acpi: Clean up variable declaration")
Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
Link: https://lore.kernel.org/r/1606024177-16481-1-git-send-email-kaixuxia@tencent.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
The "ns->attr_grp" pointer can be NULL so this error handling code needs
to check for that to avoid an Oops.
Fixes: e2729113ce ("platform/x86: Intel PMT class driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: David E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20201117072251.GC1111239@mwanda
Signed-off-by: Hans de Goede <hdegoede@redhat.com>