- 04 2月, 2021 24 次提交
-
-
由 Barnabás Pőcze 提交于
Consumers can determine if the value of an attribute changed much more easily if changes are broadcast using sysfs_notify(), so utilize it. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-26-pobrn@protonmail.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
Fix all checkpatch warnings. Reorder variable definitions from longest to shortest. Add more whitespaces for better readability. Rename variables named `ret` to `err` where appropriate. Reorder sysfs attributes show/store callbacks and the `ideapad_attributes` array in lexicographic order. And other minor formatting changes. No significant functional changes are intended. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-25-pobrn@protonmail.comReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
The touchpad can be enabled/disabled via this attribute on a Lenovo Yoga 520-14IKB. Allow writing as it provides legitimate functionality. This reverts commit 7f363145. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-24-pobrn@protonmail.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
Minor formatting changes. Use seq_puts() where possible. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-23-pobrn@protonmail.comReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
Remove conservation mode reporting since it is already reported via the appropriate device attribute, and its state can be deduced from the value of GBMD. Add the return value of the GBMD and HALS ACPI methods to the output. Use seq_puts() where possible. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-22-pobrn@protonmail.comReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
Bit 30 of _CFG is set if the device has a touchpad, check that in is_visible() for the touchpad attribute. Show 'touchpad', if supported, in the list of capabilities in the 'cfg' debugfs file. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-21-pobrn@protonmail.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
Bit 9 in the return value of the HALS ACPI method is set if Fn-lock is supported. Change ideapad_check_features() to check it. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-20-pobrn@protonmail.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
Store the supported features in the driver private data, and modify the is_visible() callback to use it, and create ideapad_check_features() to populate it. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-19-pobrn@protonmail.comReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
Create dedicated helper functions for accessing the main ACPI methods: GBMD, SMBC, HALS, SALS; and utilize them. Use `unsigned long` consistently in every ACPI helper wherever possible. Change names to better express purpose. Do not assign values to output parameters in case of failure. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-18-pobrn@protonmail.comReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
Group and rename constants depending on which ACPI interface they pertain to, and rename CFG_X constants to CFG_CAP_X. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-17-pobrn@protonmail.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
Do not handle zero length buffer separately. Use kstrtouint() instead of sscanf(). Use kstrtobool() in store_ideapad_cam(). These introduce minor ABI changes, but it is expected that no users rely on the previous behavior. Thus the change is deemed justifed. Additionally, use `!!` to convert to `int` and use the "%d" format specifier in sysfs_emit() for boolean-like attributes. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-16-pobrn@protonmail.comReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
Consumers can differentiate an error from a successful read much more easily if the read() call fails with an appropriate errno instead of returning a magic string like "-1". This introduces an ABI change, but not many users are expected to be relying on the previous behavior, and this change makes this module conforming to the standard behavior that sysfs attribute show/store callbacks return an appropriate errno in case of failure. Thus the ABI breakage is deemed justified. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-15-pobrn@protonmail.comReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
ACPI helpers returned -1 in case of failure. Convert these functions to return appropriate error codes, and convert their users to propagate these error codes accordingly. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-14-pobrn@protonmail.comReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
Having the device name in the log message makes it easier to determine in the context of which device the message was printed, so utilize the appropriate variants of dev_{err,warn,...} when printing log messages. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-12-pobrn@protonmail.comReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
The current code used a hand-crafted formula to convert milliseconds to jiffies, replace it with the msecs_to_jiffies() function. Furthermore, use a while loop instead of for loop for shorter lines and simplicity. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-11-pobrn@protonmail.comReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
The current code used the combination of a for loop + test_bit, which can be simplified using for_each_set_bit(), so utilize that. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-10-pobrn@protonmail.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
Use kobj_to_dev() instead of open-coding the container_of() macro. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-9-pobrn@protonmail.comReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
Use device_{add,remove}_group instead of sysfs_{add,remove}_group. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-8-pobrn@protonmail.comReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
sysfs_emit() has been introduced to make it less ambiguous which function is preferred when writing to the output buffer in a device attribute's show() callback. Convert the ideapad-laptop module to utilize this new helper function. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-7-pobrn@protonmail.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
ideapad_dytc_profile_exit() is not called in ideapad_acpi_add() in the error path. Add the missing call. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-6-pobrn@protonmail.comReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
Managing includes is easier when they are sorted, so sort them lexicographically. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-5-pobrn@protonmail.comReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
platform/x86: ideapad-laptop: use appropriately typed variable to store the return value of ACPI methods Use a variable with type `acpi_status` to store the return value of ACPI methods instead of a plain `int`. And use ACPI_{SUCCESS,FAILURE} macros where possible instead of direct comparison. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-4-pobrn@protonmail.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
The checks that are removed test pointers which should not be NULL. If they are NULL, that indicates a bug in a different part of the kernel. Instead of silently bailing out, let it fail loudly. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-3-pobrn@protonmail.comReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Barnabás Pőcze 提交于
The driver core already sets the driver specific data on bind failure or removal. Thus the call is unnecessary. Signed-off-by: NBarnabás Pőcze <pobrn@protonmail.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20210203215403.290792-2-pobrn@protonmail.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
- 03 2月, 2021 12 次提交
-
-
由 Artem Bityutskiy 提交于
Sapphire Rapids uncore frequency control is the same as Skylake and Ice Lake. Add the Sapphire Rapids CPU model number to the match array. Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com> Reviewed-by: NTony Luck <tony.luck@intel.com> Link: https://lore.kernel.org/r/20210203114320.1398801-1-dedekind1@gmail.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Hans de Goede 提交于
Add touchscreen info for the Jumper EZpad 7 tablet. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20210128113653.5442-1-hdegoede@redhat.com
-
由 David E. Box 提交于
All devices that expose Intel Platform Monitoring Technology (PMT) crashlog are currently owned by the intel_pmt MFD driver. Therefore make the crashlog driver depend on the MFD driver for build. Fixes: 5ef9998c ("platform/x86: Intel PMT Crashlog capability driver") Signed-off-by: NDavid E. Box <david.e.box@linux.intel.com> Link: https://lore.kernel.org/r/20210126205508.30907-3-david.e.box@linux.intel.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 David E. Box 提交于
All devices that expose Intel Platform Monitoring Technology (PMT) telemetry are currently owned by the intel_pmt MFD driver. Therefore make the telemetry driver depend on the MFD driver for build. Fixes: 68fe8e6e ("platform/x86: Intel PMT Telemetry capability driver") Signed-off-by: NDavid E. Box <david.e.box@linux.intel.com> Link: https://lore.kernel.org/r/20210126205508.30907-2-david.e.box@linux.intel.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 David E. Box 提交于
Fix error in Kconfig that exposed INTEL_PMT_CLASS as a user selectable option. It is already selected by INTEL_PMT_TELEMETRY and INTEL_PMT_CRASHLOG which are user selectable. Fixes: e2729113 ("platform/x86: Intel PMT class driver") Signed-off-by: NDavid E. Box <david.e.box@linux.intel.com> Link: https://lore.kernel.org/r/20210126205508.30907-1-david.e.box@linux.intel.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Maximilian Luz 提交于
The braces of the unlikely() macro inside the if condition only cover the subtraction part, not the whole statement. This causes the result of the subtraction to be converted to zero or one. While that still works in this context, it causes static analysis tools to complain (and is just plain wrong). Fix the bracket placement and, while at it, simplify the if-condition. Also add a comment to the if-condition explaining what we expect the result to be and what happens on the failure path, as it seems to have caused a bit of confusion. This commit should not cause any difference in behavior or generated code. Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Fixes: c167b9c7 ("platform/surface: Add Surface Aggregator subsystem") Signed-off-by: NMaximilian Luz <luzmaximilian@gmail.com> Link: https://lore.kernel.org/r/20210126172202.1428367-1-luzmaximilian@gmail.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Hans de Goede 提交于
ib-drm-gpio-pdx86-rtc-wdt for v5.12-1 First part of Intel MID outdated platforms removal. The following is an automated git shortlog grouped by driver: drm/gma500: - Get rid of duplicate NULL checks - Convert to use new SCU IPC API gpio: - msic: Remove driver for deprecated platform - intel-mid: Remove driver for deprecated platform intel_mid_powerbtn: - Remove driver for deprecated platform intel_mid_thermal: - Remove driver for deprecated platform intel_scu_wdt: - Get rid of custom x86 model comparison - Drop SCU notification - Move driver from arch/x86 rtc: - mrst: Remove driver for deprecated platform watchdog: - intel-mid_wdt: Postpone IRQ handler registration till SCU is ready - intel_scu_watchdog: Remove driver for deprecated platform
-
由 Lubomir Rintel 提交于
Determined empirically. Signed-off-by: NLubomir Rintel <lkundrak@v3.sk> Link: https://lore.kernel.org/r/20210126073740.10232-4-lkundrak@v3.skReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Lubomir Rintel 提交于
It is not needed. Use a local variable instead. Signed-off-by: NLubomir Rintel <lkundrak@v3.sk> Link: https://lore.kernel.org/r/20210126073740.10232-3-lkundrak@v3.skReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Lubomir Rintel 提交于
Reset ec_priv if probe ends unsuccessfully. Signed-off-by: NLubomir Rintel <lkundrak@v3.sk> Link: https://lore.kernel.org/r/20210126073740.10232-2-lkundrak@v3.skReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Pan Bian 提交于
Put the PCI device rdev on error paths to fix potential reference count leaks. Signed-off-by: NPan Bian <bianpan2016@163.com> Link: https://lore.kernel.org/r/20210121045005.73342-1-bianpan2016@163.comReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Jiaxun Yang 提交于
Add support to ideapad-laptop for Lenovo platforms that have DYTC version 5 support or newer to use the platform profile feature. Mostly based on Mark Pearson <markpearson@lenovo.com>'s thinkpad-acpi work but massaged to fit ideapad driver. Note that different from ThinkPads, IdeaPads's Thermal Hotkey won't trigger profile switch itself, we'll leave it for userspace programs. Tested on Lenovo Yoga-14S ARE Chinese Edition. Signed-off-by: NJiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20210105131447.38036-3-jiaxun.yang@flygoat.com [hdegoede@redhat.com s/QUIET/LOW_POWER/] Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
- 02 2月, 2021 4 次提交
-
-
由 Mark Pearson 提交于
Add support to thinkpad_acpi for Lenovo platforms that have DYTC version 5 support or newer to use the platform profile feature. This will allow users to determine and control the platform modes between low-power, balanced operation and performance modes. Signed-off-by: NMark Pearson <markpearson@lenovo.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20210111162237.3469-1-markpearson@lenovo.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Hans de Goede 提交于
-
由 Nitin Joshi 提交于
The previous commit adding new sysfs for keyboard language has warning and few code correction has to be done as per new review comments. Below changes has been addressed in this version: - corrected warning. Many thanks to kernel test robot <lkp@intel.com> for reporting and determining this warning. - used sysfs_emit_at() API instead of strcat. - sorted keyboard language array. - removed unwanted space and corrected sentences. Reported-by: Nkernel test robot <lkp@intel.com> Signed-off-by: NNitin Joshi <njoshi1@lenovo.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20210202003210.91773-1-njoshi1@lenovo.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Lukas Bulwahn 提交于
Commit d7cbe277 ("platform/x86: thinkpad_acpi: set keyboard language") adds information on keyboard setting to the thinkpad documentation, but made the subsection title underline too short. Hence, make htmldocs warns: Documentation/admin-guide/laptops/thinkpad-acpi.rst:1472: \ WARNING: Title underline too short. Rectify length of subsection title underline. Signed-off-by: NLukas Bulwahn <lukas.bulwahn@gmail.com> Link: https://lore.kernel.org/r/20210129040849.26740-1-lukas.bulwahn@gmail.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-