Commit graph

3 commits

Author SHA1 Message Date
Krzysztof Kozlowski
d6171e4d32 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>
2023-04-19 07:08:35 -07:00
Ye Xingchen
102be2c242 hwmon: (gxp-fan-ctrl) use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/202302081546067270324@zte.com.cn
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-09 09:38:35 -08:00
Nick Hawkins
90905f7c40 hwmon: (gxp-fan-ctrl) Add GXP fan controller
The GXP SoC can support up to 16 fans through the interface provided by
the CPLD. The current support is limited to 8 fans. The fans speeds are
controlled via 8 different PWMs which can vary in value from  0-255. The
fans are also capable of reporting if they have failed to the CPLD which
in turn reports the status to the GXP SoC.

Signed-off-by: Nick Hawkins <nick.hawkins@hpe.com>
Link: https://lore.kernel.org/r/20230103203654.59322-2-nick.hawkins@hpe.com
[groeck: Improved alignment of defined, added missing include linux/bits.h]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00