From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-185.mta0.migadu.com (out-185.mta0.migadu.com [91.218.175.185]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 753BD22128D for ; Fri, 26 Sep 2025 13:21:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.185 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758892885; cv=none; b=BcdKhP3K7InkG56OoqVrms3j2IngpzMe+aCsC6K2SjcKY22bswWoo7khHwQcntD2gbkhc4urpc1ZSVj6r9w/aPRHeIL0f8y3z+llroyTfVpU9BTjDd/f+oauK2/b/GrpDPXL+e7VC+Qb5UVaKdl+QuusR36VULLv33arbyMbuCs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758892885; c=relaxed/simple; bh=wgA/KHhjj9nh98Q2K+I0SfkA1dG5Qo6UsV0GJJR0K78=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NhBILTnTJ7ctUgMejJA8b8/jblEEBY9YjINiR4AmoSCbiqlaFCG3g7PuhNBuY1vyBeg1qNlcEAHmLQ6Fu/ndylpYU7jtIouZv+sceUkgry60w6tfIiRspTHpu+SEKgm9Bm9flX8S7UyQbBB9lNDMkDwBV2lW1agbjBRoylXBQfE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=YkUKYeux; arc=none smtp.client-ip=91.218.175.185 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="YkUKYeux" Date: Fri, 26 Sep 2025 21:21:00 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1758892871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kS/CoKpI2O26sCXSiv4EiupTsdzTbhruWHTFDNF/B6E=; b=YkUKYeuxwSed5mqZY3/3VbIDplrQbnU0BQyGpRaweeUYdJumLK8deef1Tp0r7wqplNKpwg Cutjz+xCr/eeEfqtYnAVU6OygFzMkgLSw2KkURh6IgxBFQzc8QxwDYo14K4Ee1jQuCWLnX cPzJoWrUjQ7hovBJ/T49ILEI3dGg4nE= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Troy Mitchell To: Guenter Roeck , Troy Mitchell Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jean Delvare , 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 Message-ID: References: <20250916-ctl2301-v1-0-97e7c84f2c47@linux.dev> <20250916-ctl2301-v1-3-97e7c84f2c47@linux.dev> <53f1d5d2-c871-4823-ab13-8c3dfd86dbfe@roeck-us.net> <8c6f609e-c086-4b6c-abb5-8d33ec85df47@roeck-us.net> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8c6f609e-c086-4b6c-abb5-8d33ec85df47@roeck-us.net> X-Migadu-Flow: FLOW_OUT 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 >