Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: Tzung-Bi Shih <tzungbi@kernel.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Hardware Monitoring <linux-hwmon@vger.kernel.org>
Subject: Re: [PATCH 3/6] hwmon: (max1619) Convert to use regmap
Date: Sun, 28 Jul 2024 20:17:01 +0800	[thread overview]
Message-ID: <ZqY2vXjiJb51TVeA@tzungbi-laptop> (raw)
In-Reply-To: <b421990b-3594-4a7a-af83-71c5f21891f5@roeck-us.net>

On Sat, Jul 27, 2024 at 10:22:42PM -0700, Guenter Roeck wrote:
> On 7/27/24 21:26, Tzung-Bi Shih wrote:
> > On Sat, Jul 27, 2024 at 07:38:17AM -0700, Guenter Roeck wrote:
> > > +static int get_alarms(struct regmap *regmap)
> > > +{
> > > +	static u32 regs[2] = { MAX1619_REG_STATUS, MAX1619_REG_CONFIG };
> > > +	u8 regdata[2];
> > > +	int ret;
> > > +
> > > +	ret = regmap_multi_reg_read(regmap, regs, regdata, 2);
> > > +	if (ret)
> > > +		return ret;
> > > +
> > > +	/* OVERT status bit may be reversed */
> > > +	if (!(regdata[1] & 0x20))
> > > +		regdata[0] ^= 0x02;
> > > +
> > > +	return regdata[0] & 0x1e;
> > 
> > Why `& 0x1e`?  Original max1619_update_device() doesn't do that.
> > 
> 
> Bit 7 is the busy bit, and the other three masked bits are reserved.
> Maybe I should make that change in a separate patch. What do you think ?

Yes, please separate the change.

  reply	other threads:[~2024-07-28 12:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-27 14:38 [PATCH 1/6] hwmon: (max1619) Modernize driver Guenter Roeck
2024-07-27 14:38 ` [PATCH 1/6] hwmon: (max1619) Clamp temperature range when writing limits Guenter Roeck
2024-07-28  4:25   ` Tzung-Bi Shih
2024-07-27 14:38 ` [PATCH 2/6] hwmon: (max1619) Reorder include files to alphabetic order Guenter Roeck
2024-07-28  4:25   ` Tzung-Bi Shih
2024-07-27 14:38 ` [PATCH 3/6] hwmon: (max1619) Convert to use regmap Guenter Roeck
2024-07-28  4:26   ` Tzung-Bi Shih
2024-07-28  5:22     ` Guenter Roeck
2024-07-28 12:17       ` Tzung-Bi Shih [this message]
2024-07-27 14:38 ` [PATCH 4/6] hwmon: (max1619) Convert to with_info API Guenter Roeck
2024-07-28  4:26   ` Tzung-Bi Shih
2024-07-27 14:38 ` [PATCH 5/6] hwmon: (max1619) Add support for update_interval attribute Guenter Roeck
2024-07-28  4:26   ` Tzung-Bi Shih
2024-07-27 14:38 ` [PATCH 6/6] hwmon: (max1619) Improve chip detection code Guenter Roeck
2024-07-28  4:26   ` Tzung-Bi Shih

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=ZqY2vXjiJb51TVeA@tzungbi-laptop \
    --to=tzungbi@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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