Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp219787rdb; Thu, 16 Nov 2023 17:35:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IGXgEr2cLL0yoMh4ySjK7lfasU0hZlRzJL9XC5v9EqfBUJFt+Kx/w1MQPDry4rpobe5bNsJ X-Received: by 2002:a05:6a00:39a5:b0:6c3:4cac:f9ad with SMTP id fi37-20020a056a0039a500b006c34cacf9admr17574920pfb.19.1700184928750; Thu, 16 Nov 2023 17:35:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700184928; cv=none; d=google.com; s=arc-20160816; b=vlKs9sCSORRabd915Bon+klRYHMU3o4RZ6aVx5huaUh9MbnnfNq+WK+/hxv/ybLPVR kPwP/zrHE6b78qGJFvNMeTcljAG0JBU2B8gmDYIXOQ1Ej0b32IaQCvJq+Gb0sNxZ6SLo qJzzPcJg///p6KHa9/jpR24ZooyIm431gxO0HwTi7QuW2trV7hKM0yE5bCtCTDZMpOjv hrTTjRi/gYyKnhEbYUiAWNLy6ohVP/nFztSe1nB+B4TgkF0ez8bRE1ltIwHICwJyhL+g fkdSzKoUsPhEc44AmxveQIWftUTcg6D6ijG0APJfdZDn1I7JTTVX4i2sr1+chIqfLjYw aKow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:sender:dkim-signature; bh=OkBcSVnpNbeyyADBZ1LokbbQAdLBUFLRlKJdrYzEzIY=; fh=P8RMg8PZJBo+gvAJo/8qCW8YPYBYVvA5xZCQOG89o8c=; b=b3cWSuqrlW84QyAj217zaaKI+sBLv8yutE0WzR58KnYrLZZ/jQ/nBZ1hezLX9pxweP SCojcTf5lup3QBypje8vM42M4JEUo2UFmDhMFjux/fEjOo7EkY3S61KwrM8aFR3aCgAt eAeeO3DdzwF37m6SrLVQvV6/xtD3yAdolPeoeuot/ph4nBGfNgaQMxFNim6uM/Lpqlxz 4DeDvdF/+M5ENGJdJA7FBncHK/VDys53ogVIzCgtnImRUJWAogQqyRo29+J9Sn7kEvPW V5yJ6ZKtEvnuiz+mKr66XvtoD6t4RTeMun1ECpmBy5c6E0q+0q4Rr2X7wlizUYaoG5+I KiNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RHN7JhUJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id g9-20020a632009000000b005b967ddd984si744768pgg.781.2023.11.16.17.35.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 17:35:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RHN7JhUJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8D6F582224E9; Thu, 16 Nov 2023 17:35:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345619AbjKQBf1 (ORCPT + 99 others); Thu, 16 Nov 2023 20:35:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229790AbjKQBfZ (ORCPT ); Thu, 16 Nov 2023 20:35:25 -0500 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0776FC5; Thu, 16 Nov 2023 17:35:23 -0800 (PST) Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1cc330e8f58so12495385ad.3; Thu, 16 Nov 2023 17:35:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700184922; x=1700789722; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=OkBcSVnpNbeyyADBZ1LokbbQAdLBUFLRlKJdrYzEzIY=; b=RHN7JhUJzvuEKqnHHs4pS4TiQ6/etiIpCPe5n5CNnsl85lwaI0NR2HOm9s9wRUPPg+ fnCqZb41y43rWetQFH3i4mBHQc/d9wqYn3Xttvg7fmdw3m92SwEoXLXKavZRzuNCUFCX 4NWP9IT/L8bQ+8S4TwfuMM2mpzv76qo9/E73i/GbS7hm1LsYHLg6Ex104YJnX9P0zjG6 neFmFKiX2FlFu2ebOUFzo2F9GcKPOkSTtJ/276WLGlYT2wbtReB2rWKW14h/1xcvhKgD 0i30hrr0P6T/6N251CMoIYsq0c17ZiyeD4IhNh2QvVJ+GXMDussRRqG06aflk9xY4ah/ iB5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700184922; x=1700789722; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OkBcSVnpNbeyyADBZ1LokbbQAdLBUFLRlKJdrYzEzIY=; b=F2QIFUPDJrGdRBND5gAtBVGhkgcuYk3DAS70oIC8vaCYFNcn1tWpdefdC7vyt8WdDz 1451imvDsA47AivK8dsPXOm0wIrFEukNYdGffxUcDKkaPfrJW++TP22I1dTOwrTSasdB YLUNqK95QOjoPcoKICUSmzIxMd0v3FwdKzXCpnoM9+T+34r985Zl2Z4/2RkH+IIMByeY CUW3vYn46i7x5RBlnMH2viBg7atkmBz0aUchB1nonl8HgDM8RTPzbNmwR0RcXulT8GZy lo6J0+4M37c3WgQfUsI0r2IskfB+QcccMRI298gYLOWX6qJfAZEAk2NZ/LwphiLT+GZK 3R/g== X-Gm-Message-State: AOJu0YxwpBZBSLJUt8/170YgsaENBNmEwQKvwpqpLatfJ6BaoAqkqnsO aCKGW5xbJcEWyOdTTNL3ULc= X-Received: by 2002:a17:903:110e:b0:1cc:4468:f1cf with SMTP id n14-20020a170903110e00b001cc4468f1cfmr11191260plh.3.1700184922230; Thu, 16 Nov 2023 17:35:22 -0800 (PST) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id jw11-20020a170903278b00b001cc3a6813f8sm298223plb.154.2023.11.16.17.35.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Nov 2023 17:35:21 -0800 (PST) Sender: Guenter Roeck Message-ID: Date: Thu, 16 Nov 2023 17:35:20 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/3] hwmon: (nct6775) Fix incomplete register array Content-Language: en-US To: Xing Tong Wu , Jean Delvare , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Cc: xingtong.wu@siemens.com, tobias.schaffner@siemens.com, gerd.haeussler.ext@siemens.com References: <20231116022330.2696-1-xingtong_wu@163.com> <20231116022330.2696-2-xingtong_wu@163.com> From: Guenter Roeck Autocrypt: addr=linux@roeck-us.net; keydata= xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+ApmcQ9i87XdZQiB9cpN RYHA7R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MKLQHgp04Vylb+G6jocnQQX JqvvP09whbqrABEBAAHCwWUEGAECAA8CGwwFAlVcpi8FCRmg08MACgkQyx8mb86fmYHNRQ/+ J0OZsBYP4leJvQF8lx9zif+v4ZY/6C9tTcUv/KNAE5leyrD4IKbnV4PnbrVhjq861it/zRQW cFpWQszZyWRwNPWUUz7ejmm9lAwPbr8xWT4qMSA43VKQ7ZCeTQJ4TC8kjqtcbw41SjkjrcTG wF52zFO4bOWyovVAPncvV9eGA/vtnd3xEZXQiSt91kBSqK28yjxAqK/c3G6i7IX2rg6pzgqh hiH3/1qM2M/LSuqAv0Rwrt/k+pZXE+B4Ud42hwmMr0TfhNxG+X7YKvjKC+SjPjqp0CaztQ0H nsDLSLElVROxCd9m8CAUuHplgmR3seYCOrT4jriMFBtKNPtj2EE4DNV4s7k0Zy+6iRQ8G8ng QjsSqYJx8iAR8JRB7Gm2rQOMv8lSRdjva++GT0VLXtHULdlzg8VjDnFZ3lfz5PWEOeIMk7Rj trjv82EZtrhLuLjHRCaG50OOm0hwPSk1J64R8O3HjSLdertmw7eyAYOo4RuWJguYMg5DRnBk WkRwrSuCn7UG+qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= In-Reply-To: <20231116022330.2696-2-xingtong_wu@163.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 16 Nov 2023 17:35:27 -0800 (PST) On 11/15/23 18:23, Xing Tong Wu wrote: > From: Xing Tong Wu > > The nct6116 specification actually includes 5 PWMs, but only 3 > PWMs are present in the array. To address this, the missing 2 > PWMs have been added to the array. > > Signed-off-by: Xing Tong Wu > --- > drivers/hwmon/nct6775-core.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/hwmon/nct6775-core.c b/drivers/hwmon/nct6775-core.c > index d928eb8ae5a3..2111f0cd9787 100644 > --- a/drivers/hwmon/nct6775-core.c > +++ b/drivers/hwmon/nct6775-core.c > @@ -769,7 +769,7 @@ static const u16 NCT6106_FAN_PULSE_SHIFT[] = { 0, 2, 4 }; > > static const u8 NCT6106_REG_PWM_MODE[] = { 0xf3, 0xf3, 0xf3 }; > static const u8 NCT6106_PWM_MODE_MASK[] = { 0x01, 0x02, 0x04 }; > -static const u16 NCT6106_REG_PWM_READ[] = { 0x4a, 0x4b, 0x4c }; > +static const u16 NCT6106_REG_PWM_READ[] = { 0x4a, 0x4b, 0x4c, 0xd8, 0xd9 }; I have no idea where you got the above register addresses from. Looking at the datasheet, NCT6116 doesn't use those registers at all, and neither does NCT6106. The PWM registers for NCT6116 are static const u16 NCT6116_REG_PWM[] = { 0x119, 0x129, 0x139, 0x199, 0x1a9 }; > static const u16 NCT6106_REG_FAN_MODE[] = { 0x113, 0x123, 0x133 }; > static const u16 NCT6106_REG_TEMP_SOURCE[] = { > 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5 }; > @@ -3595,7 +3595,7 @@ int nct6775_probe(struct device *dev, struct nct6775_data *data, > break; > case nct6116: > data->in_num = 9; > - data->pwm_num = 3; > + data->pwm_num = 5; This does look correct, though. Guenter > data->auto_pwm_num = 4; > data->temp_fixed_num = 3; > data->num_temp_alarms = 3;