mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: 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 06:33:46 -0700	[thread overview]
Message-ID: <3bf744e2-aced-482d-9690-1bb3354aafad@roeck-us.net> (raw)
In-Reply-To: <aNaTPE494MMExSBz@troy-wujie14pro-arch>

On 9/26/25 06:21, Troy Mitchell wrote:
> 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?
> 
Yes.

Thanks,
Guenter


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

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-16  4:46 [PATCH 0/3] " 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
2025-09-26 13:33           ` Guenter Roeck [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=3bf744e2-aced-482d-9690-1bb3354aafad@roeck-us.net \
    --to=linux@roeck-us.net \
    --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=robh@kernel.org \
    --cc=troy.mitchell@linux.dev \
    /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®