mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 08:19:10 -0700	[thread overview]
Message-ID: <df0f11cb-3b44-4869-bfd6-6e5d01e6debd@roeck-us.net> (raw)
In-Reply-To: <PH7PR20MB49622B0A6E9169B04211C7AFBB1D2@PH7PR20MB4962.namprd20.prod.outlook.com>

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.

> +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

  reply	other threads:[~2024-06-21 15:19 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 [this message]
2024-06-21 22:45     ` Inochi Amaoto
2024-06-21 23:05       ` Guenter Roeck
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=df0f11cb-3b44-4869-bfd6-6e5d01e6debd@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®