platform/kernel/linux-rpi.git
18 months agohwmon: max6621: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:35 +0000 (22:30 +0200)]
hwmon: max6621: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: max6620: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:34 +0000 (22:30 +0200)]
hwmon: max6620: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: max31790: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:33 +0000 (22:30 +0200)]
hwmon: max31790: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: max31760: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:32 +0000 (22:30 +0200)]
hwmon: max31760: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: max31730: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:31 +0000 (22:30 +0200)]
hwmon: max31730: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: max127: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:30 +0000 (22:30 +0200)]
hwmon: max127: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: ltq-cputemp: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:29 +0000 (22:30 +0200)]
hwmon: ltq-cputemp: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: ltc4245: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:28 +0000 (22:30 +0200)]
hwmon: ltc4245: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: ltc2992: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:27 +0000 (22:30 +0200)]
hwmon: ltc2992: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: ltc2947: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:26 +0000 (22:30 +0200)]
hwmon: ltc2947: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: lochnagar: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:25 +0000 (22:30 +0200)]
hwmon: lochnagar: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: lm95245: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:24 +0000 (22:30 +0200)]
hwmon: lm95245: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: lm95241: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:23 +0000 (22:30 +0200)]
hwmon: lm95241: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: lm83: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:22 +0000 (22:30 +0200)]
hwmon: lm83: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: lm75: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:21 +0000 (22:30 +0200)]
hwmon: lm75: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: lan966x: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:20 +0000 (22:30 +0200)]
hwmon: lan966x: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: k8temp: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:19 +0000 (22:30 +0200)]
hwmon: k8temp: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: k10temp: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:18 +0000 (22:30 +0200)]
hwmon: k10temp: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: jc42: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:17 +0000 (22:30 +0200)]
hwmon: jc42: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: intel-m10-bmc: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:16 +0000 (22:30 +0200)]
hwmon: intel-m10-bmc: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: ina3221: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:15 +0000 (22:30 +0200)]
hwmon: ina3221: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: ina238: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:14 +0000 (22:30 +0200)]
hwmon: ina238: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: i5500_temp: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:13 +0000 (22:30 +0200)]
hwmon: i5500_temp: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: gxp-fan: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:12 +0000 (22:30 +0200)]
hwmon: gxp-fan: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: ftsteutates: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:11 +0000 (22:30 +0200)]
hwmon: ftsteutates: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: emc2305: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:10 +0000 (22:30 +0200)]
hwmon: emc2305: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: drivetemp: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:09 +0000 (22:30 +0200)]
hwmon: drivetemp: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: dell-smm: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:08 +0000 (22:30 +0200)]
hwmon: dell-smm: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: corsair: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:07 +0000 (22:30 +0200)]
hwmon: corsair: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: bt1-pvt: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:06 +0000 (22:30 +0200)]
hwmon: bt1-pvt: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: axi-fan: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:05 +0000 (22:30 +0200)]
hwmon: axi-fan: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: as370: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:04 +0000 (22:30 +0200)]
hwmon: as370: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: aquacomputer: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:03 +0000 (22:30 +0200)]
hwmon: aquacomputer: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: aht10: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:02 +0000 (22:30 +0200)]
hwmon: aht10: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: adt7x10: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:01 +0000 (22:30 +0200)]
hwmon: adt7x10: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: adt7470: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:30:00 +0000 (22:30 +0200)]
hwmon: adt7470: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: adt7411: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:29:59 +0000 (22:29 +0200)]
hwmon: adt7411: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: adm9240: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:29:58 +0000 (22:29 +0200)]
hwmon: adm9240: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: adm1177: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:29:57 +0000 (22:29 +0200)]
hwmon: adm1177: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agoMAINTAINERS: hwmon: drop Agathe Porte
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:47:50 +0000 (22:47 +0200)]
MAINTAINERS: hwmon: drop Agathe Porte

Mails to Agathe Porte bounce ("550 5.4.1 Recipient address rejected:
Access denied. AS(201806281)").

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230406204750.3017850-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (nct6775) update ASUS WMI monitoring list B360/H410/H610/Z390...
Denis Pauk [Thu, 23 Mar 2023 21:27:51 +0000 (23:27 +0200)]
hwmon: (nct6775) update ASUS WMI monitoring list B360/H410/H610/Z390...

Boards such as
* EX-B460M-V5,
* EX-H410M-V3,
* PRIME B360M-D,
* PRIME B360M-K,
* PRIME H410M-A,
* PRIME H410M-D,
* PRIME H410M-E,
* PRIME H410M-F,
* PRIME H410M-K,
* PRIME H410M-K R2.0,
* PRIME H510M-K R2.0,
* PRIME Z390-A,
* PRIME Z390-A/H10,
* PRIME Z390-P,
* PRIME Z390M-PLUS,
* PRIME Z490-A,
* PRIME Z490-P,
* PRIME Z490-V,
* PRIME Z490M-PLUS,
* PRO B460M-C,
* PRO H410M-C,
* ROG MAXIMUS XI APEX,
* ROG MAXIMUS XI CODE,
* ROG MAXIMUS XI EXTREME,
* ROG MAXIMUS XI FORMULA,
* ROG MAXIMUS XI GENE,
* ROG MAXIMUS XI HERO,
* ROG MAXIMUS XI HERO (WI-FI),
* ROG MAXIMUS XII APEX,
* ROG MAXIMUS XII EXTREME,
* ROG MAXIMUS XII FORMULA,
* ROG MAXIMUS XII HERO (WI-FI),
* ROG STRIX B460-F GAMING,
* ROG STRIX B460-G GAMING,
* ROG STRIX B460-H GAMING,
* ROG STRIX B460-I GAMING,
* TUF GAMING B460-PLUS,
* TUF GAMING B460-PRO (WI-FI),
* TUF GAMING B460M-PLUS,
* TUF GAMING B460M-PLUS (WI-FI),
* TUF GAMING B460M-PRO,
* TUF GAMING B550-PLUS (WI-FI),
* TUF GAMING B550M ZAKU (WI-FI),
* TUF Z390-PLUS GAMING,
* TUF Z390-PLUS GAMING (WI-FI),
* TUF Z390-PRO GAMING,
* TUF Z390M-PRO GAMING,
* TUF Z390M-PRO GAMING (WI-FI),
* WS Z390 PRO,
* B560M-P,
* EX-B560M-V5,
* EX-H510M-V3,
* EX-H610M-V3 D4,
* PRIME B560-PLUS,
* PRIME B560-PLUS AC-HES,
* PRIME B560M-A,
* PRIME B560M-A AC,
* PRIME B560M-K,
* PRIME B660-PLUS D4,
* PRIME H510M-A,
* PRIME H510M-A WIFI,
* PRIME H510M-D,
* PRIME H510M-E,
* PRIME H510M-F,
* PRIME H510M-K,
* PRIME H610I-PLUS D4,
* PRIME H610M-A D4,
* PRIME H610M-A WIFI D4,
* PRIME H610M-D D4,
* PRIME H610M-E D4,
* PRIME H610M-F D4,
* PRIME H610M-K D4,
* PRIME Z690-A,
* PRIME Z690-P,
* PRIME Z690-P D4,
* PRIME Z690-P WIFI,
* PRIME Z690-P WIFI D4,
* PRIME Z690M-PLUS D4,
* PRIME Z790-A WIFI,
* PRIME Z790-P,
* PRIME Z790-P D4,
* PRIME Z790-P WIFI,
* PRIME Z790-P WIFI D4,
* PRIME Z790M-PLUS,
* PRIME Z790M-PLUS D4,
* Pro B560M-C,
* Pro B560M-CT,
* Pro H510M-C,
* Pro H510M-CT,
* Pro H610M-C,
* Pro H610M-C D4,
* Pro H610M-CT D4,
* Pro H610T D4,
* ProArt Z690-CREATOR WIFI,
* ROG MAXIMUS Z690 HERO EVA,
* ROG MAXIMUS Z790 APEX,
* ROG MAXIMUS Z790 HERO,
* ROG STRIX B560-A GAMING WIFI,
* ROG STRIX B560-E GAMING WIFI,
* ROG STRIX B560-F GAMING WIFI,
* ROG STRIX B560-G GAMING WIFI,
* ROG STRIX B560-I GAMING WIFI,
* ROG STRIX Z690-A GAMING WIFI,
* ROG STRIX Z690-I GAMING WIFI,
* ROG STRIX Z790-A GAMING WIFI,
* ROG STRIX Z790-A GAMING WIFI D4,
* ROG STRIX Z790-E GAMING WIFI,
* ROG STRIX Z790-F GAMING WIFI,
* ROG STRIX Z790-H GAMING WIFI,
* ROG STRIX Z790-I GAMING WIFI,
* TUF GAMING B560-PLUS WIFI,
* TUF GAMING B560M-E,
* TUF GAMING B560M-PLUS,
* TUF GAMING B560M-PLUS WIFI,
* TUF GAMING Z690-PLUS,
* TUF GAMING Z690-PLUS D4,
* TUF GAMING Z690-PLUS WIFI,
* TUF GAMING Z690-PLUS WIFI D4,
* TUF GAMING Z790-PLUS D4,
* TUF GAMING Z790-PLUS WIFI,
* TUF GAMING Z790-PLUS WIFI D4,
have got a nct6775 chip, but by default there's no use of it
because of resource conflict with WMI method.

This commit adds such boards to the WMI monitoring list.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807
Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
Tested-by: Alejandro González <alejandro.gonzalez.correo@gmail.com>
Tested-by: bruno <bmilreu@gmail.com>
Tested-by: renedis <renedis@hotmail.com>
Link: https://lore.kernel.org/r/20230323212751.2474-3-pauk.denis@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (nct6775) Fix ROG B550-XE WIFI and Pro B660M-C D4 names
Denis Pauk [Thu, 23 Mar 2023 21:27:50 +0000 (23:27 +0200)]
hwmon: (nct6775) Fix ROG B550-XE WIFI and Pro B660M-C D4 names

ROG STRIX B550-XE GAMING WIFI motherboard is incorrectly named as
ROG STRIX B550-XE GAMING (WI-FI).

Pro B660M-C D4 motherboard is incorrectly named as
Pro B660M-C-D4.

Validated by dmidecode output from https://github.com/linuxhw/DMI/

Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807
Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
Link: https://lore.kernel.org/r/20230323212751.2474-2-pauk.denis@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (nct6775) Sort ASUS board list
Denis Pauk [Thu, 23 Mar 2023 21:27:49 +0000 (23:27 +0200)]
hwmon: (nct6775) Sort ASUS board list

Rearrange board list in alphabetical order by: LC_ALL=C sort -u

Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807
Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
Link: https://lore.kernel.org/r/20230323212751.2474-1-pauk.denis@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: remove unused superio_outb function
Tom Rix [Thu, 23 Mar 2023 21:15:35 +0000 (17:15 -0400)]
hwmon: remove unused superio_outb function

clang with W=1 reports
drivers/hwmon/vt1211.c:198:20: error: unused function
  'superio_outb' [-Werror,-Wunused-function]
static inline void superio_outb(int sio_cip, int reg, int val)
                   ^
This function is not used so remove it.

Signed-off-by: Tom Rix <trix@redhat.com>
Acked-by: Juerg Haefliger <juergh@proton.me>
Link: https://lore.kernel.org/r/20230323211535.2637939-1-trix@redhat.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (pwm-fan) set usage_power on PWM state
Lorenz Brun [Thu, 9 Mar 2023 01:10:08 +0000 (02:10 +0100)]
hwmon: (pwm-fan) set usage_power on PWM state

PWM fans are controlled solely by the duty cycle of the PWM signal, they
do not care about the exact timing. Thus set usage_power to true to
allow less flexible hardware to work as a PWM source for fan control.

Signed-off-by: Lorenz Brun <lorenz@brun.one>
Link: https://lore.kernel.org/r/20230309011009.2109696-1-lorenz@brun.one
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (it87) Use voltage scaling macro where appropriate
Frank Crawford [Sat, 18 Mar 2023 08:05:43 +0000 (19:05 +1100)]
hwmon: (it87) Use voltage scaling macro where appropriate

Apply scaling macro to match the labels for internal voltage sensors.

Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
Link: https://lore.kernel.org/r/20230318080543.1226700-3-frank@crawford.emu.id.au
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (nct6775) update ASUS WMI monitoring list A520/B360/B460/B550...
Denis Pauk [Wed, 15 Mar 2023 22:51:28 +0000 (00:51 +0200)]
hwmon: (nct6775) update ASUS WMI monitoring list A520/B360/B460/B550...

Boards such as
* EX-B660M-V5 D4,
* PRIME A520M-A,
* PRIME A520M-A II,
* PRIME A520M-E,
* PRIME A520M-K,
* PRIME B360M-A,
* PRIME B360M-C,
* PRIME B460M-A R2.0,
* PRIME B550M-A AC,
* PRIME B550M-A WIFI II,
* PRIME B550M-K,
* PRIME B650M-A AX II,
* PRIME Z590-P WIFI,
* PRIME Z590-V,
* Pro A520M-C,
* ProArt B650-CREATOR,
* ProArt Z790-CREATOR WIFI,
* Pro B660M-C,
* Pro WS W680-ACE,
* Pro WS W680-ACE IPMI,
* ROG MAXIMUS XIII APEX,
* ROG MAXIMUS XIII EXTREME,
* ROG MAXIMUS XIII HERO,
* ROG MAXIMUS Z690 APEX,
* ROG MAXIMUS Z790 EXTREME,
* ROG STRIX B660-A GAMING WIFI,
* ROG STRIX Z590-A GAMING WIFI,
* ROG STRIX Z590-E GAMING WIFI,
* ROG STRIX Z590-F GAMING WIFI,
* ROG STRIX Z590-I GAMING WIFI,
* TUF GAMING A520M-PLUS,
* TUF GAMING A520M-PLUS II,
* TUF GAMING A520M-PLUS WIFI,
* TUF GAMING B660M-E D4,
* TUF GAMING B660-PLUS WIFI D4,
* TUF GAMING X570-PLUS_BR,
* TUF GAMING Z590-PLUS,
* Z490-GUNDAM (WI-FI),
* Z590 WIFI GUNDAM EDITION
have got a nct6775 chip, but by default there's no use of it
because of resource conflict with WMI method.

This commit adds such boards to the WMI monitoring list.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807
Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
Tested-by: Nick Owens <mischief@offblast.org>
Tested-by: A. M. <de99like@mennucci.debian.net>
Link: https://lore.kernel.org/r/20230315225128.1236-1-pauk.denis@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (nct6775) Fix TUF GAMING B550M-E WIFI name
Denis Pauk [Wed, 15 Mar 2023 21:01:34 +0000 (23:01 +0200)]
hwmon: (nct6775) Fix TUF GAMING B550M-E WIFI name

TUF GAMING B550M-E WIFI motherboard is incorrectly named as
TUF GAMING B550M-E (WI-FI).

Validated by dmidecode output from https://github.com/linuxhw/DMI/

Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807
Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
Link: https://lore.kernel.org/r/20230315210135.2155-1-pauk.denis@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (nct6775) add Asus Pro A520M-C II/CSM
Holger Kiehl [Mon, 13 Mar 2023 13:10:31 +0000 (13:10 +0000)]
hwmon: (nct6775) add Asus Pro A520M-C II/CSM

An NCT6798D chip is now detected:

   dmesg|grep nct6775
   [   23.765392] nct6775: Found NCT6798D or compatible chip at 0x2e:0x290

And sensors now shows:

   nct6798-isa-0290
   Adapter: ISA adapter
   in0:                      312.00 mV (min =  +0.00 V, max =  +1.74 V)
   in1:                        1.02 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
   in2:                        3.42 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
   in3:                        3.38 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
   in4:                        1.03 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
   in5:                        1.02 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
   in6:                      200.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
   in7:                        3.42 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
   in8:                        3.28 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
   in9:                      920.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
   in10:                     512.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
   in11:                     504.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
   in12:                       1.03 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
   in13:                     256.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
   in14:                       1.47 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
   fan1:                        0 RPM  (min =    0 RPM)
   fan2:                        0 RPM  (min =    0 RPM)
   fan3:                      355 RPM  (min =    0 RPM)
   fan7:                        0 RPM  (min =    0 RPM)
   SYSTIN:                    +25.0°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
   CPUTIN:                    +26.5°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
   AUXTIN0:                   +97.0°C    sensor = thermistor
   AUXTIN1:                   +25.0°C    sensor = thermistor
   AUXTIN2:                   +25.0°C    sensor = thermistor
   AUXTIN3:                    +1.0°C    sensor = thermistor
   PECI Agent 0 Calibration:  +26.0°C
   PCH_CHIP_CPU_MAX_TEMP:      +0.0°C
   PCH_CHIP_TEMP:              +0.0°C
   PCH_CPU_TEMP:               +0.0°C
   TSI0_TEMP:                 +27.9°C
   intrusion0:               ALARM
   intrusion1:               OK
   beep_enable:              disabled

Signed-off-by: Holger Kiehl <holger.kiehl@dwd.de>
Tested-by: Holger Kiehl <holger.kiehl@dwd.de>
Link: https://lore.kernel.org/r/868bdc4f-9d45-475c-963e-f5232a8b95@praktifix.dwd.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agoDocumentation/hwmon: Remove description of deprecated registration functions
Guenter Roeck [Wed, 15 Mar 2023 21:41:30 +0000 (14:41 -0700)]
Documentation/hwmon: Remove description of deprecated registration functions

Remove description of deprecated registration functions from the hardware
monitoring kernel API documentation to help ensure that no attempts are
made to use them in new drivers.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agodocs: hwmon: sysfs-interface: Fix stray colon
Stefan Wahren [Sun, 12 Mar 2023 15:57:14 +0000 (16:57 +0100)]
docs: hwmon: sysfs-interface: Fix stray colon

The commit 036d6a4e75c9 ("ABI: sysfs-class-hwmon: add ABI documentation
for it") moved all ABI attributes to the usual ABI documentation. But this
change left a stray colon for the fan speed control method. Fix this
to avoid a confusion of readers.

Fixes: 036d6a4e75c9 ("ABI: sysfs-class-hwmon: add ABI documentation for it")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/20230312155714.17290-1-stefan.wahren@i2se.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (pmbus/core) Notify hwmon events
Patrick Rudolph [Wed, 1 Mar 2023 16:44:34 +0000 (17:44 +0100)]
hwmon: (pmbus/core) Notify hwmon events

Notify hwmon events using the pmbus irq handler.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Link: https://lore.kernel.org/r/20230301164434.1928237-4-Naresh.Solanki@9elements.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (pmbus/core) Add interrupt support
Patrick Rudolph [Wed, 1 Mar 2023 16:44:33 +0000 (17:44 +0100)]
hwmon: (pmbus/core) Add interrupt support

Implement PMBUS irq handler.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Link: https://lore.kernel.org/r/20230301164434.1928237-3-Naresh.Solanki@9elements.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (pmbus/core) Generalise pmbus get status
Naresh Solanki [Wed, 1 Mar 2023 16:44:32 +0000 (17:44 +0100)]
hwmon: (pmbus/core) Generalise pmbus get status

Add function pmbus get status that can be used to get both pmbus
specific status & regulator status

Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
...
Change in V4
- None
Changes in V3:
- Add pmbus_is_enabled function
Changes in V2:
- Add __maybe attribute for pmbus_get_status function
- Remove unrelated changes
Link: https://lore.kernel.org/r/20230301164434.1928237-2-Naresh.Solanki@9elements.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (pmbus/core) Generalize pmbus status flag map
Naresh Solanki [Wed, 1 Mar 2023 16:44:31 +0000 (17:44 +0100)]
hwmon: (pmbus/core) Generalize pmbus status flag map

The PMBus status flag map(pmbus_regulator_status_flag_map) is moved
outside of the regulator #if block and the associated variable/struct
name updated to reflect as generic PMBus status.

This will make the PMBus status flag map more versatile and easier to
incorporate into different contexts and functions.

Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230301164434.1928237-1-Naresh.Solanki@9elements.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (aquacomputer_d5next) Add fan PWM control for Aquaero
Leonard Anderweit [Tue, 14 Feb 2023 22:02:21 +0000 (23:02 +0100)]
hwmon: (aquacomputer_d5next) Add fan PWM control for Aquaero

Add the option to control fan PWM on Aquacomputer Aquaero. The Aquaero is
the most complex Aquacomputer device, control is therefore more complicated
then on already supported devices.
Setting PWM requires multiple steps. First, an internal static PWM
controller is set to the desired PWM value. Second, the fan is set to use
that PWM controller. Last, the minimum and maximum accepted PWM values
of the fan are set to allow all possible PWM values.

Signed-off-by: Leonard Anderweit <leonard.anderweit@gmail.com>
Link: https://lore.kernel.org/r/20230214220221.15003-7-leonard.anderweit@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (aquacomputer_d5next) Add temperature offset control for Aquaero
Leonard Anderweit [Tue, 14 Feb 2023 22:02:20 +0000 (23:02 +0100)]
hwmon: (aquacomputer_d5next) Add temperature offset control for Aquaero

Adds control over the Aquacomputer Aquaero temperature offset for all eight
temperature sensors.

Signed-off-by: Leonard Anderweit <leonard.anderweit@gmail.com>
Link: https://lore.kernel.org/r/20230214220221.15003-6-leonard.anderweit@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (aquacomputer_d5next) Add infrastructure for Aquaero control reports
Leonard Anderweit [Tue, 14 Feb 2023 22:02:19 +0000 (23:02 +0100)]
hwmon: (aquacomputer_d5next) Add infrastructure for Aquaero control reports

Add information on the Aquacomputer Aquaero control report and disable the
control report checksum for Aquaero. The Aquaero does not use the checksum
so it must be disabled to avoid overwriting the last two bytes of the
control report.

Signed-off-by: Leonard Anderweit <leonard.anderweit@gmail.com>
Link: https://lore.kernel.org/r/20230214220221.15003-5-leonard.anderweit@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (aquacomputer_d5next) Device dependent control report settings
Leonard Anderweit [Tue, 14 Feb 2023 22:02:18 +0000 (23:02 +0100)]
hwmon: (aquacomputer_d5next) Device dependent control report settings

Add device dependent control report id, secondary control report id,
secondary control report size and secondary control report for devices
which need different control report settings. All currently supported
devices use the same values.

Signed-off-by: Leonard Anderweit <leonard.anderweit@gmail.com>
Link: https://lore.kernel.org/r/20230214220221.15003-4-leonard.anderweit@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (aquacomputer_d5next) Support writing multiple control values at once
Leonard Anderweit [Tue, 14 Feb 2023 22:02:17 +0000 (23:02 +0100)]
hwmon: (aquacomputer_d5next) Support writing multiple control values at once

Add new function aqc_set_ctrl_vals() to support changing multiple control
values at once while sending only one control report.

Signed-off-by: Leonard Anderweit <leonard.anderweit@gmail.com>
Link: https://lore.kernel.org/r/20230214220221.15003-3-leonard.anderweit@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (aquacomputer_d5next) Support one byte control values
Leonard Anderweit [Tue, 14 Feb 2023 22:02:16 +0000 (23:02 +0100)]
hwmon: (aquacomputer_d5next) Support one byte control values

Add support for one byte control values. This extends aqc_set_ctrl_val()
and aqc_get_ctrl_val() with a type. Currently supported types are AQC_8
(one byte) and AQC_BE16 (two bytes big endian). More types will be added
in the future.

Signed-off-by: Leonard Anderweit <leonard.anderweit@gmail.com>
Link: https://lore.kernel.org/r/20230214220221.15003-2-leonard.anderweit@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (nct6775) ASUS PRIME Z590 boards support
Erik Ekman [Mon, 27 Feb 2023 09:03:11 +0000 (10:03 +0100)]
hwmon: (nct6775) ASUS PRIME Z590 boards support

Tested on Z590M-PLUS.

dmesg log:
nct6775: Found NCT6798D or compatible chip at 0x2e:0x290

sensors output:
nct6798-isa-0290
Adapter: ISA adapter
in0:                      672.00 mV (min =  +0.00 V, max =  +1.74 V)
in1:                      1000.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in2:                        3.38 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in3:                        3.28 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in4:                        1.01 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in5:                      808.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in6:                      1000.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in7:                        3.38 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in8:                        3.20 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in9:                      528.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in10:                     672.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in11:                     528.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in12:                       1.21 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in13:                     992.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in14:                       1.02 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
fan1:                      971 RPM  (min =    0 RPM)
fan2:                     1525 RPM  (min =    0 RPM)
fan3:                        0 RPM  (min =    0 RPM)
fan4:                     1094 RPM  (min =    0 RPM)
fan5:                        0 RPM  (min =    0 RPM)
fan6:                        0 RPM  (min =    0 RPM)
fan7:                        0 RPM  (min =    0 RPM)
SYSTIN:                    +36.0°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
CPUTIN:                    +40.0°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
AUXTIN0:                   +26.0°C    sensor = thermistor
AUXTIN1:                    +8.0°C    sensor = thermistor
AUXTIN2:                   +22.0°C    sensor = thermistor
AUXTIN3:                   +25.0°C    sensor = thermistor
PECI Agent 0 Calibration:  +40.0°C
PCH_CHIP_CPU_MAX_TEMP:      +0.0°C
PCH_CHIP_TEMP:             +55.0°C
PCH_CPU_TEMP:               +0.0°C
intrusion0:               OK
intrusion1:               ALARM
beep_enable:              disabled

Signed-off-by: Erik Ekman <erik@kryo.se>
Link: https://lore.kernel.org/r/20230227090312.91091-1-erik@kryo.se
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (g762) add a check of devm_add_action in g762_of_clock_enable
Kang Chen [Mon, 27 Feb 2023 03:09:12 +0000 (11:09 +0800)]
hwmon: (g762) add a check of devm_add_action in g762_of_clock_enable

devm_add_action may fails, check it and do the cleanup.

Signed-off-by: Kang Chen <void0red@gmail.com>
Link: https://lore.kernel.org/r/20230227030913.893004-1-void0red@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (nzxt-smart2) handle failure of devm_add_action in nzxt_smart2_hid_probe
Kang Chen [Mon, 27 Feb 2023 09:15:34 +0000 (17:15 +0800)]
hwmon: (nzxt-smart2) handle failure of devm_add_action in nzxt_smart2_hid_probe

1. replace the devm_add_action with devm_add_action_or_reset to ensure
the mutex lock can be destroyed when it fails.
2. use local wrapper function mutex_fini instead of mutex_destroy to
avoid undefined behaviours.
3. add a check of devm_add_action_or_reset and return early when it fails.

Link: https://lore.kernel.org/all/f5043281-9b3e-e454-16fe-ef4cde36dfdb@roeck-us.net
Signed-off-by: Kang Chen <void0red@gmail.com>
Link: https://lore.kernel.org/r/20230227091534.907101-1-void0red@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (ftsteutates) Update specifications website
Armin Wolf [Sun, 26 Feb 2023 01:48:30 +0000 (02:48 +0100)]
hwmon: (ftsteutates) Update specifications website

The Fujitsu OEM Mainboard business was acquired by Kontron,
so the specifications of the Teutates chip was transferred to
the new Kontron FTP server.

Update the specifications website accordingly. The outdated
sensors how-to was omitted.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20230226014830.10929-1-W_Armin@gmx.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (ibmpowernv, pwm-fan) Use of_property_present() for testing DT property presence
Rob Herring [Fri, 10 Mar 2023 14:47:06 +0000 (08:47 -0600)]
hwmon: (ibmpowernv, pwm-fan) Use of_property_present() for testing DT property presence

It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties. As
part of this, convert of_get_property/of_find_property calls to the
recently added of_property_present() helper when we just want to test
for presence of a property and nothing more.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230310144706.1542434-1-robh@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (ltc4245) Use of_property_read_bool() for boolean properties
Rob Herring [Fri, 10 Mar 2023 14:47:07 +0000 (08:47 -0600)]
hwmon: (ltc4245) Use of_property_read_bool() for boolean properties

It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties.
Convert reading boolean properties to of_property_read_bool().

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230310144707.1542525-1-robh@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (nct6775) Drop unneeded casting and conjunction
Andy Shevchenko [Fri, 17 Feb 2023 19:16:00 +0000 (21:16 +0200)]
hwmon: (nct6775) Drop unneeded casting and conjunction

The 64-bit result will be cut to 32-bit automatically (by compiler)
due to the type of the destination value. No need to have an explicit
casting and especially additional conjunction which does the same.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230217191600.24837-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (nzxt-smart2) add another USB ID
Aleksandr Mezin [Sun, 19 Feb 2023 10:59:19 +0000 (12:59 +0200)]
hwmon: (nzxt-smart2) add another USB ID

This seems to be a new revision of the device. RGB controls have changed,
but this driver doesn't touch them anyway.

Fan speed control reported to be working with existing userspace (hidraw)
software, so I assume it's compatible. Fan channel count is the same.

Recently added (0x1e71, 0x2019) seems to be the same device.

Discovered in liquidctl project:

https://github.com/liquidctl/liquidctl/issues/541

Signed-off-by: Aleksandr Mezin <mezin.alexander@gmail.com>
Link: https://lore.kernel.org/r/20230219105924.333007-1-mezin.alexander@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agohwmon: (gpio-fan) drop of_match_ptr for ID table
Krzysztof Kozlowski [Sun, 12 Mar 2023 19:37:22 +0000 (20:37 +0100)]
hwmon: (gpio-fan) drop of_match_ptr for ID table

The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it might not be relevant here).  This
also fixes !CONFIG_OF error:

  drivers/hwmon/gpio-fan.c:484:34: error: â€˜of_gpio_fan_match’ defined but not used [-Werror=unused-const-variable=]

Note(groeck): The build error is only seen if Kconfig dependencies
are messed up. The driver depends on OF_GPIO which should depend
on OF. This was temporarily broken in linux-next, and it was
possible to select CONFIG_OF=n and CONFIG_SENSORS_GPIO_FAN=y.
Nevertheless, this is a sensible fix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230312193723.478032-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
18 months agoMerge branch 'hwmon-const' into HEAD
Guenter Roeck [Wed, 19 Apr 2023 14:08:24 +0000 (07:08 -0700)]
Merge branch 'hwmon-const' into HEAD

18 months agohwmon: (k10temp) Check range scale when CUR_TEMP register is read-write
Babu Moger [Thu, 13 Apr 2023 21:39:58 +0000 (16:39 -0500)]
hwmon: (k10temp) Check range scale when CUR_TEMP register is read-write

Spec says, when CUR_TEMP_TJ_SEL == 3 and CUR_TEMP_RANGE_SEL == 0,
it should use RangeUnadjusted is 0, which is (CurTmp*0.125 -49) C. The
CUR_TEMP register is read-write when CUR_TEMP_TJ_SEL == 3 (bit 17-16).

Add the check to detect it.

Sensors command's output before the patch.
$sensors
 k10temp-pci-00c3
 Adapter: PCI adapter
 Tctl:         +76.6°C <- Wrong value
 Tccd1:        +26.5°C
 Tccd2:        +27.5°C
 Tccd3:        +27.2°C
 Tccd4:        +27.5°C
 Tccd5:        +26.0°C
 Tccd6:        +26.2°C
 Tccd7:        +25.0°C
 Tccd8:        +26.5°C

Sensors command's output after the patch.
$sensors
 k10temp-pci-00c3
 Adapter: PCI adapter
 Tctl:         +28.8°C <- corrected value
 Tccd1:        +27.5°C
 Tccd2:        +28.5°C
 Tccd3:        +28.5°C
 Tccd4:        +28.5°C
 Tccd5:        +27.0°C
 Tccd6:        +27.5°C
 Tccd7:        +27.0°C
 Tccd8:        +27.5°C

Signed-off-by: Babu Moger <babu.moger@amd.com>
Fixes: 1b59788979ac ("hwmon: (k10temp) Add temperature offset for Ryzen 2700X")
Link: https://lore.kernel.org/r/20230413213958.847634-1-babu.moger@amd.com
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
19 months agohwmon: constify pointers to hwmon_channel_info
Krzysztof Kozlowski [Thu, 6 Apr 2023 20:29:56 +0000 (22:29 +0200)]
hwmon: constify pointers to hwmon_channel_info

HWmon core receives an array of pointers to hwmon_channel_info and it
does not modify it, thus it can be array of const pointers for safety.
This allows drivers to make them also const.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
19 months agoLinux 6.3-rc5
Linus Torvalds [Sun, 2 Apr 2023 21:29:29 +0000 (14:29 -0700)]
Linux 6.3-rc5

19 months agoMerge tag 'for-6.3-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave...
Linus Torvalds [Sun, 2 Apr 2023 17:57:12 +0000 (10:57 -0700)]
Merge tag 'for-6.3-rc4-tag' of git://git./linux/kernel/git/kdave/linux

Pull btrfs fixes from David Sterba:

 - scan block devices in non-exclusive mode to avoid temporary mkfs
   failures

 - fix race between quota disable and quota assign ioctls

 - fix deadlock when aborting transaction during relocation with scrub

 - ignore fiemap path cache when there are multiple paths for a node

* tag 'for-6.3-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  btrfs: ignore fiemap path cache when there are multiple paths for a node
  btrfs: fix deadlock when aborting transaction during relocation with scrub
  btrfs: scan device in non-exclusive mode
  btrfs: fix race between quota disable and quota assign ioctls

19 months agoRevert "venus: firmware: Correct non-pix start and end addresses"
Javier Martinez Canillas [Tue, 7 Feb 2023 10:22:54 +0000 (11:22 +0100)]
Revert "venus: firmware: Correct non-pix start and end addresses"

This reverts commit a837e5161cff, which broke probing of the venus
driver, at least on the SC7180 SoC HP X2 Chromebook:

  qcom-venus aa00000.video-codec: Adding to iommu group 11
  qcom-venus aa00000.video-codec: non legacy binding
  qcom-venus aa00000.video-codec: failed to reset venus core
  qcom-venus: probe of aa00000.video-codec failed with error -110

Matthias Kaehlcke also reported that the same change caused a regression
in SC7180 and sc7280, that prevents AOSS from entering sleep mode during
system suspend.  So let's revert this commit for now to fix both issues.

Fixes: a837e5161cff ("venus: firmware: Correct non-pix start and end addresses")
Reported-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
19 months agoMerge tag 'driver-core-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 2 Apr 2023 17:10:16 +0000 (10:10 -0700)]
Merge tag 'driver-core-6.3-rc5' of git://git./linux/kernel/git/gregkh/driver-core

Pull driver core fixes from Greg KH:
 "Here are three small changes for 6.3-rc5 semi-related to driver core
  stuff:

   - documentation update where we move the security_bugs file to a more
     relevant location.

   - mdt/spi-nor debugfs memory leak fix that's been floating around for
     a long time and acked by the maintainer

   - cacheinfo bugfix for a regression in 6.3-rc1

  All have been in linux-next with no reported problems"

* tag 'driver-core-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  cacheinfo: Fix LLC is not exported through sysfs
  Documentation/security-bugs: move from admin-guide/ to process/
  mtd: spi-nor: fix memory leak when using debugfs_lookup()

19 months agoMerge tag 'powerpc-6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
Linus Torvalds [Sun, 2 Apr 2023 17:01:56 +0000 (10:01 -0700)]
Merge tag 'powerpc-6.3-4' of git://git./linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:

 - Fix a false positive warning in __pte_needs_flush() (with DEBUG_VM=y)

 - Fix oops when a PF_IO_WORKER thread tries to core dump

 - Don't try to reconfigure VAS when it's disabled

Thanks to Benjamin Gray, Haren Myneni, Jens Axboe, Nathan Lynch, and
Russell Currey.

* tag 'powerpc-6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/pseries/vas: Ignore VAS update for DLPAR if copy/paste is not enabled
  powerpc: Don't try to copy PPR for task with NULL pt_regs
  powerpc/64s: Fix __pte_needs_flush() false positive warning

19 months agoMerge tag '6.3-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Sat, 1 Apr 2023 21:50:22 +0000 (14:50 -0700)]
Merge tag '6.3-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs client fixes from Steve French:
 "Four cifs/smb3 client (reconnect and DFS related) fixes, including two
  for stable:

   - DFS oops fix

   - DFS reconnect recursion fix

   - An SMB1 parallel reconnect fix

   - Trivial dead code removal in smb2_reconnect"

* tag '6.3-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: get rid of dead check in smb2_reconnect()
  cifs: prevent infinite recursion in CIFSGetDFSRefer()
  cifs: avoid races in parallel reconnects in smb1
  cifs: fix DFS traversal oops without CONFIG_CIFS_DFS_UPCALL

19 months agoMerge tag 'input-for-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor...
Linus Torvalds [Sat, 1 Apr 2023 21:09:51 +0000 (14:09 -0700)]
Merge tag 'input-for-v6.3-rc4' of git://git./linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:

 - fixes to ALPS and Focaltech PS/2 drivers dealing with the breakage of
   switching to -funsigned-char

 - quirks to i8042 to better handle Lifebook A574/H and TUXEDO devices

 - a quirk to Goodix touchscreen driver to handle Yoga Book X90F

 - a fix for incorrectly merged patch to xpad game controller driver

* tag 'input-for-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: i8042 - add TUXEDO devices to i8042 quirk tables for partial fix
  Input: alps - fix compatibility with -funsigned-char
  Input: focaltech - use explicitly signed char type
  Input: xpad - fix incorrectly applied patch for MAP_PROFILE_BUTTON
  Input: goodix - add Lenovo Yoga Book X90F to nine_bytes_report DMI table
  Input: i8042 - add quirk for Fujitsu Lifebook A574/H

19 months agoMerge tag 'pinctrl-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
Linus Torvalds [Sat, 1 Apr 2023 16:47:08 +0000 (09:47 -0700)]
Merge tag 'pinctrl-v6.3-2' of git://git./linux/kernel/git/linusw/linux-pinctrl

Pull pin control fixes from Linus Walleij:
 "Some pin control fixes for the v6.3 series.

  The most notable and urgent one is probably the AMD fix which affects
  AMD laptops, found by the Chromium people.

  Summary:

   - Fix up the Kconfig options for MediaTek MT7981

   - Fix the irq domain name in the AT91-PIO4 driver

   - Fix some alternative muxing modes in the Ocelot driver

   - Allocate the GPIO numbers dynamically in the STM32 driver

   - Disable and mask interrupts on resume in the AMD driver

   - Fix a typo in the Qualcomm SM8550 pin control device tree bindings"

* tag 'pinctrl-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  dt-bindings: pinctrl: qcom,sm8550-lpass-lpi: allow input-enabled and bias-bus-hold
  pinctrl: amd: Disable and mask interrupts on resume
  pinctrl: stm32: use dynamic allocation of GPIO base
  pinctrl: ocelot: Fix alt mode for ocelot
  pinctrl: at91-pio4: fix domain name assignment
  pinctrl: mediatek: fix naming inconsistency
  pinctrl: mediatek: add missing options to PINCTRL_MT7981

19 months agoMerge tag 'kbuild-fixes-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 1 Apr 2023 16:25:17 +0000 (09:25 -0700)]
Merge tag 'kbuild-fixes-v6.3-2' of git://git./linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

 - Fix linux-headers debian package

 - Fix a merge_config.sh error due to a misspelled variable

 - Fix modversion for 32-bit build machines

* tag 'kbuild-fixes-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  modpost: Fix processing of CRCs on 32-bit build machines
  scripts: merge_config: Fix typo in variable name.
  kbuild: deb-pkg: set version for linux-headers paths

19 months agoMerge tag 'iommu-fixes-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 1 Apr 2023 16:17:33 +0000 (09:17 -0700)]
Merge tag 'iommu-fixes-6.3-rc4' of git://git./linux/kernel/git/joro/iommu

Pull iommu fixes from Joerg Roedel:

 - Maintainer update for S390 IOMMU driver

 - A fix for the set_platform_dma_ops() call-back in the Exynos
   IOMMU driver

 - Intel VT-d fixes from Lu Baolu:
    - Fix a lockdep splat
    - Fix a supplement of the specification
    - Fix a warning in perfmon code

* tag 'iommu-fixes-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/vt-d: Fix an IOMMU perfmon warning when CPU hotplug
  iommu/vt-d: Allow zero SAGAW if second-stage not supported
  iommu/vt-d: Remove unnecessary locking in intel_irq_remapping_alloc()
  iommu/exynos: Fix set_platform_dma_ops() callback
  MAINTAINERS: Update s390-iommu driver maintainer information

19 months agomedia: i2c: imx290: fix conditional function defintions
Arnd Bergmann [Tue, 7 Feb 2023 16:13:12 +0000 (17:13 +0100)]
media: i2c: imx290: fix conditional function defintions

The runtime suspend/resume functions are only referenced from the
dev_pm_ops, but they use the old SET_RUNTIME_PM_OPS() helper that
requires a __maybe_unused annotation to avoid a warning:

  drivers/media/i2c/imx290.c:1082:12: error: unused function 'imx290_runtime_resume' [-Werror,-Wunused-function]
  static int imx290_runtime_resume(struct device *dev)
             ^
  drivers/media/i2c/imx290.c:1090:12: error: unused function 'imx290_runtime_suspend' [-Werror,-Wunused-function]
  static int imx290_runtime_suspend(struct device *dev)
             ^

Convert this to the new RUNTIME_PM_OPS() helper that so this is not
required.  To improve this further, also use the pm_ptr() helper that
lets the dev_pm_ops get dropped entirely when CONFIG_PM is disabled.

A related mistake happened in the of_match_ptr() macro here, which like
SET_RUNTIME_PM_OPS() requires the match table to be marked as
__maybe_unused, though I could not reproduce building this without
CONFIG_OF.  Remove the of_match_ptr() here as there is no point in
dropping the match table in configurations without CONFIG_OF.

Fixes: 02852c01f654 ("media: i2c: imx290: Initialize runtime PM before subdev")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Reported-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
19 months agoMerge tag 'nfs-for-6.3-3' of git://git.linux-nfs.org/projects/anna/linux-nfs
Linus Torvalds [Fri, 31 Mar 2023 20:22:14 +0000 (13:22 -0700)]
Merge tag 'nfs-for-6.3-3' of git://git.linux-nfs.org/projects/anna/linux-nfs

Pull NFS client fixes from Anna Schumaker:

 - Fix shutdown of NFS TCP client sockets

 - Fix hangs when recovering open state after a server reboot

* tag 'nfs-for-6.3-3' of git://git.linux-nfs.org/projects/anna/linux-nfs:
  SUNRPC: fix shutdown of NFS TCP client socket
  NFSv4: Fix hangs when recovering open state after a server reboot

19 months agoMerge tag 'platform-drivers-x86-v6.3-4' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 31 Mar 2023 20:11:06 +0000 (13:11 -0700)]
Merge tag 'platform-drivers-x86-v6.3-4' of git://git./linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver fixes from Hans de Goede:

 - Fix a regression in ideapad-laptop which caused the touchpad to stop
   working after a suspend/resume on some models

 - One other small fix and three hw-id additions

* tag 'platform-drivers-x86-v6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
  platform/x86: ideapad-laptop: Stop sending KEY_TOUCHPAD_TOGGLE
  platform/x86: asus-nb-wmi: Add quirk_asus_tablet_mode to other ROG Flow X13 models
  platform/x86: gigabyte-wmi: add support for X570S AORUS ELITE
  platform/x86: gigabyte-wmi: add support for B650 AORUS ELITE AX
  platform/x86/intel/pmc: Alder Lake PCH slp_s0_residency fix

19 months agoMerge tag 'pci-v6.3-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
Linus Torvalds [Fri, 31 Mar 2023 20:07:01 +0000 (13:07 -0700)]
Merge tag 'pci-v6.3-fixes-1' of git://git./linux/kernel/git/pci/pci

Pull PCI fix from Bjorn Helgaas:

 - Fix DesignWare PORT_LINK_CONTROL setup, which was corrupted when the
   DT "snps,enable-cdm-check" property was present (Yoshihiro Shimoda)

* tag 'pci-v6.3-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
  PCI: dwc: Fix PORT_LINK_CONTROL update when CDM check enabled

19 months agoMerge tag 'regulator-fix-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 31 Mar 2023 20:02:34 +0000 (13:02 -0700)]
Merge tag 'regulator-fix-v6.3-rc4' of git://git./linux/kernel/git/broonie/regulator

Pull regulator fix from Mark Brown:
 "Deferred probe fix for v6.3.

  This fixes a rarely triggered issue where we would treat probe
  deferral for clocks as a fatal error in the fixed regulator, causing
  it to fail to retry when it should"

* tag 'regulator-fix-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: Handle deferred clk

19 months agoMerge tag 'block-6.3-2023-03-30' of git://git.kernel.dk/linux
Linus Torvalds [Fri, 31 Mar 2023 19:35:03 +0000 (12:35 -0700)]
Merge tag 'block-6.3-2023-03-30' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:

 - NVMe pull request via Christoph:
     - Mark Lexar NM760 as IGNORE_DEV_SUBNQN (Juraj Pecigos)
     - Fix a possible UAF when failing to allocate an TCP io queue (Sagi
       Grimberg)

 - MD pull request via Song:
     - Fix a null pointer deference in 6.3-rc (Yu Kuai)

 - uevent partition fix (Alyssa)

* tag 'block-6.3-2023-03-30' of git://git.kernel.dk/linux:
  nvme-tcp: fix a possible UAF when failing to allocate an io queue
  md: fix regression for null-ptr-deference in __md_stop()
  nvme-pci: mark Lexar NM760 as IGNORE_DEV_SUBNQN
  loop: LOOP_CONFIGURE: send uevents for partitions

19 months agoMerge tag 'io_uring-6.3-2023-03-30' of git://git.kernel.dk/linux
Linus Torvalds [Fri, 31 Mar 2023 19:30:13 +0000 (12:30 -0700)]
Merge tag 'io_uring-6.3-2023-03-30' of git://git.kernel.dk/linux

Pull io_uring fixes from Jens Axboe:

 - Fix a regression with the poll retry, introduced in this merge window
   (me)

 - Fix a regression with the alloc cache not decrementing the member
   count on removal. Also a regression from this merge window (Pavel)

 - Fix race around rsrc node grabbing (Pavel)

* tag 'io_uring-6.3-2023-03-30' of git://git.kernel.dk/linux:
  io_uring: fix poll/netmsg alloc caches
  io_uring/rsrc: fix rogue rsrc node grabbing
  io_uring/poll: clear single/double poll flags on poll arming

19 months agoplatform/x86: ideapad-laptop: Stop sending KEY_TOUCHPAD_TOGGLE
Hans de Goede [Thu, 30 Mar 2023 19:46:44 +0000 (21:46 +0200)]
platform/x86: ideapad-laptop: Stop sending KEY_TOUCHPAD_TOGGLE

Commit 5829f8a897e4 ("platform/x86: ideapad-laptop: Send
KEY_TOUCHPAD_TOGGLE on some models") made ideapad-laptop send
KEY_TOUCHPAD_TOGGLE when we receive an ACPI notify with VPC event bit 5 set
and the touchpad-state has not been changed by the EC itself already.

This was done under the assumption that this would be good to do to make
the touchpad-toggle hotkey work on newer models where the EC does not
toggle the touchpad on/off itself (because it is not routed through
the PS/2 controller, but uses I2C).

But it turns out that at least some models, e.g. the Yoga 7-15ITL5 the EC
triggers an ACPI notify with VPC event bit 5 set on resume, which would
now cause a spurious KEY_TOUCHPAD_TOGGLE on resume to which the desktop
environment responds by disabling the touchpad in software, breaking
the touchpad (until manually re-enabled) on resume.

It was never confirmed that sending KEY_TOUCHPAD_TOGGLE actually improves
things on new models and at least some new models like the Yoga 7-15ITL5
don't have a touchpad on/off toggle hotkey at all, while still sending
ACPI notify events with VPC event bit 5 set.

So it seems best to revert the change to send KEY_TOUCHPAD_TOGGLE when
receiving an ACPI notify events with VPC event bit 5 and the touchpad
state as reported by the EC has not changed.

Note this is not a full revert the code to cache the last EC touchpad
state is kept to avoid sending spurious KEY_TOUCHPAD_ON / _OFF events
on resume.

Fixes: 5829f8a897e4 ("platform/x86: ideapad-laptop: Send KEY_TOUCHPAD_TOGGLE on some models")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217234
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230330194644.64628-1-hdegoede@redhat.com
19 months agoplatform/x86: asus-nb-wmi: Add quirk_asus_tablet_mode to other ROG Flow X13 models
weiliang1503 [Thu, 30 Mar 2023 11:49:43 +0000 (19:49 +0800)]
platform/x86: asus-nb-wmi: Add quirk_asus_tablet_mode to other ROG Flow X13 models

Make quirk_asus_tablet_mode apply on other ROG Flow X13 devices,
which only affects the GV301Q model before.

Signed-off-by: weiliang1503 <weiliang1503@gmail.com>
Link: https://lore.kernel.org/r/20230330114943.15057-1-weiliang1503@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
19 months agoplatform/x86: gigabyte-wmi: add support for X570S AORUS ELITE
Hans de Goede [Fri, 31 Mar 2023 17:31:48 +0000 (19:31 +0200)]
platform/x86: gigabyte-wmi: add support for X570S AORUS ELITE

Add "X570S AORUS ELITE" to known working boards

Reported-by: Brandon Nielsen <nielsenb@jetfuse.net>
Link: https://lore.kernel.org/r/20230331014902.7864-1-nielsenb@jetfuse.net
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
19 months agoMerge tag 'thermal-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Fri, 31 Mar 2023 17:23:27 +0000 (10:23 -0700)]
Merge tag 'thermal-6.3-rc5' of git://git./linux/kernel/git/rafael/linux-pm

Pull thermal control fixes from Rafael Wysocki:
 "These remove two recently added excessive lockdep assertions from the
  sysfs-related thermal code and fix two issues in Intel thermal
  drivers.

  Specifics:

   - Drop two lockdep assertions producing false positive warnings from
     the sysfs-related thermal core code (Rafael Wysocki)

   - Fix handling of two recently added module parameters in the Intel
     powerclamp thermal driver (David Arcari)

   - Fix one more deadlock in the int340x thermal driver (Srinivas
     Pandruvada)"

* tag 'thermal-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  thermal: intel: powerclamp: Fix cpumask and max_idle module parameters
  thermal: intel: int340x: processor_thermal: Fix additional deadlock
  thermal: core: Drop excessive lockdep_assert_held() calls

19 months agoMerge tag 'acpi-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Fri, 31 Mar 2023 17:18:56 +0000 (10:18 -0700)]
Merge tag 'acpi-6.3-rc5' of git://git./linux/kernel/git/rafael/linux-pm

Pull ACPI fix from Rafael Wysocki:
 "Fix a recent regression related to the handling of ACPI notifications
  that made it more likely for ACPI driver callbacks to be invoked in an
  unexpected order and NULL pointers can be dereferenced as a result or
  similar.

  The fix is to modify the global ACPI notification handler so it does
  not invoke driver callbacks at all and allow the device-level
  notification handlers to receive "system" notifications (for the
  drivers that want to receive them)"

* tag 'acpi-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: bus: Rework system-level device notification handling

19 months agoMerge tag 'riscv-for-linus-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 31 Mar 2023 17:15:17 +0000 (10:15 -0700)]
Merge tag 'riscv-for-linus-6.3-rc5' of git://git./linux/kernel/git/riscv/linux

Pull RISC-V fixes from Palmer Dabbelt:

 - A fix for FPU probing in XIP kernels

 - Always enable the alternative framework for non-XIP kernels

* tag 'riscv-for-linus-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  RISC-V: always select RISCV_ALTERNATIVE for non-xip kernels
  RISC-V: add non-alternative fallback for riscv_has_extension_[un]likely()

19 months agoMerge tag 'mips-fixes_6.3_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips...
Linus Torvalds [Fri, 31 Mar 2023 17:12:07 +0000 (10:12 -0700)]
Merge tag 'mips-fixes_6.3_1' of git://git./linux/kernel/git/mips/linux

Pull MIPS fix from Thomas Bogendoerfer:
 "Fix to avoid crash on BCM6358 platforms"

* tag 'mips-fixes_6.3_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
  mips: bmips: BCM6358: disable RAC flush for TP1

19 months agoMerge branch 'thermal-intel-fixes'
Rafael J. Wysocki [Fri, 31 Mar 2023 10:02:46 +0000 (12:02 +0200)]
Merge branch 'thermal-intel-fixes'

Merge Intel thermal driver fixes for 6.3-rc5:

 - Fix handling of two recently added module parameters in the Intel
   powerclamp thermal driver (David Arcari).

 - Fix one more deadlock in the int340x thermal driver (Srinivas
   Pandruvada).

* thermal-intel-fixes:
  thermal: intel: powerclamp: Fix cpumask and max_idle module parameters
  thermal: intel: int340x: processor_thermal: Fix additional deadlock

19 months agoiommu/vt-d: Fix an IOMMU perfmon warning when CPU hotplug
Kan Liang [Wed, 29 Mar 2023 13:47:21 +0000 (21:47 +0800)]
iommu/vt-d: Fix an IOMMU perfmon warning when CPU hotplug

A warning can be triggered when hotplug CPU 0.
$ echo 0 > /sys/devices/system/cpu/cpu0/online

 ------------[ cut here ]------------
 Voluntary context switch within RCU read-side critical section!
 WARNING: CPU: 0 PID: 19 at kernel/rcu/tree_plugin.h:318
          rcu_note_context_switch+0x4f4/0x580
 RIP: 0010:rcu_note_context_switch+0x4f4/0x580
 Call Trace:
  <TASK>
  ? perf_event_update_userpage+0x104/0x150
  __schedule+0x8d/0x960
  ? perf_event_set_state.part.82+0x11/0x50
  schedule+0x44/0xb0
  schedule_timeout+0x226/0x310
  ? __perf_event_disable+0x64/0x1a0
  ? _raw_spin_unlock+0x14/0x30
  wait_for_completion+0x94/0x130
  __wait_rcu_gp+0x108/0x130
  synchronize_rcu+0x67/0x70
  ? invoke_rcu_core+0xb0/0xb0
  ? __bpf_trace_rcu_stall_warning+0x10/0x10
  perf_pmu_migrate_context+0x121/0x370
  iommu_pmu_cpu_offline+0x6a/0xa0
  ? iommu_pmu_del+0x1e0/0x1e0
  cpuhp_invoke_callback+0x129/0x510
  cpuhp_thread_fun+0x94/0x150
  smpboot_thread_fn+0x183/0x220
  ? sort_range+0x20/0x20
  kthread+0xe6/0x110
  ? kthread_complete_and_exit+0x20/0x20
  ret_from_fork+0x1f/0x30
  </TASK>
 ---[ end trace 0000000000000000 ]---

The synchronize_rcu() will be invoked in the perf_pmu_migrate_context(),
when migrating a PMU to a new CPU. However, the current for_each_iommu()
is within RCU read-side critical section.

Two methods were considered to fix the issue.
- Use the dmar_global_lock to replace the RCU read lock when going
  through the drhd list. But it triggers a lockdep warning.
- Use the cpuhp_setup_state_multi() to set up a dedicated state for each
  IOMMU PMU. The lock can be avoided.

The latter method is implemented in this patch. Since each IOMMU PMU has
a dedicated state, add cpuhp_node and cpu in struct iommu_pmu to track
the state. The state can be dynamically allocated now. Remove the
CPUHP_AP_PERF_X86_IOMMU_PERF_ONLINE.

Fixes: 46284c6ceb5e ("iommu/vt-d: Support cpumask for IOMMU perfmon")
Reported-by: Ammy Yi <ammy.yi@intel.com>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Link: https://lore.kernel.org/r/20230328182028.1366416-1-kan.liang@linux.intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20230329134721.469447-4-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
19 months agoiommu/vt-d: Allow zero SAGAW if second-stage not supported
Lu Baolu [Wed, 29 Mar 2023 13:47:20 +0000 (21:47 +0800)]
iommu/vt-d: Allow zero SAGAW if second-stage not supported

The VT-d spec states (in section 11.4.2) that hardware implementations
reporting second-stage translation support (SSTS) field as Clear also
report the SAGAW field as 0. Fix an inappropriate check in alloc_iommu().

Fixes: 792fb43ce2c9 ("iommu/vt-d: Enable Intel IOMMU scalable mode by default")
Suggested-by: Raghunathan Srinivasan <raghunathan.srinivasan@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20230318024824.124542-1-baolu.lu@linux.intel.com
Link: https://lore.kernel.org/r/20230329134721.469447-3-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>