Re: Re: [PATCH v4 1/2] dt-bindings: hwmon: Add Eswin EIC7700 PVT sensor
From: Huan He
Date: Wed May 13 2026 - 03:05:47 EST
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@xxxxxxxxxxxxxxxxxx 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