From: "Huan He" <hehuan1@eswincomputing.com>
To: "Guenter Roeck" <linux@roeck-us.net>
Cc: "Krzysztof Kozlowski" <krzk@kernel.org>,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
p.zabel@pengutronix.de, linux-hwmon@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
ningyu@eswincomputing.com, linmin@eswincomputing.com,
pinkesh.vaghela@einfochips.com, luyulin@eswincomputing.com
Subject: Re: Re: [PATCH v4 1/2] dt-bindings: hwmon: Add Eswin EIC7700 PVT sensor
Date: Wed, 13 May 2026 15:03:36 +0800 (GMT+08:00) [thread overview]
Message-ID: <70426510.61e4.19e2025eac7.Coremail.hehuan1@eswincomputing.com> (raw)
In-Reply-To: <c4082788-9e2f-4108-9d2f-13648bf4e5bf@roeck-us.net>
Hi Guenter,
Thank you very much for your detailed review. We appreciate the feedback.
>
> On 5/12/26 02:16, Huan He wrote:
> > Hi Krzysztof,
> >
> > Thank you very much for your detailed review. We appreciate the feedback.
> >
> >> On Thu, Apr 30, 2026 at 02:44:44PM +0800, hehuan1@eswincomputing.com wrote:
> >>> +
> >>> + label:
> >>> + enum:
> >>> + - pvt0
> >>> + - pvt1
> >>
> >> No, label is user-visible name. Can be whatever user decides.
> >>
> >> Please read writing bindings - instance IDs are not allowed.
> >
> > Thanks for the clarification.
> > I am planning to update the next revision as follows. Would this be
> > acceptable?
> >
> > YAML:
> > - label:
> > - enum:
> > - - pvt0
> > - - pvt1
> > + label: true
> >
> > required:
> > - compatible
> > - reg
> > - clocks
> > - interrupts
> > - - label
> >
> > Driver:
> > static int eic7700_pvt_create_hwmon(struct pvt_hwmon *pvt)
> > {
> > - struct device *dev = pvt->dev;
> > - struct device_node *np = dev->of_node;
> > - const char *node_label;
> > - int type;
> > - const char *names[2] = {"soc_pvt", "ddr_pvt"};
> > -
> > - if (of_property_read_string(np, "label", &node_label)) {
> > - dev_err(dev, "Missing 'label' property in DTS node\n");
> > - return -EINVAL;
> > - }
> > -
> > - if (strcmp(node_label, "pvt0") == 0) {
> > - type = 0;
> > - } else if (strcmp(node_label, "pvt1") == 0) {
> > - type = 1;
> > - } else {
> > - dev_err(pvt->dev, "Unsupported label: %s\n", node_label);
> > - return -EINVAL;
> > - }
> > + const char *name = "pvt";
> > +
> > + of_property_read_string(pvt->dev->of_node, "label", &name);
> >
> > - pvt->hwmon = devm_hwmon_device_register_with_info(pvt->dev, names[type],
> > + pvt->hwmon = devm_hwmon_device_register_with_info(pvt->dev, name,
> > pvt, &pvt_hwmon_info,
> > NULL);
> >
>
> This would try to register a free-text name for the hwmon device,
> which would be unacceptable.
>
> There are lots of multi-channel devices out there. None of them
> have those problems. Why do you insist in free-text names instead of
> using, say, "reg" to distinguish the channels ?
Thanks for the clarification.
In the next revision, I will register the hwmon device with the fixed name
"pvt".
Best regards,
Huan He
next prev parent reply other threads:[~2026-05-13 7:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260430064107.1598-1-hehuan1@eswincomputing.com>
[not found] ` <20260430064444.1615-1-hehuan1@eswincomputing.com>
[not found] ` <20260503-brave-bullfinch-of-innovation-942914@quoll>
2026-05-12 9:16 ` Re: [PATCH v4 1/2] dt-bindings: hwmon: Add Eswin EIC7700 PVT sensor Huan He
2026-05-12 14:26 ` Guenter Roeck
2026-05-13 7:03 ` Huan He [this message]
2026-05-13 19:03 ` Krzysztof Kozlowski
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=70426510.61e4.19e2025eac7.Coremail.hehuan1@eswincomputing.com \
--to=hehuan1@eswincomputing.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linmin@eswincomputing.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=luyulin@eswincomputing.com \
--cc=ningyu@eswincomputing.com \
--cc=p.zabel@pengutronix.de \
--cc=pinkesh.vaghela@einfochips.com \
--cc=robh@kernel.org \
/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