From: Guenter Roeck <linux@roeck-us.net>
To: Xing Tong Wu <xingtong_wu@163.com>
Cc: Jean Delvare <jdelvare@suse.com>,
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
Date: Thu, 16 Nov 2023 01:03:51 -0800 [thread overview]
Message-ID: <0ae18abe-121e-4a1c-a9aa-6b10db0c68d1@roeck-us.net> (raw)
In-Reply-To: <20231116022330.2696-2-xingtong_wu@163.com>
On Thu, Nov 16, 2023 at 10:23:28AM +0800, Xing Tong Wu wrote:
> From: Xing Tong Wu <xingtong.wu@siemens.com>
>
> 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 <xingtong.wu@siemens.com>
> ---
> 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
next prev parent reply other threads:[~2023-11-16 9:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-16 2:23 [PATCH 0/3] *** hwmon: (nct6775) Fix pwm bugs for NCT chips *** Xing Tong Wu
2023-11-16 2:23 ` [PATCH 1/3] hwmon: (nct6775) Fix incomplete register array Xing Tong Wu
2023-11-16 9:03 ` Guenter Roeck [this message]
2023-11-17 1:35 ` Guenter Roeck
2023-11-20 3:30 ` xingtong.wu
2023-11-20 14:41 ` Guenter Roeck
2023-11-16 2:23 ` [PATCH 2/3] hwmon: (nct6775) Fix logic error for PWM enable Xing Tong Wu
2023-11-16 8:07 ` Guenter Roeck
2023-11-16 8:36 ` xingtong.wu
2023-11-16 8:48 ` Guenter Roeck
2023-11-16 8:44 ` Guenter Roeck
2023-11-16 2:23 ` [PATCH 3/3] hwmon: (nct6775) Fix fan speed set failure in automatic mode Xing Tong Wu
2023-11-16 8:12 ` 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=0ae18abe-121e-4a1c-a9aa-6b10db0c68d1@roeck-us.net \
--to=linux@roeck-us.net \
--cc=gerd.haeussler.ext@siemens.com \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tobias.schaffner@siemens.com \
--cc=xingtong.wu@siemens.com \
--cc=xingtong_wu@163.com \
/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®