- 28 6月, 2021 2 次提交
-
-
由 Mario Limonciello 提交于
Currently attributes will show things like: `BootOrderLock,Disable` rather than just `Disable`. Of course this works, but the attribute is intended to be read by userspace tools and not require further processing. That is a userspace tool can display a drop down of `possible_values` and `current_value` is one of them from the list. This also aligns `think-lmi` with how `dell-wmi-sysman` works. Signed-off-by: NMario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20210622200755.12379-3-mario.limonciello@amd.comReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Mario Limonciello 提交于
On an AMD based Lenovo T14, I find that the module doesn't work at all, and instead has a traceback with messages like: ``` sysfs: cannot create duplicate filename '/devices/virtual/firmware-attributes/thinklmi/attributes/Reserved' ``` Duplicate and reserved values showing up appear to be a firmware bug, but they shouldn't make the driver explode. So catch them and skip them. Fixes: a40cd7ef ("platform/x86: think-lmi: Add WMI interface support on Lenovo platforms") Signed-off-by: NMario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20210622200755.12379-2-mario.limonciello@amd.com [hdegoede@redhat.com: Add missing kfree(tlmi_priv.setting[i])] Reviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
- 22 6月, 2021 9 次提交
-
-
由 Hans de Goede 提交于
Commit 0ddcf3a6 ("platform/x86: think-lmi: Avoid potential read before start of the buffer") moved the length == 0 up to before stripping the '\n' which typically gets added when users echo a value to a sysfs-attribute from the shell. This avoids a potential buffer-underrun, but it also causes a behavioral change, prior to this change "echo > kbdlang", iow writing just a single '\n' would result in an EINVAL error, but after the change this gets accepted setting kbdlang to an empty string. Fix this by replacing the manual '\n' check with using strchrnul() to get the length till '\n' or terminating 0 in one go; and then do the length != 0 check after this. Fixes: 0ddcf3a6 ("platform/x86: think-lmi: Avoid potential read before start of the buffer") Reported-by: NJuha Leppänen <juha_efku@dnainternet.net> Suggested-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20210621193648.44138-1-hdegoede@redhat.com
-
由 Andy Shevchenko 提交于
Since we have started collecting Intel x86 specific drivers in their own folder, move intel_cht_int33fe to its own subfolder there. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210618125516.53510-8-andriy.shevchenko@linux.intel.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Andy Shevchenko 提交于
Start collecting Intel x86 related drivers in its own subfolder. Move intel_skl_int3472 first. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210618125516.53510-7-andriy.shevchenko@linux.intel.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Andy Shevchenko 提交于
For the sake of APIs to be properly layered provide skl_int3472_unregister_clock(). Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NDaniel Scally <djrscally@gmail.com> Tested-by: NDaniel Scally <djrscally@gmail.com> Link: https://lore.kernel.org/r/20210618125516.53510-6-andriy.shevchenko@linux.intel.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Andy Shevchenko 提交于
For the sake of APIs to be properly layered provide skl_int3472_unregister_regulator(). Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NDaniel Scally <djrscally@gmail.com> Tested-by: NDaniel Scally <djrscally@gmail.com> Link: https://lore.kernel.org/r/20210618125516.53510-5-andriy.shevchenko@linux.intel.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Andy Shevchenko 提交于
When we call acpi_gpio_get_io_resource(), the output will be the pointer to the ACPI GPIO resource. Use it directly instead of dereferencing the generic resource. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NDaniel Scally <djrscally@gmail.com> Tested-by: NDaniel Scally <djrscally@gmail.com> Link: https://lore.kernel.org/r/20210618125516.53510-4-andriy.shevchenko@linux.intel.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Andy Shevchenko 提交于
Besides the fact that COMMON_CLK selects CLKDEV_LOOKUP, the latter is going to be removed from clock framework. Reviewed-by: NDaniel Scally <djrscally@gmail.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210618125516.53510-3-andriy.shevchenko@linux.intel.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Andy Shevchenko 提交于
We may free ACPI device resources immediately after use. Refactor skl_int3472_parse_crs() accordingly. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NDaniel Scally <djrscally@gmail.com> Tested-by: NDaniel Scally <djrscally@gmail.com> Link: https://lore.kernel.org/r/20210618125516.53510-2-andriy.shevchenko@linux.intel.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Andy Shevchenko 提交于
Linus already once did that for PDx86, don't repeat our mistakes. TL;DR: 'n' *is* the default 'default'. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210618125516.53510-1-andriy.shevchenko@linux.intel.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
- 18 6月, 2021 5 次提交
-
-
由 Hans de Goede 提交于
Signed tag for the immutable devm-helpers branch for merging into the extcon and pdx86 trees.
-
由 Srinivas Pandruvada 提交于
There is a problem in mapping CPU to a PCI device instance when the bus numbers are reused in different packages. This was observed on some Sapphire Rapids systems. The current implementation reads bus number assigned to a CPU package via MSR 0x128. This allows to establish relationship between a CPU and a PCI device. This allows to update power related parameters to a MMIO offset in a PCI device space which is unique to a CPU. But if two packages uses same bus number then this mapping will not be unique. When bus number is reused, PCI device will use different domain number or segment number. So we need to be aware of this domain information while matching CPU to PCI bus number. This domain information is not available via any MSR. So need to use ACPI numa node information. There is an interface already available in the Linux to read numa node for a CPU and a PCI device. This change uses this interface to check the numa node of a match PCI device with bus number. If the bus number and numa node matches with the CPU's assigned bus number and numa node, the matched PCI device instance will be returned to the caller. It is possible that before Sapphire Rapids, the numa node is not defined for the Speed Select PCI device in some OEM systems. In this case to restore old behavior, return the last matched PCI device for domain 0 unlsess there are more than one matches. Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Link: https://lore.kernel.org/r/20210616221329.1909276-2-srinivas.pandruvada@linux.intel.comReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Srinivas Pandruvada 提交于
It was observed that some of the high performance benchmarks are spending more time in kernel depending on which CPU package they are executing. The difference is significant and benchmark scores varies more than 10%. These benchmarks adjust class of service to improve thread performance which run in parallel. This class of service change causes access to MMIO region of Intel Speed Select PCI devices depending on the CPU package they are executing. This mapping from CPU to PCI device instance uses a standard Linux PCI interface "pci_get_domain_bus_and_slot()". This function does a linear search to get to a PCI device. Since these platforms have 100+ PCI devices, this search can be expensive in fast path for benchmarks. Since the device and function of PCI device is fixed for Intel Speed Select PCI devices, the CPU to PCI device information can be cached at the same time when bus number for the CPU is read. In this way during runtime the cached information can be used. This improves performance of these benchmarks significantly. Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Link: https://lore.kernel.org/r/20210616221329.1909276-1-srinivas.pandruvada@linux.intel.comReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Srinivas Pandruvada 提交于
This release adds following change: - Fix reporting of memory frequency Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Srinivas Pandruvada 提交于
The uncore memory frequency value from the mailbox command CONFIG_TDP_GET_MEM_FREQ needs to be scaled based on the platform for display. There is no single constant multiplier. This change introduces CPU model specific memory frequency multiplier. Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
- 17 6月, 2021 6 次提交
-
-
由 Matti Vaittinen 提交于
Simplify driver by switching to use the resource managed IRQ requesting and resource managed work-queue initialization. Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NChanwoo Choi <cw00.choi@samsung.com> Link: https://lore.kernel.org/r/61190cc280a63baeb05ec570282bb3677bee8e7b.1623146580.git.matti.vaittinen@fi.rohmeurope.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Matti Vaittinen 提交于
If reading MAX8997_MUIC_REG_STATUS1 fails at probe the driver exits without freeing the requested IRQs. Free the IRQs prior returning if reading the status fails. Fixes: 3e34c819 ("extcon: max8997: Avoid forcing UART path on drive probe") Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NChanwoo Choi <cw00.choi@samsung.com> Link: https://lore.kernel.org/r/27ee4a48ee775c3f8c9d90459c18b6f2b15edc76.1623146580.git.matti.vaittinen@fi.rohmeurope.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Matti Vaittinen 提交于
The extcon IRQ schedules a work item. IRQ is requested using devm while WQ is cancelld at remove(). This mixing of devm and manual unwinding has potential case where the WQ has been emptied (.remove() was ran) but devm unwinding of IRQ was not yet done. It may be possible the IRQ is triggered at this point scheduling new work item to the already flushed queue. According to the input documentation the input device allocated by devm_input_allocate_device() does not need to be explicitly unregistered. Use the new devm_work_autocancel() and remove the remove() to simplify the code. Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Reviewed-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NChanwoo Choi <cw00.choi@samsung.com> Link: https://lore.kernel.org/r/cbe8205eed8276f6e6db5003cfe51b8b0d4ac966.1623146580.git.matti.vaittinen@fi.rohmeurope.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Matti Vaittinen 提交于
The extcon IRQ schedules a work item. IRQ is requested using devm while WQ is cancelld at remove(). This mixing of devm and manual unwinding has potential case where the WQ has been emptied (.remove() was ran) but devm unwinding of IRQ was not yet done. It is possible the IRQ is triggered at this point scheduling new work item to the already flushed queue. Use new devm_work_autocancel() to remove the remove() and to kill the bug. Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Reviewed-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NChanwoo Choi <cw00.choi@samsung.com> Link: https://lore.kernel.org/r/ee8545f59ae3a93f0a70f640ecbd7e31cfadbcb9.1623146580.git.matti.vaittinen@fi.rohmeurope.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Matti Vaittinen 提交于
A few drivers which need a work-queue must cancel work at driver detach. Some of those implement remove() solely for this purpose. Help drivers to avoid unnecessary remove and error-branch implementation by adding managed verision of work initialization. This will also help drivers to avoid mixing manual and devm based unwinding when other resources are handled by devm. Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Reviewed-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/94ff4175e7f2ff134ed2fa7d6e7641005cc9784b.1623146580.git.matti.vaittinen@fi.rohmeurope.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Daniel Scally 提交于
This driver only covered one scenario in which ACPI devices with _HID INT3472 are found, and its functionality has been taken over by the intel-skl-int3472 module, so remove it. Acked-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Acked-by: NLee Jones <lee.jones@linaro.org> Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NDaniel Scally <djrscally@gmail.com> Link: https://lore.kernel.org/r/20210603224007.120560-7-djrscally@gmail.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
- 16 6月, 2021 18 次提交
-
-
由 Daniel Scally 提交于
ACPI devices with _HID INT3472 are currently matched to the tps68470 driver, however this does not cover all situations in which that _HID occurs. We've encountered three possibilities: 1. On Chrome OS devices, an ACPI device with _HID INT3472 (representing a physical TPS68470 device) that requires a GPIO and OpRegion driver 2. On devices designed for Windows, an ACPI device with _HID INT3472 (again representing a physical TPS68470 device) which requires GPIO, Clock and Regulator drivers. 3. On other devices designed for Windows, an ACPI device with _HID INT3472 which does **not** represent a physical TPS68470, and is instead used as a dummy device to group some system GPIO lines which are meant to be consumed by the sensor that is dependent on this entry. This commit adds a new module, registering a platform driver to deal with the 3rd scenario plus an i2c driver to deal with #1 and #2, by querying the CLDB buffer found against INT3472 entries to determine which is most appropriate. Suggested-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NDaniel Scally <djrscally@gmail.com> Link: https://lore.kernel.org/r/20210603224007.120560-6-djrscally@gmail.com [hdegoede@redhat.com Make skl_int3472_tps68470_calc_type() static] Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Hans de Goede 提交于
-
由 Hans de Goede 提交于
intel-gpio for v5.14-1 * Export two functions from GPIO ACPI for wider use * Clean up Whiskey Cove and Crystal Cove GPIO drivers The following is an automated git shortlog grouped by driver: crystalcove: - remove platform_set_drvdata() + cleanup probe gpiolib: - acpi: Add acpi_gpio_get_io_resource() - acpi: Introduce acpi_get_and_request_gpiod() helper wcove: - Split error handling for CTRL and IRQ registers - Unify style of to_reg() with to_ireg() - Use IRQ hardware number getter instead of direct access
-
由 Hans de Goede 提交于
Signed tag for the immutable platform-drivers-x86-goodix branch for merging into the input subsystem.
-
由 Maximilian Luz 提交于
We have moved to libera.chat. Update the link accordingly. Signed-off-by: NMaximilian Luz <luzmaximilian@gmail.com> Link: https://lore.kernel.org/r/20210614194635.1681519-1-luzmaximilian@gmail.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Zou Wei 提交于
This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NZou Wei <zou_wei@huawei.com> Link: https://lore.kernel.org/r/1623811809-65099-1-git-send-email-zou_wei@huawei.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Hans de Goede 提交于
If length equals 0 then reading buf[length-1] will read before the start of the buffer. Avoid this by moving the length == 0 check up. Cc: Mark Pearson <markpearson@lenovo.com> Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20210609151752.156902-2-hdegoede@redhat.com
-
由 Hans de Goede 提交于
tlmi_priv.pwd_admin->password is an array (not a pointer), so the correct way to check for the password being set is to check for tlmi_priv.pwd_admin->password[0] != 0. For the second check, replace the check with checking that auth_str is set instead. Cc: Mark Pearson <markpearson@lenovo.com> Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Reported-by: Ncoverity-bot <keescook+coverity-bot@chromium.org> Addresses-Coverity-ID: 1505158 ("NO_EFFECT") Fixes: a7314b3b1d8a ("platform/x86: think-lmi: Add WMI interface support on Lenovo platforms") Signed-off-by: NHans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20210609151752.156902-1-hdegoede@redhat.com
-
由 Hans de Goede 提交于
The dell-wmi-sysman and think-lmi kernel modules both have a global struct class *fw_attr_class variable, leading to the following compile errors when both are builtin: ld: drivers/platform/x86/think-lmi.o:(.bss+0x0): multiple definition of `fw_attr_class'; drivers/platform/x86/dell/dell-wmi-sysman/sysman.o:(.bss+0x0): first defined here In both cases the variable is only used in the file where it is declared. Make both declarations static to avoid the linker error. Cc: Mark Pearson <markpearson@lenovo.com> Cc: Dell.Client.Kernel@dell.com Reported-by: NNathan Chancellor <nathan@kernel.org> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20210609145952.113393-1-hdegoede@redhat.com
-
由 yangerkun 提交于
drivers/platform/x86/intel_ips.c:832:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] 832 | u16 ret; | ^~~ Fix it by mark ret as '__maybe_unused'. Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: Nyangerkun <yangerkun@huawei.com> Link: https://lore.kernel.org/r/20210607014702.2981097-1-yangerkun@huawei.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Rikard Falkeborn 提交于
The only use of base_attr_group and hubless_base_attr_group is to pass their addresses to sysfs_create_group() and sysfs_remove_group(), both which takes pointers to const attribute_group structs. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: NRikard Falkeborn <rikard.falkeborn@gmail.com> Reviewed-by: NJustin Ernst <justin.ernst@hpe.com> Link: https://lore.kernel.org/r/20210605203807.60547-5-rikard.falkeborn@gmail.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Rikard Falkeborn 提交于
The only use of tc1100_attribute_group is to pass its address to sysfs_create_group() and sysfs_remove_group(), both which takes pointer to const attribute_group structs. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: NRikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20210605203807.60547-4-rikard.falkeborn@gmail.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Rikard Falkeborn 提交于
The only use of pmt_crashlog_group is to assign its address to the attr_grp field in the intel_pmt_namespace struct, which is a pointer to const attribute_group. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: NRikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20210605203807.60547-3-rikard.falkeborn@gmail.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Rikard Falkeborn 提交于
The only use of hdaps_attribute_group is to pass its address to sysfs_create_group() and sysfs_remove_group(), both which takes pointers to const attribute_group structs. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: NRikard Falkeborn <rikard.falkeborn@gmail.com> Reviewed-by: NFrank Seidel <frank@f-seidel.de> Link: https://lore.kernel.org/r/20210605203807.60547-2-rikard.falkeborn@gmail.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Baokun Li 提交于
platform/surface: aggregator: Use list_move_tail instead of list_del/list_add_tail in ssh_packet_layer.c Using list_move_tail() instead of list_del() + list_add_tail() in ssh_packet_layer.c. Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NBaokun Li <libaokun1@huawei.com> Reviewed-by: NMaximilian Luz <luzmaximilian@gmail.com> Link: https://lore.kernel.org/r/20210609072448.1357524-1-libaokun1@huawei.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Baokun Li 提交于
platform/surface: aggregator: Use list_move_tail instead of list_del/list_add_tail in ssh_request_layer.c Using list_move_tail() instead of list_del() + list_add_tail() in ssh_request_layer.c. Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NBaokun Li <libaokun1@huawei.com> Reviewed-by: NMaximilian Luz <luzmaximilian@gmail.com> Link: https://lore.kernel.org/r/20210609072638.1358174-1-libaokun1@huawei.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Maximilian Luz 提交于
The status variable in ssam_controller_event_disable() is always set, no need to initialize it. Signed-off-by: NMaximilian Luz <luzmaximilian@gmail.com> Link: https://lore.kernel.org/r/20210604210907.25738-3-luzmaximilian@gmail.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Maximilian Luz 提交于
The status variable in ssam_nf_refcount_disable_free() is only set when the reference count equals zero. Otherwise, it is returned uninitialized. Fix this by always initializing status to zero. Reported-by: Nkernel test robot <lkp@intel.com> Fixes: 640ee17199e4 ("platform/surface: aggregator: Allow enabling of events without notifiers") Signed-off-by: NMaximilian Luz <luzmaximilian@gmail.com> Link: https://lore.kernel.org/r/20210604210907.25738-2-luzmaximilian@gmail.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-