Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp3144123rdb; Thu, 16 Nov 2023 01:04:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IFEdZuhq4pWZE0QyAEejaGefHkBhglNPrxin/7LENIDEirGDu9u++OkT/k1JrRcyjyBMgKe X-Received: by 2002:a17:90b:4f4c:b0:281:4fa7:7ab0 with SMTP id pj12-20020a17090b4f4c00b002814fa77ab0mr12054259pjb.24.1700125445249; Thu, 16 Nov 2023 01:04:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700125445; cv=none; d=google.com; s=arc-20160816; b=BoOhcS6MgTdDlStDI6M4GE5AWesn1OUJx2TwEsWOV7CyuWXQfW7os7DcoFrqBbkshY jNQ42ulsXy5zVYbrzjHO1H+/7Xqs0RwZYmEKTyhn9TmCCNZJR8qNBfOvf/2TJYinpEMt aYjQDx9TOCPZe1NwPk4GFuf+N70GUT1KqtTtGPPEwaS8tIQZbS1nUfLZrIfJ05gP4GZn xGNRlks6sq8PjQKLhQdAWKiw00or/gs160jptG7v9srnkb8qhE6mGCvDbPMG5EVi6KEY nnQcBEKNi0oDvYTp8tdwoSsqyXD2TzrnG/KLy/ZAE7Edk8u9NvONtniAQQyBBDfngcJq YetA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=El/JfzGdZ4cMju9ybKXdrUj42W3161BOT77MsxODMx8=; fh=ggDe2hCABdhwmBjYSig27+eDVHOAwsQ/7OKY9cqtB5g=; b=wr+86E+AFBATCbJC7fHGdlkAU61Psy3H8I+nTeESmpQz6P9K3RsXwNRk7Vo4DWDWbj jSjE6ZFn9utZFNx2vZ3XY16k7z+INR+59PmiVDQNl9zSF3Wb6AQgmV9GwxzPkJWPUMsK tw6d3xhkdsiPLOgXiEk/oYrKxmrUaSchz4RdG8X8YAYm5OEQegbsukKP5Z380TNMApfC PHOfGSUv/i1JsFVRoFCEx2To9rLKJ6L2KxGqodaB9fTgMVjV/q1M6KxckmgYQzKzS2R2 pVrOlaOL2LhYbv192fUGF2XVrAwnwvxauIfgf8saXBEq5LVcL9ty2Hal9w4RsNFRrMIG 7SLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=SJfy8Dk2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id h11-20020a17090acf0b00b002810b42f8a1si1597002pju.167.2023.11.16.01.04.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 01:04:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=SJfy8Dk2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 8F2F58149711; Thu, 16 Nov 2023 01:04:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230287AbjKPJD5 (ORCPT + 99 others); Thu, 16 Nov 2023 04:03:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229984AbjKPJD4 (ORCPT ); Thu, 16 Nov 2023 04:03:56 -0500 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F966A1; Thu, 16 Nov 2023 01:03:53 -0800 (PST) Received: by mail-pg1-x535.google.com with SMTP id 41be03b00d2f7-5ab94fc098cso404509a12.1; Thu, 16 Nov 2023 01:03:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700125433; x=1700730233; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=El/JfzGdZ4cMju9ybKXdrUj42W3161BOT77MsxODMx8=; b=SJfy8Dk2PNOzId9DBNElQjRhRrrvFXp2Hz652mR8k+QC2ThKaUUrrU07tqTU/ZBK7s sqy+pJawSnfUVRnNji8pK7Opi1jE6ynFbX5veXfB1ox1P8ISRhVcuNzWOfCgLUoNQshk T4b6K+6mRNbt6GYxTZ2P/UJ7GLqjM+z6gVHJONfB+oa79mQF4h3yAHKLk8Xa6jxtpKAw rNXOGCHhcawFzanD3dSJrOCQri1WqYYh1vfRgTXFm10vkRr3hBzttbwLmIvt1X+Dtb2L HSPSwYVRXLiv5uRr10hFI/fbWgyC9x15Vh8TgpjXqoWulrfz1XtXSQW/01NMMmx1TjYO O+eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700125433; x=1700730233; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=El/JfzGdZ4cMju9ybKXdrUj42W3161BOT77MsxODMx8=; b=kJ3mF3V1IznO2M2F3m4yRAFX8CZRiimh6QFaGCN5s4Tf+4s6rGYId4YTPjIIOzEUxP ivZfVjS61MGKWVfb58UY7O/HEo12LWVXXMeEaxV24dA3/PVHHnHpFbhwnmX+c0vtcEg4 URGCwBHPt2SPOsB8Kc8d2vQk9ok8g4f1o8SPE5okRcDftND25kSn1ETYUeeSaejUA26h 1HesAumn6DuezdFPu8L6apCgOUtAZWGP1wdru4Tce0+Gd5UMGCFVmIvyxoYPvzyoiPqo bYvQHPwCEi0Bfi0y0f20S8yADu3aDTdPJWiIW2d/8THSgWkrzIAcJYS/cljeqQ8cBWhJ vtAg== X-Gm-Message-State: AOJu0YwCTfu6cb2qCekQ16V9cpeALFHB8d6yMO6EoRhm251XUOHCzgJS qKYCIbovc5EzmJYuQK5kEIaFPOprj/A= X-Received: by 2002:a17:902:dad1:b0:1cc:70e4:28c7 with SMTP id q17-20020a170902dad100b001cc70e428c7mr8844794plx.18.1700125432659; Thu, 16 Nov 2023 01:03:52 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id j8-20020a17090276c800b001cc52ca2dfbsm8650307plt.120.2023.11.16.01.03.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 01:03:52 -0800 (PST) Sender: Guenter Roeck Date: Thu, 16 Nov 2023 01:03:51 -0800 From: Guenter Roeck To: Xing Tong Wu Cc: Jean Delvare , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, xingtong.wu@siemens.com, tobias.schaffner@siemens.com, gerd.haeussler.ext@siemens.com Subject: Re: [PATCH 1/3] hwmon: (nct6775) Fix incomplete register array Message-ID: <0ae18abe-121e-4a1c-a9aa-6b10db0c68d1@roeck-us.net> References: <20231116022330.2696-1-xingtong_wu@163.com> <20231116022330.2696-2-xingtong_wu@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231116022330.2696-2-xingtong_wu@163.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Thu, 16 Nov 2023 01:04:02 -0800 (PST) On Thu, Nov 16, 2023 at 10:23:28AM +0800, 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'll have to check the datasheet if this is generic, but at the very least it is incomplete and REG_PWM_MODE as well as REG_PWM_MODE_MASK would have to be updated as well. Also, I don't see an update to has_pwm, meaning the two additional pwm controls won't ever be used/enabled. Guenter