aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/as370-hwmon.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2022-05-22dt-bindings: trivial-devices: Add xdp152Greg.Schwendimann@infineon.com1-0/+4
Add Infineon Digital Multi-phase xdp152 family controllers. Signed-off-by: Greg Schwendimann <Greg.Schwendimann@infineon.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/1a600fd51db942389a5078a72c3bf411@infineon.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2022-05-22hwmon: (sl28cpld-hwmon) Use HWMON_CHANNEL_INFO macroGuenter Roeck1-11/+1
The HWMON_CHANNEL_INFO macro simplifies the code, reduces the likelihood of errors, and makes the code easier to read. The conversion was done automatically with coccinelle. The semantic patch used to make this change is as follows. @s@ identifier i,j,ty; @@ -struct hwmon_channel_info j = { - .type = ty, - .config = i, -}; @r@ initializer list elements; identifier s.i; @@ -u32 i[] = { - elements, - 0 -}; @script:ocaml t@ ty << s.ty; elements << r.elements; shorter; elems; @@ shorter := make_ident (List.hd(List.rev (Str.split (Str.regexp "_") ty))); elems := make_ident (String.concat "," (List.map (fun x -> Printf.sprintf "\n\t\t\t %s" x) (Str.split (Str.regexp " , ") elements))) @@ identifier s.j,t.shorter; identifier t.elems; @@ - &j + HWMON_CHANNEL_INFO(shorter,elems) This patch does not introduce functional changes. Many thanks to Julia Lawall for providing the coccinelle script. Cc: Michael Walle <michael@walle.cc> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2022-05-22hwmon: (pwm-fan) Use HWMON_CHANNEL_INFO macroGuenter Roeck1-11/+1
The HWMON_CHANNEL_INFO macro simplifies the code, reduces the likelihood of errors, and makes the code easier to read. The conversion was done automatically with coccinelle. The semantic patch used to make this change is as follows. @s@ identifier i,j,ty; @@ -struct hwmon_channel_info j = { - .type = ty, - .config = i, -}; @r@ initializer list elements; identifier s.i; @@ -u32 i[] = { - elements, - 0 -}; @script:ocaml t@ ty << s.ty; elements << r.elements; shorter; elems; @@ shorter := make_ident (List.hd(List.rev (Str.split (Str.regexp "_") ty))); elems := make_ident (String.concat "," (List.map (fun x -> Printf.sprintf "\n\t\t\t %s" x) (Str.split (Str.regexp " , ") elements))) @@ identifier s.j,t.shorter; identifier t.elems; @@ - &j + HWMON_CHANNEL_INFO(shorter,elems) This patch does not introduce functional changes. Many thanks to Julia Lawall for providing the coccinelle script. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2022-05-22hwmon: (peci/dimmtemp) Use HWMON_CHANNEL_INFO macroGuenter Roeck1-11/+3
The HWMON_CHANNEL_INFO macro simplifies the code, reduces the likelihood of errors, and makes the code easier to read. The conversion was done automatically with coccinelle. The semantic patch used to make this change is as follows. @s@ identifier i,j,ty; @@ -struct hwmon_channel_info j = { - .type = ty, - .config = i, -}; @r@ initializer list elements; identifier s.i; @@ -u32 i[] = { - elements, - 0 -}; @script:ocaml t@ ty << s.ty; elements << r.elements; shorter; elems; @@ shorter := make_ident (List.hd(List.rev (Str.split (Str.regexp "_") ty))); elems := make_ident (String.concat "," (List.map (fun x -> Printf.sprintf "\n\t\t\t %s" x) (Str.split (Str.regexp " , ") elements))) @@ identifier s.j,t.shorter; identifier t.elems; @@ - &j + HWMON_CHANNEL_INFO(shorter,elems) This patch does not introduce functional changes. Many thanks to Julia Lawall for providing the coccinelle script. Cc: Iwona Winiarska <iwona.winiarska@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2022-05-22hwmon: (peci/cputemp) Use HWMON_CHANNEL_INFO macroGuenter Roeck1-22/+16
The HWMON_CHANNEL_INFO macro simplifies the code, reduces the likelihood of errors, and makes the code easier to read. The conversion was done automatically with coccinelle. The semantic patch used to make this change is as follows. @s@ identifier i,j,ty; @@ -struct hwmon_channel_info j = { - .type = ty, - .config = i, -}; @r@ initializer list elements; identifier s.i; @@ -u32 i[] = { - elements, - 0 -}; @script:ocaml t@ ty << s.ty; elements << r.elements; shorter; elems; @@ shorter := make_ident (List.hd(List.rev (Str.split (Str.regexp "_") ty))); elems := make_ident (String.concat "," (List.map (fun x -> Printf.sprintf "\n\t\t\t %s" x) (Str.split (Str.regexp " , ") elements))) @@ identifier s.j,t.shorter; identifier t.elems; @@ - &j + HWMON_CHANNEL_INFO(shorter,elems) This patch does not introduce functional changes. Many thanks to Julia Lawall for providing the coccinelle script. Cc: Iwona Winiarska <iwona.winiarska@intel.com> Reviewed-by: Iwona Winiarska <iwona.winiarska@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2022-05-22hwmon: (mr75203) Use HWMON_CHANNEL_INFO macroGuenter Roeck1-11/+1
The HWMON_CHANNEL_INFO macro simplifies the code, reduces the likelihood of errors, and makes the code easier to read. The conversion was done automatically with coccinelle. The semantic patch used to make this change is as follows. @s@ identifier i,j,ty; @@ -struct hwmon_channel_info j = { - .type = ty, - .config = i, -}; @r@ initializer list elements; identifier s.i; @@ -u32 i[] = { - elements, - 0 -}; @script:ocaml t@ ty << s.ty; elements << r.elements; shorter; elems; @@ shorter := make_ident (List.hd(List.rev (Str.split (Str.regexp "_") ty))); elems := make_ident (String.concat "," (List.map (fun x -> Printf.sprintf "\n\t\t\t %s" x) (Str.split (Str.regexp " , ") elements))) @@ identifier s.j,t.shorter; identifier t.elems; @@ - &j + HWMON_CHANNEL_INFO(shorter,elems) This patch does not introduce functional changes. Many thanks to Julia Lawall for providing the coccinelle script. Cc: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2022-05-22hwmon: (ltc2992) Use HWMON_CHANNEL_INFO macroGuenter Roeck1-61/+25
The HWMON_CHANNEL_INFO macro simplifies the code, reduces the likelihood of errors, and makes the code easier to read. The conversion was done automatically with coccinelle. The semantic patch used to make this change is as follows. @s@ identifier i,j,ty; @@ -struct hwmon_channel_info j = { - .type = ty, - .config = i, -}; @r@ initializer list elements; identifier s.i; @@ -u32 i[] = { - elements, - 0 -}; @script:ocaml t@ ty << s.ty; elements << r.elements; shorter; elems; @@ shorter := make_ident (List.hd(List.rev (Str.split (Str.regexp "_") ty))); elems := make_ident (String.concat "," (List.map (fun x -> Printf.sprintf "\n\t\t\t %s" x) (Str.split (Str.regexp " , ") elements))) @@ identifier s.j,t.shorter; identifier t.elems; @@ - &j + HWMON_CHANNEL_INFO(shorter,elems) This patch does not introduce functional changes. Many thanks to Julia Lawall for providing the coccinelle script. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2022-05-22hwmon: (as370-hwmon) Use HWMON_CHANNEL_INFO macroGuenter Roeck1-11/+1
The HWMON_CHANNEL_INFO macro simplifies the code, reduces the likelihood of errors, and makes the code easier to read. The conversion was done automatically with coccinelle. The semantic patch used to make this change is as follows. @s@ identifier i,j,ty; @@ -struct hwmon_channel_info j = { - .type = ty, - .config = i, -}; @r@ initializer list elements; identifier s.i; @@ -u32 i[] = { - elements, - 0 -}; @script:ocaml t@ ty << s.ty; elements << r.elements; shorter; elems; @@ shorter := make_ident (List.hd(List.rev (Str.split (Str.regexp "_") ty))); elems := make_ident (String.concat "," (List.map (fun x -> Printf.sprintf "\n\t\t\t %s" x) (Str.split (Str.regexp " , ") elements))) @@ identifier s.j,t.shorter; identifier t.elems; @@ - &j + HWMON_CHANNEL_INFO(shorter,elems) This patch does not introduce functional changes. Many thanks to Julia Lawall for providing the coccinelle script. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2022-05-22hwmon: Make chip parameter for with_info API mandatoryGuenter Roeck2-10/+8
Various attempts were made recently to "convert" the old hwmon_device_register() API to devm_hwmon_device_register_with_info() by just changing the function name without actually converting the driver. Prevent this from happening by making the 'chip' parameter of devm_hwmon_device_register_with_info() mandatory. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2022-05-22thermal/drivers/thermal_hwmon: Use hwmon_device_register_for_thermal()Guenter Roeck1-2/+4
The thermal subsystem registers a hwmon device without providing chip information or sysfs attribute groups. While undesirable, it would be difficult to change. On the other side, it abuses the hwmon_device_register_with_info API by not providing that information. Use new API specifically created for the thermal subsystem instead to let us enforce the 'chip' parameter for other callers of hwmon_device_register_with_info(). Acked-by: Rafael J . Wysocki <rafael@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2022-05-22hwmon: Introduce hwmon_device_register_for_thermalGuenter Roeck2-0/+28
The thermal subsystem registers a hwmon driver without providing chip or sysfs group information. This is for legacy reasons and would be difficult to change. At the same time, we want to enforce that chip information is provided when registering a hwmon device using hwmon_device_register_with_info(). To enable this, introduce a special API for use only by the thermal subsystem. Acked-by: Rafael J . Wysocki <rafael@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2022-05-22hwmon: (acpi_power_meter) Fix style issuesCorentin Labbe1-8/+9
Fix style issues found by checkpatch. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/20220509063010.3878134-2-clabbe@baylibre.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2022-05-22hwmon: (asus-ec-sensors) add ROG STRIX X570-E GAMING WIFI IIDebabrata Banerjee2-11/+20
Adds support for the ROG STRIX X570-E GAMING WIFI II board and simplifies formatting for the list of supported models. Signed-off-by: Debabrata Banerjee <dbavatar@gmail.com> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20220505073351.123753-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2022-05-22hwmon: (nct6775) Add i2c driverZev Weiss4-0/+220
This driver provides an i2c I/O mechanism for the core nct6775 driver, as might be used by a BMC. Because the Super I/O chip is shared with the host CPU in such a scenario (and the host should ultimately be in control of it), the i2c driver is strictly read-only to avoid interfering with any usage by the host (aside from the bank-select register, which seems to be replicated for the i2c interface). Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Tested-by: Renze Nicolai <renze@rnplus.nl> Link: https://lore.kernel.org/r/20220428012707.24921-3-zev@bewilderbeest.net Signed-off-by: Guenter Roeck <linux@roeck-us.net>