All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Huan He" <hehuan1@eswincomputing.com>
To: "Philipp Zabel" <p.zabel@pengutronix.de>
Cc: linux@roeck-us.net, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, 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 v6 2/2] hwmon: Add Eswin EIC7700 PVT sensor driver
Date: Fri, 5 Jun 2026 13:56:33 +0800 (GMT+08:00)	[thread overview]
Message-ID: <3cd3955b.6ff2.19e965acb49.Coremail.hehuan1@eswincomputing.com> (raw)
In-Reply-To: <85e630579d97172e9bc64bce082b2d7b763a1263.camel@pengutronix.de>

Hi Philipp,

Thank you very much for your detailed review. We appreciate the feedback.

> > 
> > Add support for ESWIN EIC7700 Voltage and Temperature sensor. The driver
> > supports temperature and voltage monitoring with polynomial conversion,
> > and provides sysfs interface for sensor data access.
> > 
> > The PVT IP contains one temperature sensor and one voltage sensor.
> > 
> > Signed-off-by: Yulin Lu <luyulin@eswincomputing.com>
> > Signed-off-by: Huan He <hehuan1@eswincomputing.com>
> > ---
> >  drivers/hwmon/Kconfig       |  12 +
> >  drivers/hwmon/Makefile      |   1 +
> >  drivers/hwmon/eic7700-pvt.c | 495 ++++++++++++++++++++++++++++++++++++
> >  drivers/hwmon/eic7700-pvt.h |  99 ++++++++
> >  4 files changed, 607 insertions(+)
> >  create mode 100644 drivers/hwmon/eic7700-pvt.c
> >  create mode 100644 drivers/hwmon/eic7700-pvt.h
> > 
> [...]
> > diff --git a/drivers/hwmon/eic7700-pvt.c b/drivers/hwmon/eic7700-pvt.c
> > new file mode 100644
> > index 000000000000..ea0f1299cd29
> > --- /dev/null
> > +++ b/drivers/hwmon/eic7700-pvt.c
> > @@ -0,0 +1,495 @@
> [...]
> > +static int eic7700_pvt_probe(struct platform_device *pdev)
> > +{
> > +	struct pvt_hwmon *pvt;
> > +	int ret;
> > +
> > +	pvt = eic7700_pvt_create_data(pdev);
> > +	if (IS_ERR(pvt))
> > +		return PTR_ERR(pvt);
> > +
> > +	platform_set_drvdata(pdev, pvt);
> > +
> > +	pvt->regs = devm_platform_ioremap_resource(pdev, 0);
> > +	if (IS_ERR(pvt->regs))
> > +		return PTR_ERR(pvt->regs);
> > +
> > +	pvt->clk = devm_clk_get(&pdev->dev, NULL);
> > +	if (IS_ERR(pvt->clk))
> > +		return dev_err_probe(&pdev->dev, PTR_ERR(pvt->clk),
> > +				     "Couldn't get clock\n");
> > +
> > +	pvt->rst = devm_reset_control_get_exclusive_deasserted(&pdev->dev,
> > +							       NULL);
> 
> Why store this in struct pvt_hwmon? It's not used anywhere else.

The reset control is only needed during probe to deassert the reset line,
and it is not used afterwards.

I will change it to a local variable in eic7700_pvt_probe() and remove the
rst field from struct pvt_hwmon.

The code will be changed along these lines:

    struct reset_control *rst;

    rst = devm_reset_control_get_exclusive_deasserted(&pdev->dev, NULL);
    if (IS_ERR(rst))
        return dev_err_probe(pvt->dev, PTR_ERR(rst),
                             "Couldn't get reset control\n");

Best regards,
Huan He

      reply	other threads:[~2026-06-05  5:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-04  8:04 [PATCH v6 0/2] Add driver support for ESWIN EIC7700 PVT controller hehuan1
2026-06-04  8:05 ` [PATCH v6 1/2] dt-bindings: hwmon: Add Eswin EIC7700 PVT sensor hehuan1
2026-06-04  8:10   ` sashiko-bot
2026-06-04  8:05 ` [PATCH v6 2/2] hwmon: Add Eswin EIC7700 PVT sensor driver hehuan1
2026-06-04  8:17   ` sashiko-bot
2026-06-05  6:57     ` Huan He
2026-06-04  9:12   ` Philipp Zabel
2026-06-05  5:56     ` Huan He [this message]

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=3cd3955b.6ff2.19e965acb49.Coremail.hehuan1@eswincomputing.com \
    --to=hehuan1@eswincomputing.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.