From: Guenter Roeck <linux@roeck-us.net>
To: Inochi Amaoto <inochiama@outlook.com>
Cc: Jean Delvare <jdelvare@suse.com>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Chen Wang <unicorn_wang@outlook.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org
Subject: Re: [PATCH v5 2/2] drivers: hwmon: sophgo: Add SG2042 external hardware monitor support
Date: Fri, 21 Jun 2024 16:05:46 -0700 [thread overview]
Message-ID: <52d97ca1-b9a3-4a50-8a74-6d56984791c8@roeck-us.net> (raw)
In-Reply-To: <IA1PR20MB495341CA5F2148902B198EA2BBC92@IA1PR20MB4953.namprd20.prod.outlook.com>
On 6/21/24 15:45, Inochi Amaoto wrote:
> On Fri, Jun 21, 2024 at 08:19:10AM GMT, Guenter Roeck wrote:
>> 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@outlook.com>
>>> ---
>>> 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.
>>
>
> OK, I will short it.
>
>>> +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.
>>
>
> It are reasonable, I will move the hardware info to debugfs.
>
>>> +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
>
> "repower_temp" is the highest temperature for SG2042 to perform
> repower operation. It is not the emergency limit, but a recovery
> limit when the emergency limit is reached.
>
> For example, when emergency temperature is set to 95 and repower
> temperature is set to 80. The board is off-power when it reachs
> 95 degree, and it will power on when the temperature is lower
> than 80 degree.
>
That would then be the matching _hyst temperature. There is no need
to invent a non-standard attribute for it.
Guenter
next prev parent reply other threads:[~2024-06-21 23:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-05 1:18 [PATCH v5 0/2] riscv: " Inochi Amaoto
2024-05-05 1:18 ` [PATCH v5 1/2] dt-bindings: hwmon: Add Sophgo " Inochi Amaoto
2024-05-07 15:33 ` Conor Dooley
2024-05-15 6:19 ` Anup Patel
2024-05-15 6:21 ` Anup Patel
2024-05-05 1:18 ` [PATCH v5 2/2] drivers: hwmon: sophgo: Add " Inochi Amaoto
2024-06-21 15:19 ` Guenter Roeck
2024-06-21 22:45 ` Inochi Amaoto
2024-06-21 23:05 ` Guenter Roeck [this message]
2024-06-22 0:05 ` Inochi Amaoto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52d97ca1-b9a3-4a50-8a74-6d56984791c8@roeck-us.net \
--to=linux@roeck-us.net \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=inochiama@outlook.com \
--cc=jdelvare@suse.com \
--cc=krzk+dt@kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh@kernel.org \
--cc=unicorn_wang@outlook.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®