Linus Torvalds
d9b2ba6791
Merge tag 'platform-drivers-x86-v5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
...
Pull x86 platform driver fixes from Hans de Goede:
- thinkpad_acpi/ideapad-laptop: mem-leak and platform-profile fixes
- panasonic-laptop: missing hotkey presses regression fix
- some hardware-id additions
- some other small fixes
* tag 'platform-drivers-x86-v5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
platform/x86: hp-wmi: Ignore Sanitization Mode event
platform/x86: thinkpad_acpi: do not use PSC mode on Intel platforms
platform/x86: thinkpad-acpi: profile capabilities as integer
platform/x86: panasonic-laptop: filter out duplicate volume up/down/mute keypresses
platform/x86: panasonic-laptop: don't report duplicate brightness key-presses
platform/x86: panasonic-laptop: revert "Resolve hotkey double trigger bug"
platform/x86: panasonic-laptop: sort includes alphabetically
platform/x86: panasonic-laptop: de-obfuscate button codes
ACPI: video: Change how we determine if brightness key-presses are handled
platform/x86: ideapad-laptop: Add Ideapad 5 15ITL05 to ideapad_dytc_v4_allow_table[]
platform/x86: ideapad-laptop: Add allow_v4_dytc module parameter
platform/x86: thinkpad_acpi: Fix a memory leak of EFCH MMIO resource
platform/mellanox: nvsw-sn2201: fix error code in nvsw_sn2201_create_static_devices()
platform/x86: intel/pmc: Add Alder Lake N support to PMC core driver
2022-06-29 09:32:06 -07:00
Kai-Heng Feng
9ab762a84b
platform/x86: hp-wmi: Ignore Sanitization Mode event
...
After system resume the hp-wmi driver may complain:
[ 702.620180] hp_wmi: Unknown event_id - 23 - 0x0
According to HP it means 'Sanitization Mode' and it's harmless to just
ignore the event.
Cc: Jorge Lopez <jorge.lopez2@hp.com >
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com >
Link: https://lore.kernel.org/r/20220628123726.250062-1-kai.heng.feng@canonical.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-28 22:20:07 +02:00
Mark Pearson
bce6243f76
platform/x86: thinkpad_acpi: do not use PSC mode on Intel platforms
...
PSC platform profile mode is only supported on Linux for AMD platforms.
Some older Intel platforms (e.g T490) are advertising it's capability
as Windows uses it - but on Linux we should only be using MMC profile
for Intel systems.
Add a check to prevent it being enabled incorrectly.
Signed-off-by: Mark Pearson <markpearson@lenovo.com >
Link: https://lore.kernel.org/r/20220627181449.3537-1-markpearson@lenovo.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-28 22:20:04 +02:00
Mark Pearson
42504af775
platform/x86: thinkpad-acpi: profile capabilities as integer
...
Currently the active mode (PSC/MMC) is stored in an enum and queried
throughout the driver.
Other driver changes will enumerate additional submodes that are relevant
to be tracked, so instead track PSC/MMC in a single integer variable.
Co-developed-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Mark Pearson <markpearson@lenovo.com >
Link: https://lore.kernel.org/r/20220603170212.164963-1-markpearson@lenovo.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-28 22:20:00 +02:00
Kai-Heng Feng
2ac96c800d
platform/x86: hp-wmi: Ignore Sanitization Mode event
...
After system resume the hp-wmi driver may complain:
[ 702.620180] hp_wmi: Unknown event_id - 23 - 0x0
According to HP it means 'Sanitization Mode' and it's harmless to just
ignore the event.
Cc: Jorge Lopez <jorge.lopez2@hp.com >
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com >
Link: https://lore.kernel.org/r/20220628123726.250062-1-kai.heng.feng@canonical.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-28 22:19:14 +02:00
Mark Pearson
57a3487eef
platform/x86: thinkpad_acpi: do not use PSC mode on Intel platforms
...
PSC platform profile mode is only supported on Linux for AMD platforms.
Some older Intel platforms (e.g T490) are advertising it's capability
as Windows uses it - but on Linux we should only be using MMC profile
for Intel systems.
Add a check to prevent it being enabled incorrectly.
Signed-off-by: Mark Pearson <markpearson@lenovo.com >
Link: https://lore.kernel.org/r/20220627181449.3537-1-markpearson@lenovo.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-28 22:19:04 +02:00
Hans de Goede
aacb455dfe
platform/x86: panasonic-laptop: filter out duplicate volume up/down/mute keypresses
...
On some Panasonic models the volume up/down/mute keypresses get
reported both through the Panasonic ACPI HKEY interface as well as
through the atkbd device.
Filter out the atkbd scan-codes for these to avoid reporting presses
twice.
Note normally we would leave the filtering of these to userspace by mapping
the scan-codes to KEY_UNKNOWN through /lib/udev/hwdb.d/60-keyboard.hwdb.
However in this case that would cause regressions since we were filtering
the Panasonic ACPI HKEY events before, so filter these in the kernel.
Fixes: ed83c91718 ("platform/x86: panasonic-laptop: Resolve hotkey double trigger bug")
Reported-and-tested-by: Stefan Seyfried <seife+kernel@b1-systems.com >
Reported-and-tested-by: Kenneth Chan <kenneth.t.chan@gmail.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20220624112340.10130-7-hdegoede@redhat.com
2022-06-28 21:54:50 +02:00
Hans de Goede
1f2c9de83a
platform/x86: panasonic-laptop: don't report duplicate brightness key-presses
...
The brightness key-presses might also get reported by the ACPI video bus,
check for this and in this case don't report the presses to avoid reporting
2 presses for a single key-press.
Fixes: ed83c91718 ("platform/x86: panasonic-laptop: Resolve hotkey double trigger bug")
Reported-and-tested-by: Stefan Seyfried <seife+kernel@b1-systems.com >
Reported-and-tested-by: Kenneth Chan <kenneth.t.chan@gmail.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20220624112340.10130-6-hdegoede@redhat.com
2022-06-28 21:54:44 +02:00
Hans de Goede
83a5ddc3dc
platform/x86: panasonic-laptop: revert "Resolve hotkey double trigger bug"
...
In hindsight blindly throwing away most of the key-press events is not
a good idea. So revert commit ed83c91718 ("platform/x86:
panasonic-laptop: Resolve hotkey double trigger bug").
Fixes: ed83c91718 ("platform/x86: panasonic-laptop: Resolve hotkey double trigger bug")
Reported-and-tested-by: Stefan Seyfried <seife+kernel@b1-systems.com >
Reported-and-tested-by: Kenneth Chan <kenneth.t.chan@gmail.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20220624112340.10130-5-hdegoede@redhat.com
2022-06-28 21:53:47 +02:00
Hans de Goede
fe4326c8d1
platform/x86: panasonic-laptop: sort includes alphabetically
...
Sort includes alphabetically, small cleanup patch in preparation of
further changes.
Fixes: ed83c91718 ("platform/x86: panasonic-laptop: Resolve hotkey double trigger bug")
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20220624112340.10130-4-hdegoede@redhat.com
2022-06-28 21:53:39 +02:00
Stefan Seyfried
65a3e6c8d3
platform/x86: panasonic-laptop: de-obfuscate button codes
...
In the definition of panasonic_keymap[] the key codes are given in
decimal, later checks are done with hexadecimal values, which does
not help in understanding the code.
Additionally use two helper variables to shorten the code and make
the logic more obvious.
Fixes: ed83c91718 ("platform/x86: panasonic-laptop: Resolve hotkey double trigger bug")
Signed-off-by: Stefan Seyfried <seife+kernel@b1-systems.com >
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20220624112340.10130-3-hdegoede@redhat.com
2022-06-28 21:53:35 +02:00
Hans de Goede
4da4742236
platform/x86: panasonic-laptop: Use acpi_video_get_backlight_type()
...
Use acpi_video_get_backlight_type() to determine if we should register
the panasonic specific backlight interface. To avoid registering this
on systems where the ACPI or GPU native backlight control methods
should be used instead.
Tested-by: Stefan Seyfried <seife+kernel@b1-systems.com >
Tested-by: Kenneth Chan <kenneth.t.chan@gmail.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20220624112340.10130-8-hdegoede@redhat.com
2022-06-28 21:45:45 +02:00
Hans de Goede
5e24e1eca1
platform/x86: panasonic-laptop: filter out duplicate volume up/down/mute keypresses
...
On some Panasonic models the volume up/down/mute keypresses get
reported both through the Panasonic ACPI HKEY interface as well as
through the atkbd device.
Filter out the atkbd scan-codes for these to avoid reporting presses
twice.
Note normally we would leave the filtering of these to userspace by mapping
the scan-codes to KEY_UNKNOWN through /lib/udev/hwdb.d/60-keyboard.hwdb.
However in this case that would cause regressions since we were filtering
the Panasonic ACPI HKEY events before, so filter these in the kernel.
Fixes: ed83c91718 ("platform/x86: panasonic-laptop: Resolve hotkey double trigger bug")
Reported-and-tested-by: Stefan Seyfried <seife+kernel@b1-systems.com >
Reported-and-tested-by: Kenneth Chan <kenneth.t.chan@gmail.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20220624112340.10130-7-hdegoede@redhat.com
2022-06-28 21:45:40 +02:00
Hans de Goede
027f88453d
platform/x86: panasonic-laptop: don't report duplicate brightness key-presses
...
The brightness key-presses might also get reported by the ACPI video bus,
check for this and in this case don't report the presses to avoid reporting
2 presses for a single key-press.
Fixes: ed83c91718 ("platform/x86: panasonic-laptop: Resolve hotkey double trigger bug")
Reported-and-tested-by: Stefan Seyfried <seife+kernel@b1-systems.com >
Reported-and-tested-by: Kenneth Chan <kenneth.t.chan@gmail.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20220624112340.10130-6-hdegoede@redhat.com
2022-06-28 21:45:38 +02:00
Hans de Goede
cb1f7d4973
platform/x86: panasonic-laptop: revert "Resolve hotkey double trigger bug"
...
In hindsight blindly throwing away most of the key-press events is not
a good idea. So revert commit ed83c91718 ("platform/x86:
panasonic-laptop: Resolve hotkey double trigger bug").
Fixes: ed83c91718 ("platform/x86: panasonic-laptop: Resolve hotkey double trigger bug")
Reported-and-tested-by: Stefan Seyfried <seife+kernel@b1-systems.com >
Reported-and-tested-by: Kenneth Chan <kenneth.t.chan@gmail.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20220624112340.10130-5-hdegoede@redhat.com
2022-06-28 21:45:36 +02:00
Hans de Goede
9cfebda442
platform/x86: panasonic-laptop: sort includes alphabetically
...
Sort includes alphabetically, small cleanup patch in preparation of
further changes.
Fixes: ed83c91718 ("platform/x86: panasonic-laptop: Resolve hotkey double trigger bug")
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20220624112340.10130-4-hdegoede@redhat.com
2022-06-28 21:45:33 +02:00
Stefan Seyfried
758babb511
platform/x86: panasonic-laptop: de-obfuscate button codes
...
In the definition of panasonic_keymap[] the key codes are given in
decimal, later checks are done with hexadecimal values, which does
not help in understanding the code.
Additionally use two helper variables to shorten the code and make
the logic more obvious.
Fixes: ed83c91718 ("platform/x86: panasonic-laptop: Resolve hotkey double trigger bug")
Signed-off-by: Stefan Seyfried <seife+kernel@b1-systems.com >
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20220624112340.10130-3-hdegoede@redhat.com
2022-06-28 21:45:26 +02:00
Hans de Goede
8853e8ce9b
platform/x86: ideapad-laptop: Add Ideapad 5 15ITL05 to ideapad_dytc_v4_allow_table[]
...
The Ideapad 5 15ITL05 uses DYTC version 4 for platform-profile
control. This has been tested successfully with the ideapad-laptop
DYTC version 5 code; Add the Ideapad 5 15ITL05 to the
ideapad_dytc_v4_allow_table[].
Fixes: 599482c58e ("platform/x86: ideapad-laptop: Add platform support for Ideapad 5 Pro 16ACH6-82L5")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=213297
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Link: https://lore.kernel.org/r/20220627130850.313537-1-hdegoede@redhat.com
2022-06-27 16:20:27 +02:00
Hans de Goede
a27a1e35f5
platform/x86: ideapad-laptop: Add allow_v4_dytc module parameter
...
Add an allow_v4_dytc module parameter to allow users to easily test if
DYTC version 4 platform-profiles work on their laptop.
Fixes: 599482c58e ("platform/x86: ideapad-laptop: Add platform support for Ideapad 5 Pro 16ACH6-82L5")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=213297
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Link: https://lore.kernel.org/r/20220623115914.103001-1-hdegoede@redhat.com
2022-06-27 16:20:11 +02:00
Hans de Goede
7dbd3af50a
platform/x86: ideapad-laptop: Add Ideapad 5 15ITL05 to ideapad_dytc_v4_allow_table[]
...
The Ideapad 5 15ITL05 uses DYTC version 4 for platform-profile
control. This has been tested successfully with the ideapad-laptop
DYTC version 5 code; Add the Ideapad 5 15ITL05 to the
ideapad_dytc_v4_allow_table[].
Fixes: 599482c58e ("platform/x86: ideapad-laptop: Add platform support for Ideapad 5 Pro 16ACH6-82L5")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=213297
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Link: https://lore.kernel.org/r/20220627130850.313537-1-hdegoede@redhat.com
2022-06-27 16:19:33 +02:00
Hans de Goede
1ccd590662
platform/x86: ideapad-laptop: Add allow_v4_dytc module parameter
...
Add an allow_v4_dytc module parameter to allow users to easily test if
DYTC version 4 platform-profiles work on their laptop.
Fixes: 599482c58e ("platform/x86: ideapad-laptop: Add platform support for Ideapad 5 Pro 16ACH6-82L5")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=213297
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Link: https://lore.kernel.org/r/20220623115914.103001-1-hdegoede@redhat.com
2022-06-27 16:18:16 +02:00
Jean Delvare
d2f33f0c3a
platform/x86: thinkpad_acpi: Fix a memory leak of EFCH MMIO resource
...
Unlike release_mem_region(), a call to release_resource() does not
free the resource, so it has to be freed explicitly to avoid a memory
leak.
Signed-off-by: Jean Delvare <jdelvare@suse.de >
Fixes: 455cd867b8 ("platform/x86: thinkpad_acpi: Add a s2idle resume quirk for a number of laptops")
Cc: Mario Limonciello <mario.limonciello@amd.com >
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br >
Cc: Hans de Goede <hdegoede@redhat.com >
Cc: Mark Gross <markgross@kernel.org >
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com >
Link: https://lore.kernel.org/r/20220621155511.5b266395@endymion.delvare
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-27 09:38:56 +02:00
Dan Carpenter
79e90ca02d
platform/mellanox: nvsw-sn2201: fix error code in nvsw_sn2201_create_static_devices()
...
This should return PTR_ERR() instead of IS_ERR(). Also "dev->client"
has been set to NULL by this point so it returns 0/success so preserve
the error code earlier.
Fixes: 662f24826f ("platform/mellanox: Add support for new SN2201 system")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Acked-by: Michael Shych <michaelsh@nvidia.com >
Link: https://lore.kernel.org/r/YqmUGwmPK7cPolk/@kili
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-27 09:38:56 +02:00
Gayatri Kammela
d63eae6747
platform/x86: intel/pmc: Add Alder Lake N support to PMC core driver
...
Add Alder Lake N (ADL-N) to the list of the platforms that Intel's
PMC core driver supports. Alder Lake N reuses all the TigerLake PCH IPs.
Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com >
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Cc: David E. Box <david.e.box@linux.intel.com >
Signed-off-by: Gayatri Kammela <gayatri.kammela@linux.intel.com >
Reviewed-by: Rajneesh Bhardwaj <irenic.rajneesh@gmail.com >
Link: https://lore.kernel.org/r/20220615002751.3371730-1-gayatri.kammela@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-27 09:38:31 +02:00
Jean Delvare
f0da93cbaf
platform/x86: thinkpad_acpi: Fix a memory leak of EFCH MMIO resource
...
Unlike release_mem_region(), a call to release_resource() does not
free the resource, so it has to be freed explicitly to avoid a memory
leak.
Signed-off-by: Jean Delvare <jdelvare@suse.de >
Fixes: 455cd867b8 ("platform/x86: thinkpad_acpi: Add a s2idle resume quirk for a number of laptops")
Cc: Mario Limonciello <mario.limonciello@amd.com >
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br >
Cc: Hans de Goede <hdegoede@redhat.com >
Cc: Mark Gross <markgross@kernel.org >
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com >
Link: https://lore.kernel.org/r/20220621155511.5b266395@endymion.delvare
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-27 09:37:49 +02:00
Hans de Goede
63a00f04bf
platform/x86/dell: Kconfig: Remove unnecessary "depends on X86_PLATFORM_DEVICES"
...
platform/x86/dell/Kconfig is only sourced if X86_PLATFORM_DEVICES is set,
so it does not need to depend on it.
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Link: https://lore.kernel.org/r/20220620145628.5882-3-hdegoede@redhat.com
2022-06-27 09:37:49 +02:00
Hans de Goede
44fc1060a6
platform/x86: Kconfig: Remove unnecessary "if X86"
...
drivers/platform/x86/Kconfig is wrapped in one big
if X86_PLATFORM_DEVICES .. endif and X86_PLATFORM_DEVICES already
has a "depends on X86" so the "if X86" in drivers/platform/Kconfig
is not necessary and except for MIPS none of the other includes
there has such an if. So let's remove it.
While at it also move the x86/Kconfig include to the end of the file
for alphabetical sorting.
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Link: https://lore.kernel.org/r/20220620145628.5882-2-hdegoede@redhat.com
2022-06-27 09:37:49 +02:00
Hans de Goede
349da8ee72
platform/x86: acer_wmi: Cleanup Kconfig selects
...
ACER_WMI already depends on ACPI_WMI which depends on ACPI
so the "depends on ACPI" is unnecessary.
And since ACER_WMI already depends on ACPI adding an "if ACPI"
to the ACPI_VIDEO select is nonsense.
While at it also group all the selects together.
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Link: https://lore.kernel.org/r/20220620145628.5882-1-hdegoede@redhat.com
2022-06-27 09:37:49 +02:00
Andy Shevchenko
664607f545
platform/x86: thinkpad_acpi: Replace custom str_on_off() etc
...
Replace enabled(), onoff() and other similar places by str_*() helpers.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20220616224951.66660-2-andriy.shevchenko@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-27 09:37:49 +02:00
Andy Shevchenko
3c40a71c03
platform/x86: thinkpad_acpi: Sort headers for better maintenance
...
It's quite hard to understand in that zillions of headers that are included
if any specific one is already listed. Sort headers for better maintenance.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20220616224951.66660-1-andriy.shevchenko@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-27 09:37:49 +02:00
Dan Carpenter
d7e64c6d9c
platform/mellanox: nvsw-sn2201: fix error code in nvsw_sn2201_create_static_devices()
...
This should return PTR_ERR() instead of IS_ERR(). Also "dev->client"
has been set to NULL by this point so it returns 0/success so preserve
the error code earlier.
Fixes: 662f24826f ("platform/mellanox: Add support for new SN2201 system")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Acked-by: Michael Shych <michaelsh@nvidia.com >
Link: https://lore.kernel.org/r/YqmUGwmPK7cPolk/@kili
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-27 09:37:49 +02:00
Gayatri Kammela
1024a6e0c0
platform/x86: intel/pmc: Add Alder Lake N support to PMC core driver
...
Add Alder Lake N (ADL-N) to the list of the platforms that Intel's
PMC core driver supports. Alder Lake N reuses all the TigerLake PCH IPs.
Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com >
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Cc: David E. Box <david.e.box@linux.intel.com >
Signed-off-by: Gayatri Kammela <gayatri.kammela@linux.intel.com >
Reviewed-by: Rajneesh Bhardwaj <irenic.rajneesh@gmail.com >
Link: https://lore.kernel.org/r/20220615002751.3371730-1-gayatri.kammela@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-27 09:37:24 +02:00
Jiang Jian
3de7203115
platform/chrome: wilco_ec: event: Fix typo in comment
...
Drop the redundant word 'the'.
Signed-off-by: Jiang Jian <jiangjian@cdjrlc.com >
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org >
Link: https://lore.kernel.org/r/20220622061442.18242-1-jiangjian@cdjrlc.com
2022-06-24 04:01:13 +00:00
Maximilian Luz
e244a46a52
platform/surface: aggregator: Reserve more event- and target-categories
...
With the introduction of the Surface Laptop Studio, more event- and
target categories have been added. Therefore, increase the number of
reserved events and extend the enum of know target categories to
accommodate this.
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com >
Link: https://lore.kernel.org/r/20220614194117.4118897-1-luzmaximilian@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-22 12:06:28 +02:00
Tetsuo Handa
31a1e4a5c1
platform/surface: avoid flush_scheduled_work() usage
...
Use local wq in order to avoid flush_scheduled_work() usage.
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp >
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com >
Tested-by: Maximilian Luz <luzmaximilian@gmail.com >
Link: https://lore.kernel.org/r/63ec2d45-c67c-1134-f6d3-490c8ba67a01@I-love.SAKURA.ne.jp
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-22 12:03:52 +02:00
Shyam Sundar S K
ef233eafe5
platform/x86: Move AMD platform drivers to separate directory
...
Currently, AMD supported platform drivers are grouped under generic "x86"
folder structure. Move the current drivers (amd-pmc and amd_hsmp) to a
separate directory. This would also mean the newer driver submissions to
pdx86 subsystem in the future will also land in AMD specific directory.
Reviewed-by: Naveen Krishna Chatradhi <NaveenKrishna.Chatradhi@amd.com >
Tested-by: Suma Hegde <suma.hegde@amd.com >
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com >
Link: https://lore.kernel.org/r/20220608193212.2827257-1-Shyam-sundar.S-k@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-22 11:57:55 +02:00
Stephen Kitt
5b54b4d4b4
platform/x86: thinkpad_acpi: Use backlight helper
...
Instead of retrieving the backlight brightness in struct
backlight_properties manually, and then checking whether the backlight
should be on at all, use backlight_get_brightness() which does all
this and insulates this from future changes.
Signed-off-by: Stephen Kitt <steve@sk2.org >
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br >
Cc: Hans de Goede <hdegoede@redhat.com >
Cc: Mark Gross <markgross@kernel.org >
Cc: ibm-acpi-devel@lists.sourceforge.net
Cc: platform-driver-x86@vger.kernel.org
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org >
Link: https://lore.kernel.org/r/20220607184635.1127913-5-steve@sk2.org
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-22 11:54:06 +02:00
Stephen Kitt
537c7933c8
platform/x86: compal-laptop: Use backlight helper
...
Instead of manually checking the power state in struct
backlight_properties, use backlight_is_blank().
Signed-off-by: Stephen Kitt <steve@sk2.org >
Cc: Cezary Jackiewicz <cezary.jackiewicz@gmail.com >
Cc: Hans de Goede <hdegoede@redhat.com >
Cc: Mark Gross <markgross@kernel.org >
Cc: platform-driver-x86@vger.kernel.org
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org >
Link: https://lore.kernel.org/r/20220607184635.1127913-4-steve@sk2.org
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-22 11:53:56 +02:00
Stephen Kitt
3096ab5b90
platform/x86: apple-gmux: Use backlight helper
...
Instead of retrieving the backlight brightness in struct
backlight_properties manually, and then checking whether the backlight
should be on at all, use backlight_get_brightness() which does all
this and insulates this from future changes.
Signed-off-by: Stephen Kitt <steve@sk2.org >
Cc: Hans de Goede <hdegoede@redhat.com >
Cc: Mark Gross <markgross@kernel.org >
Cc: platform-driver-x86@vger.kernel.org
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org >
Link: https://lore.kernel.org/r/20220607184635.1127913-3-steve@sk2.org
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-22 11:53:45 +02:00
Stephen Kitt
441ffc52d6
platform/x86: acer-wmi: Use backlight helper
...
Instead of retrieving the backlight brightness in struct
backlight_properties manually, and then checking whether the backlight
should be on at all, use backlight_get_brightness() which does all
this and insulates this from future changes.
Signed-off-by: Stephen Kitt <steve@sk2.org >
Cc: "Lee, Chun-Yi" <jlee@suse.com >
Cc: Hans de Goede <hdegoede@redhat.com >
Cc: Mark Gross <markgross@kernel.org >
Cc: platform-driver-x86@vger.kernel.org
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org >
Link: https://lore.kernel.org/r/20220607184635.1127913-2-steve@sk2.org
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-22 11:53:17 +02:00
Mark Pearson
755b249250
platform/x86: thinkpad-acpi: Enable AMT by default on supported systems
...
By default the ACPI platform profile starts in balanced mode.
On supported systems AMT is supposed to be enabled in balanced
mode by default.
When checking the capabilities during initialization, set up AMT to be
enabled if it's supported.
Co-developed-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Mark Pearson <markpearson@lenovo.com >
Link: https://lore.kernel.org/r/20220603170212.164963-4-markpearson@lenovo.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-22 11:49:48 +02:00
Mark Pearson
867eb71318
platform/x86: thinkpad-acpi: Add support for hotkey 0x131a
...
On some AMD platforms if you press FN+T it will toggle whether automatic
mode transitions are active.
Recognize this keycode and use it to toggle AMT.
Co-developed-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Mark Pearson <markpearson@lenovo.com >
Link: https://lore.kernel.org/r/20220603170212.164963-3-markpearson@lenovo.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-22 11:49:46 +02:00
Mark Pearson
46dcbc61b7
platform/x86: thinkpad-acpi: Add support for automatic mode transitions
...
Some AMD Thinkpads support automatic mode transitions. The actual
transition logic doesn't live in the `thinkpad_acpi` driver. The events
to activate this logic come from this driver though.
Populate these events when switching PSC power modes.
Co-developed-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Mark Pearson <markpearson@lenovo.com >
Link: https://lore.kernel.org/r/20220603170212.164963-2-markpearson@lenovo.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-22 11:49:40 +02:00
Mark Pearson
6fe391dd5d
platform/x86: thinkpad-acpi: profile capabilities as integer
...
Currently the active mode (PSC/MMC) is stored in an enum and queried
throughout the driver.
Other driver changes will enumerate additional submodes that are relevant
to be tracked, so instead track PSC/MMC in a single integer variable.
Co-developed-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Mark Pearson <markpearson@lenovo.com >
Link: https://lore.kernel.org/r/20220603170212.164963-1-markpearson@lenovo.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-22 11:49:27 +02:00
Rafael J. Wysocki
0b1bd1e356
platform/x86/thinkpad_acpi: Use acpi_dev_for_each_child()
...
Instead of walking the list of children of an ACPI device directly,
use acpi_dev_for_each_child() to carry out an action for all of
the given ACPI device's children.
This will help to eliminate the children list head from struct
acpi_device as it is redundant and it is used in questionable ways
in some places (in particular, locking is needed for walking the
list pointed to it safely, but it is often missing).
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
2022-06-21 14:34:52 +02:00
Stephen Boyd
74bb746407
platform/chrome: cros_ec: Always expose last resume result
...
The last resume result exposing logic in cros_ec_sleep_event()
incorrectly requires S0ix support, which doesn't work on ARM based
systems where S0ix doesn't exist. That's because cros_ec_sleep_event()
only reports the last resume result when the EC indicates the last sleep
event was an S0ix resume. On ARM systems, the last sleep event is always
S3 resume, but the EC can still detect sleep hang events in case some
other part of the AP is blocking sleep.
Always expose the last resume result if the EC supports it so that this
works on all devices regardless of S0ix support. This fixes sleep hang
detection on ARM based chromebooks like Trogdor.
Cc: Rajat Jain <rajatja@chromium.org >
Cc: Matthias Kaehlcke <mka@chromium.org >
Cc: Hsin-Yi Wang <hsinyi@chromium.org >
Cc: Tzung-Bi Shih <tzungbi@kernel.org >
Reviewed-by: Guenter Roeck <groeck@chromium.org >
Reviewed-by: Evan Green <evgreen@chromium.org >
Fixes: 7235560ac7 ("platform/chrome: Add support for v1 of host sleep event")
Signed-off-by: Stephen Boyd <swboyd@chromium.org >
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org >
Link: https://lore.kernel.org/r/20220614075726.2729987-1-swboyd@chromium.org
2022-06-14 08:18:18 +00:00
Colin Ian King
203b2aff47
platform/chrome: cros_ec_proto: Fix spelling mistake "unknwon" -> "unknown"
...
There is a spelling mistake in a dev_dbg message. Fix it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com >
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org >
Link: https://lore.kernel.org/r/20220614064909.47804-1-colin.i.king@gmail.com
2022-06-14 07:01:24 +00:00
Maximilian Luz
7518eefeb7
platform/surface: aggregator_registry: Add support for keyboard cover on Surface Pro 8
...
Add support for the detachable keyboard cover on the Surface Pro 8.
The keyboard cover on the Surface Pro 8 is, unlike the keyboard covers
of earlier Surface Pro generations, handled via the Surface System
Aggregator Module (SSAM). The keyboard and touchpad (as well as other
HID input devices) of this cover are standard SSAM HID client devices
(just like keyboard and touchpad on e.g. the Surface Laptop 3 and 4),
however, some care needs to be taken as they can be physically detached
(similarly to the Surface Book 3). Specifically, the respective SSAM
client devices need to be removed when the keyboard cover has been
detached and (re-)initialized when the keyboard cover has been
(re-)attached.
On the Surface Pro 8, detachment of the keyboard cover (and by extension
its devices) is managed via the KIP subsystem. Therefore, said devices
need to be registered under the KIP device hub, which in turn will
remove and re-create/re-initialize those devices as needed.
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com >
Link: https://lore.kernel.org/r/20220527023447.2460025-13-luzmaximilian@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-13 17:25:09 +02:00
Maximilian Luz
d420185489
platform/surface: aggregator_registry: Add KIP device hub
...
Add a Surface System Aggregator Module (SSAM) client device hub for
hot-removable devices managed via the KIP subsystem.
The KIP subsystem (full name unknown, abbreviation has been obtained
through reverse engineering) is a subsystem that manages hot-removable
SSAM client devices. Specifically, it manages HID input devices
contained in the detachable keyboard cover of the Surface Pro 8 and
Surface Pro X.
The KIP subsystem handles a single group of devices (e.g. all devices
contained in the keyboard cover) and cannot handle devices individually.
Thus we model it as a client device hub, which (hot-)removes all devices
contained under it once removal of the hub (e.g. keyboard cover) has
been detected and (re-)adds all devices once the physical hub device has
been (re-)attached. To do this, use the previously generified SSAM
subsystem hub framework.
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com >
Link: https://lore.kernel.org/r/20220527023447.2460025-12-luzmaximilian@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-13 17:25:08 +02:00
Maximilian Luz
58a4d884b5
platform/surface: aggregator_registry: Change device ID for base hub
...
Use the target category of the (base) hub as instance id in the
(virtual) hub device UID. This makes association of the hub with the
respective subsystem easier.
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com >
Link: https://lore.kernel.org/r/20220527023447.2460025-11-luzmaximilian@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2022-06-13 17:25:08 +02:00