Pengyu Luo
defcf2fb30
dt-bindings: platform: Add Huawei Matebook E Go EC
...
Add binding for the EC found in the Huawei Matebook E Go and
Huawei Matebook E Go LTE 2-in-1 tablets, the former one is a QS sc8280xp
based tablet, the latter one is a QS sc8180x based tablet.
This series has a codename, gaokun. More information about gaokun, please
check https://bugzilla.kernel.org/show_bug.cgi?id=219645
Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20250214180656.28599-2-mitltlatltl@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-03-03 10:55:30 +02:00
Vadim Pasternak
5ad6d62c9b
MAINTAINERS: Add documentation reference for Mellanox platform
...
Add reference for Documentation/ABI/stable/sysfs-driver-mlxreg-io
under "MELLANOX HARDWARE PLATFORM SUPPORT".
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com >
Reported-by: kernel test robot <lkp@intel.com >
Closes: https://lore.kernel.org/oe-kbuild-all/202502032336.lauIV68J-lkp@intel.com/
Link: https://lore.kernel.org/r/20250210203451.29712-1-vadimp@nvidia.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-24 17:18:54 +02:00
Kurt Borja
677fb7b069
platform/x86: intel: Use *-y instead of *-objs in Makefile
...
The `objs` suffix is reserved for user-space tools. Use the `y` suffix
instead, which is usually used for kernel drivers.
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Signed-off-by: Kurt Borja <kuurtb@gmail.com >
Reviewed-by: Jithu Joseph <jithu.joseph@intel.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20250218194113.26589-5-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-24 17:15:06 +02:00
Kurt Borja
f0ea699b18
platform/x86: hp: Use *-y instead of *-objs in Makefile
...
The `objs` suffix is reserved for user-space tools. Use the `y` suffix
instead, which is usually used for kernel drivers.
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Signed-off-by: Kurt Borja <kuurtb@gmail.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20250218194113.26589-4-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-24 17:15:04 +02:00
Kurt Borja
cfba129ad2
platform/x86: amd: Use *-y instead of *-objs in Makefiles
...
The `objs` suffix is reserved for user-space tools. Use the `y` suffix
instead, which is usually used for kernel drivers.
While at it, fix alignment in AMD PMC and PMF Makefiles.
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Signed-off-by: Kurt Borja <kuurtb@gmail.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20250218194113.26589-3-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-24 17:15:02 +02:00
Kurt Borja
363171c96a
platform/x86: dell: dell-wmi-sysman: Use *-y instead of *-objs in Makefile
...
The `objs` suffix is reserved for user-space tools. Use the `y` suffix
instead, which is usually used for kernel drivers.
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Signed-off-by: Kurt Borja <kuurtb@gmail.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20250218194113.26589-2-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-24 17:14:59 +02:00
Kurt Borja
43fc63a1e8
platform/x86: thinkpad_acpi: Move HWMON initialization to tpacpi_hwmon_pdriver's probe
...
Let the driver core manage the lifetime of the HWMON device, by
registering it inside tpacpi_hwmon_pdriver's probe and using
devm_hwmon_device_register_with_groups().
Signed-off-by: Kurt Borja <kuurtb@gmail.com >
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca >
Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca >
Link: https://lore.kernel.org/r/20250215000302.19753-3-kuurtb@gmail.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-24 13:49:20 +02:00
Kurt Borja
38b9ab80db
platform/x86: thinkpad_acpi: Move subdriver initialization to tpacpi_pdriver's probe.
...
It was reported that if subdrivers assigned devres resources inside
ibm_init_struct's .init callbacks, driver binding would fail with the
following error message:
platform thinkpad_acpi: Resources present before probing
Let the driver core manage the lifetimes of the subdrivers and children
devices, by initializing them inside tpacpi_driver's .probe callback.
This is appropriate because these subdrivers usually expose sysfs groups
and the driver core manages this automatically to avoid races.
One immediate benefit of this, is that we are now able to use devres
inside .init subdriver callbacks.
platform_create_bundle is specifically used because it makes the
driver's probe type synchronous and returns an ERR_PTR if attachment
failed.
Additionally, to make error handling simpler, allocate the input device
using devm_input_allocate_device().
Reported-by: Mark Pearson <mpearson-lenovo@squebb.ca >
Closes: https://lore.kernel.org/platform-driver-x86/20250208091438.5972-1-mpearson-lenovo@squebb.ca/#t
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca >
Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca >
Signed-off-by: Kurt Borja <kuurtb@gmail.com >
Link: https://lore.kernel.org/r/20250215000302.19753-2-kuurtb@gmail.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-24 13:49:18 +02:00
Xi Pardee
c5855d2022
platform/x86/intel/pmc: Remove unneeded extern keyword in header
...
Remove unneeded extern keyword in header file. Functions are
extern by default so extern keyword is not unnecessary for
function declaration.
Signed-off-by: Xi Pardee <xi.pardee@linux.intel.com >
Link: https://lore.kernel.org/r/20250214214416.10150-4-xi.pardee@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-24 13:35:11 +02:00
Xi Pardee
9eeeb2a7c7
platform/x86/intel/pmc: Remove unnecessary declarations in header
...
Remove unnecessary declarations in header file. Variable that are
used by only one .c file are removed from header file and changed
to be static in their corresponding .c file.
Signed-off-by: Xi Pardee <xi.pardee@linux.intel.com >
Link: https://lore.kernel.org/r/20250214214416.10150-3-xi.pardee@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-24 13:34:55 +02:00
Xi Pardee
d31feed799
platform/x86/intel/pmc: Add Panther Lake support to intel_pmc_core
...
Add Panther Lake support to intel_pmc_core driver
Signed-off-by: Rajvi Jingar <rajvi.jingar@linux.intel.com >
Signed-off-by: Xi Pardee <xi.pardee@linux.intel.com >
Link: https://lore.kernel.org/r/20250214214416.10150-2-xi.pardee@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-24 13:34:27 +02:00
Armin Wolf
8d5316c6c6
platform/x86: wmi: Update documentation regarding the GUID-based API
...
Warn WMI driver developers to not use GUID-based and non-GUID-based
functions for querying WMI data blocks and handling WMI events
simultaneously on the same device, as this will corrupt the WMI device
state and might thus lead to erratic behaviour.
Signed-off-by: Armin Wolf <W_Armin@gmx.de >
Link: https://lore.kernel.org/r/20250216193251.866125-9-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-24 13:30:58 +02:00
Armin Wolf
08c9f40290
platform/x86: wmi: Call WCxx methods when setting data blocks
...
After performing some tests with a custom SSDT table available at
https://github.com/Wer-Wolf/acpi-wmi-ssdt i found out that Windows
also enables data block collection even when the data block is
being set.
Emulate this behaviour to avoid confusing the ACPI firmware.
The bus-based API already implements this behaviour, so only the
legacy GUID-based API needs to be changed.
Signed-off-by: Armin Wolf <W_Armin@gmx.de >
Link: https://lore.kernel.org/r/20250216193251.866125-8-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-24 13:30:15 +02:00
Armin Wolf
656f0961d1
platform/x86: wmi: Rework WCxx/WExx ACPI method handling
...
The handling of the WExx ACPI methods used for enabling and disabling
WMI events has multiple flaws:
- the ACPI methods are called even when the WMI device has not been
marked as expensive.
- WExx ACPI methods might be called for inappropriate WMI devices.
- the error code AE_NOT_FOUND is treated as success.
The handling of the WCxx ACPI methods used for enabling and disabling
WMI data blocks is also flawed:
- WMI data blocks are enabled and disabled for every single "query"
operation. This is racy and inefficient.
Unify the handling of both ACPI methods by introducing a common
helper function for enabling and disabling WMI devices.
Also enable/disable WMI data blocks during probe/remove and shutdown
to match the handling of WMI events.
Legacy GUID-based functions still have to enable/disable the WMI
device manually and thus still suffer from a potential race condition.
Since those functions are deprecated and suffer from various other
flaws this issue is purposefully not fixed.
Signed-off-by: Armin Wolf <W_Armin@gmx.de >
Link: https://lore.kernel.org/r/20250216193251.866125-7-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-24 13:29:11 +02:00
Armin Wolf
b6b566908c
platform/x86: wmi: Use devres to disable the WMI device
...
Use devm_add_action_or_reset() to disable the WMI device instead of
manually calling wmi_method_enable() to prepare for future changes
inside the WMI data block handlign code.
The reason for this is that we have to make sure that all
devres-managed resources are released first because some might still
want to access the underlying WMI device.
Because devres-managed resources are not released during shutdown
we still have to manually disable the WMI device in this case.
Signed-off-by: Armin Wolf <W_Armin@gmx.de >
Link: https://lore.kernel.org/r/20250216193251.866125-6-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-24 13:19:19 +02:00
Armin Wolf
0fcc3162e3
platform/x86: hp-bioscfg: Use wmi_instance_count()
...
The WMI core already knows the instance count of a WMI guid.
Use this information instead of querying all possible instances
which is slow and might be unreliable.
Signed-off-by: Armin Wolf <W_Armin@gmx.de >
Link: https://lore.kernel.org/r/20250216193251.866125-5-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-24 13:19:18 +02:00
Armin Wolf
126a53a94a
platform/x86: think-lmi: Use WMI bus API when accessing BIOS settings
...
Since the driver already binds to LENOVO_BIOS_SETTING_GUID, using
wmidev_block_query() inside tlmi_setting() allows for faster
access to BIOS settings.
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca >
Signed-off-by: Armin Wolf <W_Armin@gmx.de >
Link: https://lore.kernel.org/r/20250216193251.866125-4-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-24 13:19:16 +02:00
Armin Wolf
82d3af6b30
platform/x86: think-lmi: Use ACPI object when extracting strings
...
Move the ACPI buffer handling out of tlmi_extract_output_string()
and instead pass the unpacked ACPI object to prepare for future
changes.
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca >
Signed-off-by: Armin Wolf <W_Armin@gmx.de >
Link: https://lore.kernel.org/r/20250216193251.866125-3-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-24 13:19:15 +02:00
Armin Wolf
27cc2914e4
hwmon: (hp-wmi-sensors) Use the WMI bus API when accessing sensors
...
Since the driver already binds to HP_WMI_NUMERIC_SENSOR_GUID, using
wmidev_block_query() allows for faster sensor access.
Acked-by: Guenter Roeck <linux@roeck-us.net >
Tested-by: James Seo <james@equiv.tech >
Reviewed-by: James Seo <james@equiv.tech >
Signed-off-by: Armin Wolf <W_Armin@gmx.de >
Link: https://lore.kernel.org/r/20250216193251.866125-2-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-24 13:19:12 +02:00
Kurt Borja
c86e269c4d
platform/x86: dell: Use *-y instead of *-objs in Makefile
...
The `objs` suffix is reserved for user-space tools. Use the `y` suffix
instead, which is usually used for kernel drivers.
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Signed-off-by: Kurt Borja <kuurtb@gmail.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20250214214535.4947-1-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-17 10:45:43 +02:00
Ovidiu Panait
d497c47481
platform/x86: ideapad-laptop: use dev_groups to register attribute groups
...
Instead of manually adding/removing attribute groups, set
(struct device_driver).dev_groups pointer to have the driver
core do it.
Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com >
Link: https://lore.kernel.org/r/20250210155333.1145867-1-ovidiu.panait.oss@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-13 14:51:56 +02:00
Xi Pardee
d026feb03b
platform/x86:intel/pmc: Move arch specific action to init function
...
Move arch specific action from core.c to the init() function of spt.c.
Signed-off-by: Xi Pardee <xi.pardee@linux.intel.com >
Link: https://lore.kernel.org/r/20250212010621.1003663-1-xi.pardee@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-13 14:49:03 +02:00
Thorsten Blum
9cf1c75bfd
sonypi: Use str_on_off() helper in sonypi_display_info()
...
Remove hard-coded strings by using the str_on_off() helper function.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev >
Link: https://lore.kernel.org/r/20250210123103.112938-2-thorsten.blum@linux.dev
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-13 14:27:09 +02:00
Sakari Ailus
81b251c66b
platform/x86: int3472: Call "func" "con_id" instead
...
"con_id" is an established variable name for the GPIO naming for drivers.
Use it instead of "func" in the int3472 driver, too.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20250211072841.7713-4-sakari.ailus@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-13 14:25:36 +02:00
Ilpo Järvinen
432c2adb9e
Merge branch 'fixes' into for-next
...
Merge fixes into for-next to avoid int3472 and thinkpad_acpi conflicts
with upcoming changes.
2025-02-13 14:21:42 +02:00
Mark Pearson
b3e127daca
platform/x86: thinkpad_acpi: Fix registration of tpacpi platform driver
...
The recent platform profile changes prevent the tpacpi platform driver
from registering. This error is seen in the kernel logs, and the
various tpacpi entries are not created:
[ 7550.642171] platform thinkpad_acpi: Resources present before probing
This happens because devm_platform_profile_register() is called before
tpacpi_pdev probes (thanks to Kurt Borja for identifying the root
cause).
For now revert back to the old platform_profile_register to fix the
issue. This is quick fix and will be re-implemented later as more
testing is needed for full solution.
Tested on X1 Carbon G12.
Fixes: 31658c916f ("platform/x86: thinkpad_acpi: Use devm_platform_profile_register()")
Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca >
Reviewed-by: Kurt Borja <kuurtb@gmail.com >
Link: https://lore.kernel.org/r/20250211173620.16522-1-mpearson-lenovo@squebb.ca
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-12 13:49:37 +02:00
Sakari Ailus
569617dbbd
platform/x86: int3472: Call "reset" GPIO "enable" for INT347E
...
The DT bindings for ov7251 specify "enable" GPIO (xshutdown in
documentation) but the int3472 indiscriminately provides this as a "reset"
GPIO to sensor drivers. Take this into account by assigning it as "enable"
with active high polarity for INT347E devices, i.e. ov7251. "reset" with
active low polarity remains the default GPIO name for other devices.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20250211072841.7713-3-sakari.ailus@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-11 19:15:00 +02:00
Sakari Ailus
fc22b06fbd
platform/x86: int3472: Use correct type for "polarity", call it gpio_flags
...
Struct gpiod_lookup flags field's type is unsigned long. Thus use unsigned
long for values to be assigned to that field. Similarly, also call the
field gpio_flags which it really is.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20250211072841.7713-2-sakari.ailus@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-11 19:14:57 +02:00
Mark Pearson
9cff907cbf
platform/x86: thinkpad_acpi: Support for V9 DYTC platform profiles
...
Newer Thinkpad AMD platforms are using V9 DYTC and this changes the
profiles used for PSC mode. Add support for this update.
Tested on P14s G5 AMD
Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca >
Link: https://lore.kernel.org/r/20250206193953.58365-1-mpearson-lenovo@squebb.ca
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-10 16:56:33 +02:00
Sybil Isabel Dorsett
1046cac109
platform/x86: thinkpad_acpi: Fix invalid fan speed on ThinkPad X120e
...
On ThinkPad X120e, fan speed is reported in ticks per revolution
rather than RPM.
Recalculate the fan speed value reported for ThinkPad X120e
to RPM based on a 22.5 kHz clock.
Based on the information on
https://www.thinkwiki.org/wiki/How_to_control_fan_speed ,
the same problem is highly likely to be relevant to at least Edge11,
but Edge11 is not addressed in this patch.
Signed-off-by: Sybil Isabel Dorsett <sybdorsett@proton.me >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20250203163255.5525-1-sybdorsett@proton.me
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-10 16:56:26 +02:00
Xi Pardee
bd820906ea
platform/x86/intel/pmc: Add Arrow Lake U/H support to intel_pmc_core driver
...
Add Arrow Lake U and Arrow Lake H support in intel_pmc_core driver.
Signed-off-by: Rajvi Jingar <rajvi.jingar@linux.intel.com >
Signed-off-by: Xi Pardee <xi.pardee@linux.intel.com >
Link: https://lore.kernel.org/r/20250207225615.401235-7-xi.pardee@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-10 13:14:50 +02:00
Xi Pardee
45fa1a0d4d
platform/x86/intel/pmc: Remove simple init functions
...
Remove simple init functions to avoid duplicate code. Store
init function performing architecture specific action in the
corresponding pmc_dev_info structure. Replace init function
with pmc_dev_info structure in X86_MATCH_VFM() of core.c.
Signed-off-by: Xi Pardee <xi.pardee@linux.intel.com >
Link: https://lore.kernel.org/r/20250207225615.401235-5-xi.pardee@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-10 13:14:48 +02:00
Xi Pardee
ac6bef0d54
platform/x86:intel/pmc: Create generic_core_init() for all platforms
...
Create a generic_core_init() function for all architectures to reduce
duplicate code in each architecture file. Create an info structure
to catch the variations between each architecture and pass it to the
generic init function.
Convert all architectures to call the generic core init function.
Signed-off-by: Xi Pardee <xi.pardee@linux.intel.com >
Link: https://lore.kernel.org/r/20250207225615.401235-4-xi.pardee@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-10 13:14:46 +02:00
Xi Pardee
78eaf4d12d
platform/x86/intel/pmc: Remove duplicate enum
...
Remove duplicate enum PMC_IDX_SOC. PMC_IDX_SOC has the same value
as PMC_IDX_MAIN. Replace it with PMC_IDX_MAIN to avoid confusion.
Signed-off-by: Xi Pardee <xi.pardee@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20250207225615.401235-3-xi.pardee@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-10 13:14:45 +02:00
Xi Pardee
db7155b5e3
platform/x86:intel/pmc: Make tgl_core_generic_init() static
...
Make tgl_core_generic_init() a static function as the function has no
callers outside of tgl.c. Remove the prototype in core.h and reorder
the code in tgl.c.
Signed-off-by: Xi Pardee <xi.pardee@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20250207225615.401235-2-xi.pardee@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-10 13:14:41 +02:00
Kurt Borja
0738c3026c
platform/x86: alienware-wmi: Update header and module information
...
Update module header and description. Additionally add myself as a module
author.
Reviewed-by: Armin Wolf <W_Armin@gmx.de >
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Kurt Borja <kuurtb@gmail.com >
Link: https://lore.kernel.org/r/20250207154610.13675-15-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-10 12:56:33 +02:00
Kurt Borja
b1b8fcf6e6
platform/x86: Update alienware-wmi config entries
...
Add config entries for each WMI driver managed by the alienware-wmi
module to be able to conditionally compile them.
Reviewed-by: Armin Wolf <W_Armin@gmx.de >
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Kurt Borja <kuurtb@gmail.com >
Link: https://lore.kernel.org/r/20250207154610.13675-14-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-10 12:56:31 +02:00
Kurt Borja
dea2895be3
platform/x86: dell: Modify Makefile alignment
...
Add one more TAB to each line to support upcoming changes.
Reviewed-by: Armin Wolf <W_Armin@gmx.de >
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Kurt Borja <kuurtb@gmail.com >
Link: https://lore.kernel.org/r/20250207154610.13675-13-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-10 12:56:30 +02:00
Kurt Borja
8cc2c415d0
platform/x86: Split the alienware-wmi driver
...
Split alienware-wmi WMI drivers into different files. This is done
seamlessly by copying and pasting, however some blocks are reordered.
Reviewed-by: Armin Wolf <W_Armin@gmx.de >
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Kurt Borja <kuurtb@gmail.com >
Link: https://lore.kernel.org/r/20250207154610.13675-12-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-10 12:56:28 +02:00
Kurt Borja
c5ebbaf146
platform/x86: Add alienware-wmi.h
...
Add a header file for alienware-wmi with shared resources to support the
upcoming file split.
Reviewed-by: Armin Wolf <W_Armin@gmx.de >
Signed-off-by: Kurt Borja <kuurtb@gmail.com >
Link: https://lore.kernel.org/r/20250207154610.13675-11-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-10 12:56:27 +02:00
Kurt Borja
2e56ac8c27
platform/x86: Rename alienware-wmi.c
...
Rename alienware-wmi to support upcoming split.
Reviewed-by: Armin Wolf <W_Armin@gmx.de >
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Kurt Borja <kuurtb@gmail.com >
Link: https://lore.kernel.org/r/20250207154610.13675-10-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-10 12:56:25 +02:00
Kurt Borja
fd683f9fbb
MAINTAINERS: Update ALIENWARE WMI DRIVER entry
...
Dell has been inactive in its maintainership role of this driver since
around 2021. Due to this, add myself as a maintainer and update path
to support upcoming changes.
Reviewed-by: Armin Wolf <W_Armin@gmx.de >
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Kurt Borja <kuurtb@gmail.com >
Link: https://lore.kernel.org/r/20250207154610.13675-9-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-10 12:56:23 +02:00
Kurt Borja
6d7f1b1a5d
platform/x86: alienware-wmi: Split DMI table
...
Split thermal features into a new DMI table to support upcoming file
split. While at it:
Rename quirk_entry -> alienfx_quirks,
Rename quirks -> alienfx
and change hdmi_mux, amplifier and deepslp types to bool, because they are
already being implicitly used as bools.
Reviewed-by: Armin Wolf <W_Armin@gmx.de >
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Kurt Borja <kuurtb@gmail.com >
Link: https://lore.kernel.org/r/20250207154610.13675-8-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-10 12:56:22 +02:00
Kurt Borja
27e9e63398
platform/x86: alienware-wmi: Refactor thermal control methods
...
Refactor thermal control methods to use alienware_wmi_command() instead
of alienware_wmax_command().
Drop alienware_wmax_command() as there is no more users left.
Reviewed-by: Armin Wolf <W_Armin@gmx.de >
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Kurt Borja <kuurtb@gmail.com >
Link: https://lore.kernel.org/r/20250207154610.13675-7-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-10 12:56:20 +02:00
Kurt Borja
7292fb2a40
platform/x86: alienware-wmi: Refactor hdmi, amplifier, deepslp methods
...
Refactor show/store methods for hdmi, amplifier, deepslp sysfs groups to
use alienware_wmi_command() instead of alienware_wmax_command() which
uses deprecated WMI methods.
Reviewed-by: Armin Wolf <W_Armin@gmx.de >
Signed-off-by: Kurt Borja <kuurtb@gmail.com >
Link: https://lore.kernel.org/r/20250207154610.13675-6-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-10 12:56:19 +02:00
Kurt Borja
21cc9dee7d
platform/x86: alienware-wmi: Refactor LED control methods
...
Both WMI devices handled by this module specify a distinct interface for
LED control. Previously this module handled this by dynamically adapting
arguments passed to wmi_evaluate_method() based on the `interface`
global variable.
To avoid the use of global variables, and enable the migration to
non-deprecated WMI methods, let the WMI drivers define upd_led and
upd_brightness operations, which completely replace
alienware_update_led() and wmax_brightness().
Also define alienware_wmi_command(), which serves as a wrapper for
wmidev_evaluate_method(). This new method is very similar to
alienware_wmax_command() but is WMI device agnostic.
Reviewed-by: Armin Wolf <W_Armin@gmx.de >
Signed-off-by: Kurt Borja <kuurtb@gmail.com >
Link: https://lore.kernel.org/r/20250207154610.13675-5-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-10 12:56:17 +02:00
Kurt Borja
763c16fb14
platform/x86: alienware-wmi: Add a state container for thermal control methods
...
Refactor all thermal control methods to use the newly defined awcc_priv
state container instead of global variables. While at it, rename
create_thermal_profile() to awcc_platform_profile_init() and introduce
alienware_awcc_setup() to set up the "AWCC" WMI device driver data.
Reviewed-by: Armin Wolf <W_Armin@gmx.de >
Signed-off-by: Kurt Borja <kuurtb@gmail.com >
Link: https://lore.kernel.org/r/20250207154610.13675-4-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-10 12:56:15 +02:00
Kurt Borja
898a2302d7
platform/x86: alienware-wmi: Add WMI Drivers
...
Add WMI drivers for LEGACY and WMAX devices.
This involves moving the platform device registration to a helper
function that is now called from the driver's preferred WMI device
driver probe. In the case of the WMAX this is done only if
`!quirks->thermal` because the newer WMAX interface doesn't support any
of the LED features of this driver. This also eliminates the need to
check for `quirks->num_zones > 0` inside alienfx_probe().
Only one WMI driver is registered on module initialization to prevent
registering a duplicate platform device.
Additionally, create_thermal_profile() now takes wmi_device * instead of
platform_device *.
Reviewed-by: Armin Wolf <W_Armin@gmx.de >
Signed-off-by: Kurt Borja <kuurtb@gmail.com >
Link: https://lore.kernel.org/r/20250207154610.13675-3-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-10 12:56:14 +02:00
Kurt Borja
4c546de990
platform/x86: alienware-wmi: Add a state container for LED control feature
...
Add a state container for the "alienware-wmi" platform device and
initialize it on the new alienfx_probe(). Migrate all LED control functions
to use this state container to support upcoming file split.
Additionally move the led_classdev registration to the platform driver
probe and make it device managed.
Drop alienware_zone_init() and alienware_zone_exit() because they are no
longer needed and mimic the `quirks->num_zone > 0` check by failing the
platform device probe.
Reviewed-by: Armin Wolf <W_Armin@gmx.de >
Signed-off-by: Kurt Borja <kuurtb@gmail.com >
Link: https://lore.kernel.org/r/20250207154610.13675-2-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-10 12:56:11 +02:00
Joshua Grisham
56f529ce43
platform/x86: samsung-galaxybook: Add samsung-galaxybook driver
...
Add a new driver for Samsung Galaxy Book series notebook devices with the
following features:
- Keyboard backlight control
- Battery hook for installing power supply extension to add charge
control end threshold
- Controller for Samsung's performance modes using the platform profile
interface
- Adds firmware-attributes to control various system features
- Handles various hotkeys and notifications
Signed-off-by: Joshua Grisham <josh@joshuagrisham.com >
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net >
Reviewed-by: Armin Wolf <W_Armin@gmx.de >
Link: https://lore.kernel.org/r/20250201105450.193450-1-josh@joshuagrisham.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-02-07 13:57:03 +02:00