- 27 12月, 2021 3 次提交
-
-
由 Denis Pauk 提交于
WMI monitoring methods can be changed or removed in new ASUS boards BIOS versions. Such versions return zero instead of a real one as Chip ID. Commit adds additional validation for the result of Chip ID call before enabling access by ASUS WMI methods. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204807Signed-off-by: NDenis Pauk <pauk.denis@gmail.com> Link: https://lore.kernel.org/r/20211218205206.615865-1-pauk.denis@gmail.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Denis Pauk 提交于
ASUS ROG STRIX B550-A/X570-I GAMING boards have got an nct6775 chip, but by default there's no use of it because of resource conflict with WMI method. This commit adds "ROG STRIX B550-A GAMING" and "ROG STRIX X570-I GAMING" to the list of boards that can be monitored using ASUS WMI. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204807Signed-off-by: NDenis Pauk <pauk.denis@gmail.com> Tested-by: NDaniel Gibson <metalcaedes@gmail.com> Tested-by: NMichael Altizer <michael@theoddone.net> Tested-by: NMikhail Gavrilov <mikhail.v.gavrilov@gmail.com> Link: https://lore.kernel.org/r/20211211180037.367062-1-pauk.denis@gmail.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Dan Carpenter 提交于
This code can fit on one line. No need to break it up. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20211215114050.GB14967@kiliSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 15 11月, 2021 1 次提交
-
-
由 Zev Weiss 提交于
The first call to nct6775_asuswmi_read() in nct6775_wmi_read_value() had been passing the full bank+register number instead of just the lower 8 bits. It didn't end up actually causing problems because the second argument of that function is a u8 anyway, but it seems preferable to be explicit about it at the call site (and consistent with the rest of the code). Signed-off-by: NZev Weiss <zev@bewilderbeest.net> Fixes: 3fbbfc27 ("hwmon: (nct6775) Support access via Asus WMI") Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20211111025339.27520-1-zev@bewilderbeest.netSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 28 10月, 2021 1 次提交
-
-
由 Denis Pauk 提交于
ASUS ProArt X570-CREATOR WIFI board has got an nct6775 chip, but by default there's no use of it because of resource conflict with WMI method. This commit adds ProArt X570-CREATOR WIFI to the list of boards that can be monitored using ASUS WMI. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204807Signed-off-by: NDenis Pauk <pauk.denis@gmail.com> Tested-by: NJoel Wirāmu Pauling <jwp@redhat.com> Link: https://lore.kernel.org/r/20211025194748.6784-1-pauk.denis@gmail.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 12 10月, 2021 5 次提交
-
-
由 Oleksandr Natalenko 提交于
ASUS Pro WS X570-ACE board has got an nct6775 chip, but by default there's no use of it because of resource conflict: ``` ACPI Warning: SystemIO range 0x0000000000000295-0x0000000000000296 conflicts with OpRegion 0x0000000000000290-0x0000000000000299 (\AMW0.SHWM) (20210604/utaddress-204 ) ACPI: OSL: Resource conflict; ACPI support missing from driver? ACPI: OSL: Resource conflict: System may be unstable or behave erratically ``` A workaround is to use `acpi_enforce_resources=lax`, but a proper support needs to be added instead. This commit adds Pro WS X570-ACE to the list of boards that can be monitored using ASUS WMI. Tested by me on this hardware: ``` Base Board Information Manufacturer: ASUSTeK COMPUTER INC. Product Name: Pro WS X570-ACE BIOS Information Vendor: American Megatrends Inc. Version: 3801 Release Date: 07/30/2021 ``` Signed-off-by: NOleksandr Natalenko <oleksandr@natalenko.name> Link: https://lore.kernel.org/r/20211003133344.9036-2-oleksandr@natalenko.nameSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Denis Pauk 提交于
Add support: * PRIME B360-PLUS * PRIME X570-PRO * ROG CROSSHAIR VIII FORMULA * ROG STRIX B550-I GAMING * ROG STRIX X570-F GAMING * ROG STRIX Z390-E GAMING * TUF GAMING B550-PRO * TUF GAMING Z490-PLUS * TUF GAMING Z490-PLUS (WI-FI) BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204807Signed-off-by: NDenis Pauk <pauk.denis@gmail.com> Tested-by: Nmatt-testalltheway <sefoci9222@rerunway.com> Tested-by: NKamil Dudka <kdudka@redhat.com> Tested-by: NRobert Swiecki <robert@swiecki.net> Tested-by: NKamil Pietrzak <kpietrzak@disroot.org> Tested-by: NIgor <igor@svelig.com> Tested-by: NTor Vic <torvic9@mailbox.org> Tested-by: NPoezevara <nephartyz@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@intel.com> Cc: Guenter Roeck <linux@roeck-us.net> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20211002210857.709956-2-pauk.denis@gmail.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Denis Pauk 提交于
Support accessing the NCT677x via Asus WMI functions. On mainboards that support this way of accessing the chip, the driver will usually not work without this option since in these mainboards, ACPI will mark the I/O port as used. Code uses ACPI firmware interface to communicate with sensors with ASUS motherboards: * PRIME B460-PLUS, * ROG CROSSHAIR VIII IMPACT, * ROG STRIX B550-E GAMING, * ROG STRIX B550-F GAMING, * ROG STRIX B550-F GAMING (WI-FI), * ROG STRIX Z490-I GAMING, * TUF GAMING B550M-PLUS, * TUF GAMING B550M-PLUS (WI-FI), * TUF GAMING B550-PLUS, * TUF GAMING X570-PLUS, * TUF GAMING X570-PRO (WI-FI). BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204807Signed-off-by: NDenis Pauk <pauk.denis@gmail.com> Co-developed-by: NBernhard Seibold <mail@bernhard-seibold.de> Signed-off-by: NBernhard Seibold <mail@bernhard-seibold.de> Tested-by: NPär Ekholm <pehlm@pekholm.org> Tested-by: <to.eivind@gmail.com> Tested-by: NArtem S. Tashkinov <aros@gmx.com> Tested-by: NVittorio Roberto Alfieri <me@rebtoor.com> Tested-by: NSahan Fernando <sahan.h.fernando@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@intel.com> Cc: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20210917220240.56553-4-pauk.denis@gmail.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Denis Pauk 提交于
Prepare for platform specific callbacks usage: * Use nct6775 function pointers in struct nct6775_data instead direct calls. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204807Signed-off-by: NDenis Pauk <pauk.denis@gmail.com> Co-developed-by: NBernhard Seibold <mail@bernhard-seibold.de> Signed-off-by: NBernhard Seibold <mail@bernhard-seibold.de> Cc: Andy Shevchenko <andriy.shevchenko@intel.com> Cc: Guenter Roeck <linux@roeck-us.net> Reviewed-by: NGuenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20210917220240.56553-3-pauk.denis@gmail.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Denis Pauk 提交于
Prepare for platform specific callbacks usage: * Rearrange code for directly use struct nct6775_sio_data in superio_*() functions. * Use superio function pointers in nct6775_sio_data struct instead direct calls. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204807Signed-off-by: NDenis Pauk <pauk.denis@gmail.com> Co-developed-by: NBernhard Seibold <mail@bernhard-seibold.de> Signed-off-by: NBernhard Seibold <mail@bernhard-seibold.de> Cc: Andy Shevchenko <andriy.shevchenko@intel.com> Cc: Guenter Roeck <linux@roeck-us.net> Reviewed-by: NGuenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20210917220240.56553-2-pauk.denis@gmail.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 24 8月, 2020 1 次提交
-
-
由 Gustavo A. R. Silva 提交于
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-throughSigned-off-by: NGustavo A. R. Silva <gustavoars@kernel.org>
-
- 15 7月, 2020 1 次提交
-
-
由 Guenter Roeck 提交于
Stefan Dietrich reports invalid temperature source messages on Asus Formula XII Z490. nct6775 nct6775.656: Invalid temperature source 28 at index 0, source register 0x100, temp register 0x73 Debugging suggests that temperature source 28 reports the CPU temperature. Let's assume that temperature sources 28 and 29 reflect "PECI Agent {0,1} Calibration", similar to other chips of the series. Reported-by: NStefan Dietrich <roots@gmx.de> Cc: Stefan Dietrich <roots@gmx.de> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 22 5月, 2020 1 次提交
-
-
由 zhouchuangao 提交于
Use kobj_to_dev() API instead of container_of(). Signed-off-by: Nzhouchuangao <zhouchuangao@xiaomi.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 04 9月, 2019 1 次提交
-
-
由 Björn Gerhart 提交于
Add support for NCT6116D to nct6775 driver. Signed-off-by: NBjoern Gerhart <gerhart@posteo.de> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 22 7月, 2019 1 次提交
-
-
由 Björn Gerhart 提交于
Fixed address of third NCT6106_REG_WEIGHT_DUTY_STEP, and added missed NCT6106_REG_TOLERANCE_H. Fixes: 6c009501 ("hwmon: (nct6775) Add support for NCT6102D/6106D") Signed-off-by: NBjoern Gerhart <gerhart@posteo.de> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 24 5月, 2019 1 次提交
-
-
由 Thomas Gleixner 提交于
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 675 mass ave cambridge ma 02139 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 441 file(s). Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Reviewed-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) Reviewed-by: NRichard Fontana <rfontana@redhat.com> Reviewed-by: NAllison Randal <allison@lohutok.net> Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190520071858.739733335@linutronix.deSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 28 1月, 2019 1 次提交
-
-
由 Guenter Roeck 提交于
Commit 2d99925a ("hwmon: (nct6775) Separate fan/pwm configuration detection for NCT6793D") accidentally removed part of the code detecting if fan6 is enabled or not. As result, fan6 is no longer detected on Asus PRIME Z370-A. Restore the missing detection code. Fixes: 2d99925a ("hwmon: (nct6775) Separate fan/pwm configuration detection for NCT6793D") Reported-by: NChris Siebenmann <cks@cs.toronto.edu> Cc: Chris Siebenmann <cks@cs.toronto.edu> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 07 1月, 2019 2 次提交
-
-
由 Guenter Roeck 提交于
Similar to other recent chips from Nuvoton, IO mapping may be disabled by default. Enable it when instantiating the driver and after resume. Fixes: 0599682b ("hwmon: (nct6775) Add support for NCT6798D") Fixes: e41da286 ("hwmon: (nct6775) Add support for NCT6797D") Reported-by: NMichael Cook <mcook@mackal.net> Cc: Michael Cook <mcook@mackal.net> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
The chip ID is 0xd42[8-f], not 0xd45[8-f]. Fixes: 0599682b ("hwmon: (nct6775) Add support for NCT6798D") Reported-by: NMichael Cook <mcook@mackal.net> Cc: Michael Cook <mcook@mackal.net> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 11 10月, 2018 15 次提交
-
-
由 Guenter Roeck 提交于
NCT6798D is, with the exception of fan and pwm channel configuration registers, similar to other chips of the series. One interesting difference is the chip ID, which is now extended to 13 bit (the 12-bit chip ID value overlaps with the chip ID of NCT6797D). Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Add support for NCT6797D. With the exception of fan/pwm configuration registers, it is mostly compatible with NCT6795D. Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
For NCT6795D and NCT6796D, the DIMM temperature sources are named "Agent[01] Dimm [01]" per datasheet. Match names in datasheets to avoid confusion. Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Now that everything is separated, clean up fan and pwm configuration for NCT6796D. While doing that, take the forgotten configuration register cre0 into account to determine if AUXFANIN2 (fan5) and AUXFANOUT2 (pwm5) are connected. Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Separate fan/pwm configuration detection for NCT6795D into separate case statement to make the code easier to read. No functional change. Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
While detecting the configuration for multiple chips in one go reduces code size, it also increases code complexity. Separate chip detection to improve code readability. As first step, separate detection for NCT6793D. No functional change. Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Per datasheet, AUXFANIN3 (fan6) and AUXFANOUT3 (pwm6) are only connected if DSW_EN is false. Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
When determining support for a given fan or pwm control, the code is easier to read if the necessary instructions are grouped together. No functional change. Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Use boolean |= <expression>; instead of if (!boolean) boolean = <expression>; to assign values to boolean variables. No functional change. Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Declare and initialize LDN / chip specific configuration variables earlier. This simplifies re-using the configuration variables for multiple chips and makes the code easier to read. Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Group configuration variable declarations and initialization together. While this results in reading more registers than necessary for a given chip, it improves code readability and simplifies extending the code. Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Using variables named after configuration registers makes it more obvious which configuration register value is used, especially if more than one configuration register value is used to determine a configuration detail. No functional change. Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Use variable names from chip datasheets (crXX) instead of regval_XX for configuration register variables. This is shorter and, together with subsequent changes, makes the code easier to read. No functional change. Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
A fan speed tolerance only makes sense if a fan target speed has been configured in the first place. Otherwise we get odd output such as fan1_target:0 fan1_tolerance:337500 Only display values other than 0 if a fan target speed has been configured. Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Dan Carpenter 提交于
I removed the "dsw_en &&" chunk of the condition because we know that "dsw_en" is set. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 17 9月, 2018 1 次提交
-
-
由 Guenter Roeck 提交于
The documented register to retrieve the fan RPM for fan7 is found to be unreliable at least with NCT6796D revision 3. Let's use register 0x4ce instead. This is undocumented for NCT6796D, but documented for NCT6797D and NCT6798D and known to be working. Reported-by: NRobert Kern <ulteq@web.de> Cc: Robert Kern <ulteq@web.de> Fixes: 81820059 ("hwmon: (nct6775) Add support for NCT6796D") Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 16 9月, 2018 1 次提交
-
-
由 Guenter Roeck 提交于
fan7 on NCT6796D does not have a fan count register; it only has an RPM register. Switch to using RPM registers to read the fan speed for all chips supporting it to solve the problem for good. Reported-by: NRobert Kern <ulteq@web.de> Cc: Robert Kern <ulteq@web.de> Fixes: 81820059 ("hwmon: (nct6775) Add support for NCT6796D") Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 15 9月, 2018 1 次提交
-
-
由 Guenter Roeck 提交于
The following kernel log message is reported for the nct6775 driver on ASUS WS X299 SAGE. nct6775: Found NCT6796D or compatible chip at 0x2e:0x290 nct6775 nct6775.656: Invalid temperature source 11 at index 0, source register 0x100, temp register 0x73 nct6775 nct6775.656: Invalid temperature source 11 at index 2, source register 0x300, temp register 0x77 nct6775 nct6775.656: Invalid temperature source 11 at index 3, source register 0x800, temp register 0x79 nct6775 nct6775.656: Invalid temperature source 11 at index 4, source register 0x900, temp register 0x7b A recent version of the datasheet lists temperature source 11 as reserved. However, an older version of the datasheet lists temperature sources 10 and 11 as supported virtual temperature sources. Apparently the older version of the datasheet is correct, so list those temperature sources as supported. Virtual temperature sources are different than other temperature sources: Values are not read from a temperature sensor, but written either from BIOS or an embedded controller. As such, each virtual temperature has to be reported. Since there is now more than one temperature source, we have to keep virtual temperature sources in a chip-specific mask and can no longer rely on the assumption that there is only one virtual temperature source with a fixed index. This accounts for most of the complexity of this patch. Reported-by: NRobert Kern <ulteq@web.de> Cc: Robert Kern <ulteq@web.de> Fixes: 81820059 ("hwmon: (nct6775) Add support for NCT6796D") Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 08 9月, 2018 1 次提交
-
-
由 Guenter Roeck 提交于
Not all fans have a fan pulse register. This can result in reading beyond the end of REG_FAN_PULSES and FAN_PULSE_SHIFT arrays, and was reported by smatch as possible error. 1672 for (i = 0; i < ARRAY_SIZE(data->rpm); i++) { ^^^^^^^^^^^^^^^^^^^^^^^^ This is a 7 element array. ... 1685 data->fan_pulses[i] = 1686 (nct6775_read_value(data, data->REG_FAN_PULSES[i]) 1687 >> data->FAN_PULSE_SHIFT[i]) & 0x03; ^^^^^^^^^^^^^^^^^^^^^^^^ FAN_PULSE_SHIFT is either 5 or 6 elements. To fix the problem, we have to ensure that all REG_FAN_PULSES and FAN_PULSE_SHIFT have the appropriate length, and that REG_FAN_PULSES is only read if the register actually exists. Fixes: 6c009501 ("hwmon: (nct6775) Add support for NCT6102D/6106D") Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 06 9月, 2018 1 次提交
-
-
由 Dan Carpenter 提交于
This is dead code because j can never be 1 at this point. We had intended to just test if the bit was clear. Fixes: bbd8decd ("hwmon: (nct6775) Add support for weighted fan control") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 27 8月, 2018 1 次提交
-
-
由 Gustavo A. R. Silva 提交于
val can be indirectly controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. This issue was detected with the help of Smatch: vers/hwmon/nct6775.c:2698 store_pwm_weight_temp_sel() warn: potential spectre issue 'data->temp_src' [r] Fix this by sanitizing val before using it to index data->temp_src Notice that given that speculation windows are large, the policy is to kill the speculation on the first load and not worry if it can be completed with a dependent load/store [1]. [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2 Cc: stable@vger.kernel.org Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-