public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Troy Mitchell <troy.mitchell@linux.dev>
To: Guenter Roeck <linux@roeck-us.net>,
	Troy Mitchell <troy.mitchell@linux.dev>
Cc: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jean Delvare <jdelvare@suse.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-hwmon@vger.kernel.org
Subject: Re: [PATCH 3/3] hwmon: (ctf2301) Add support for CTF2301
Date: Fri, 26 Sep 2025 21:21:00 +0800	[thread overview]
Message-ID: <aNaTPE494MMExSBz@troy-wujie14pro-arch> (raw)
In-Reply-To: <8c6f609e-c086-4b6c-abb5-8d33ec85df47@roeck-us.net>

On Thu, Sep 25, 2025 at 08:57:13PM -0700, Guenter Roeck wrote:
> On 9/25/25 18:32, Troy Mitchell wrote:
> > Hi Guenter, Thanks for your review.
> > There are many things to improve in this driver.
> > 
> > On Wed, Sep 24, 2025 at 08:43:35AM -0700, Guenter Roeck wrote:
> > > On Tue, Sep 16, 2025 at 12:46:46PM +0800, Troy Mitchell wrote:
> > [...]
> > > > diff --git a/drivers/hwmon/ctf2301.c b/drivers/hwmon/ctf2301.c
> > [...]
> > > > +
> > > > +#define CTF2301_LOCAL_TEMP_MSB			0x00
> > > 	LM90_REG_LOCAL_TEMP
> > > > +#define CTF2301_RMT_TEMP_MSB			0x01
> > > 	LM90_REG_REMOTE_TEMPH
> > > > +#define CTF2301_ALERT_STATUS			0x02
> > > 	LM90_REG_STATUS
> > > > +#define CTF2301_GLOBAL_CFG			0x03
> > > 	LM90_REG_CONFIG1
> > > > +#define CTF2301_RMT_TEMP_LSB			0x10
> > > 	LM90_REG_REMOTE_TEMPL
> > > > +#define CTF2301_LOCAL_TEMP_LSB			0x15
> > > 	TMP451_REG_LOCAL_TEMPL
> > > > +#define CTF2301_ALERT_MASK			0x16
> > > 	TMP461_REG_CHEN
> > > 
> > > So far this looks like a chip based on LM90 or TMP451/TMP461
> > > with an added fan controller. I can not immediatey determine
> > > if it would be better to add the pwm/tach support to the lm90
> > > driver. Given that the chip (based on registers) does support
> > > limits, which is not implemented here but essential for a chip
> > > like this, I would very much prefer adding support for it to the
> > > lm90 driver if possible.
> > > 
> > > The public datasheet does not provide register details, making it
> > > all but impossible to do a real evaluation. Any idea how to get
> > > a complete datasheet ?
> > Yeah, more register info at [1].
> > I've checked the detailed review below,
> > but I'll hold off on sending v2 until you decide if we really need a new driver.
> > 
> > Is this chip more like the LM63, by the way?
> > 
> 
> Good catch. Yes, looks like you are correct. LM63 is an almost perfect match.
> CTF2301 has a couple of extra registers, mostly local setpoint and temp LSB
> plus the registers in the 0x3x range. Actually, those registers _are_ defined
> for LM96163, so that chip is an even closer match.
Yes, so just to confirm,
you agree that the development should be done on top of the lm63 driver, right?

> 
> What happens if you just instantiate the lm63 driver, possibly after updating
> the detect function ?
I will run the tests the day after tomorrow and provide a log.

                - Troy

> 
> Guenter
> 

  reply	other threads:[~2025-09-26 13:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-16  4:46 [PATCH 0/3] hwmon: (ctf2301) Add support for CTF2301 Troy Mitchell
2025-09-16  4:46 ` [PATCH 1/3] dt-bindings: vendor-prefixes: Add Sensylink Troy Mitchell
2025-09-24 14:41   ` Guenter Roeck
2025-09-26  1:17     ` Troy Mitchell
2025-09-16  4:46 ` [PATCH 2/3] dt-bindings: Add CTF2301 devicetree bindings Troy Mitchell
2025-09-16 13:25   ` Rob Herring (Arm)
2025-09-16 13:52   ` Rob Herring
2025-09-17  6:40     ` Troy Mitchell
2025-09-16  4:46 ` [PATCH 3/3] hwmon: (ctf2301) Add support for CTF2301 Troy Mitchell
2025-09-16  5:02   ` Troy Mitchell
2025-09-24 15:43   ` Guenter Roeck
2025-09-26  1:32     ` Troy Mitchell
2025-09-26  3:57       ` Guenter Roeck
2025-09-26 13:21         ` Troy Mitchell [this message]
2025-09-26 13:33           ` Guenter Roeck

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=aNaTPE494MMExSBz@troy-wujie14pro-arch \
    --to=troy.mitchell@linux.dev \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --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