Re: [PATCH v5 2/2] drivers: hwmon: sophgo: Add SG2042 external hardware monitor support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 05, 2024 at 09:18:53AM +0800, Inochi Amaoto wrote:
> SG2042 use an external MCU to provide basic hardware information
> and thermal sensors.
> 
> Add driver support for the onboard MCU of SG2042.
> 
> Signed-off-by: Inochi Amaoto <inochiama@xxxxxxxxxxx>
> ---
>  drivers/hwmon/Kconfig            |  11 +
>  drivers/hwmon/Makefile           |   1 +
>  drivers/hwmon/sg2042-hwmon-mcu.c | 531 +++++++++++++++++++++++++++++++

Documentation missing.

> +config SENSORS_SG2042_HWMON_MCU

"SENSORS" and "HWMON" is redundant. Yes, I know, others do it
as well, but that doesn't make it less redundant.

> +static DEVICE_ATTR_RO(board_type);
> +static DEVICE_ATTR_RO(firmware_version);
> +static DEVICE_ATTR_RO(pcb_version);
> +static DEVICE_ATTR_RO(reset_count);
> +static DEVICE_ATTR_RO(uptime);
> +static DEVICE_ATTR_RO(reset_reason);
> +static DEVICE_ATTR_RO(mcu_type);
> +static DEVICE_ATTR_RW(critical_action);

None of the above are hardware monitoring attributes. They are not
acceptable as sysfs attributes. Some of them might be acceptable
as debugfs attributes.

> +static DEVICE_ATTR_RW(repower_temp);
> +

For this one, I don't know what it is. If it is a temperature
limit, it should be implemented as one (for example as _emergency
limit).

Guenter




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux