mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Isaac Scott <isaac.scott@ideasonboard.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: michael.hennerich@analog.com, lgirdwood@gmail.com,
	broonie@kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] regulator: ad5398: change enable bit name to improve readibility
Date: Thu, 06 Feb 2025 09:59:13 +0000	[thread overview]
Message-ID: <f66366da01ae84313f79b5990d9a906bf7a5eb1e.camel@ideasonboard.com> (raw)
In-Reply-To: <bf646a72-1695-4305-be7e-a64ce9d32523@roeck-us.net>

Hi Guenter,

On Wed, 2025-02-05 at 10:45 -0800, Guenter Roeck wrote:
> On Tue, Jan 28, 2025 at 05:31:41PM +0000, Isaac Scott wrote:
> > The mask name AD5398_CURRENT_EN_MASK is misleading, as it implies
> > that
> > setting bit 16 of the AD5398 enables current flow. In fact, setting
> > this
> > bit prevents current flow, due to this bit being a software power
> > down
> > control. This bit is referred to as "soft power down" in the
> > datasheet.
> > As such, change the name of the bit and modify its use in the
> > driver to
> > make the regulator more intuitively usable.
> > 
> > (When calling ad5398_enable, current will start flowing, and vice
> > versa).
> > 
> > Signed-off-by: Isaac Scott <isaac.scott@ideasonboard.com>
> > ---
> [ ... ]
> >  
> > -#define AD5398_CURRENT_EN_MASK	0x8000
> > +#define AD5398_SW_POWER_DOWN	BIT(16)
> 
> 0x8000 is BIT(15).

You're totally right! The reason this got through is because in my use
case, I am powering the regulator on and off in multiple ways. This
should definitely be BIT(15), so I will send a V3 shortly.

Thank you very much!

Best wishes,

Isaac

> 
> Guenter


  reply	other threads:[~2025-02-06  9:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-28 17:31 [PATCH v2 0/3] regulator: Add device tree support to AD5398 Isaac Scott
2025-01-28 17:31 ` [PATCH v2 1/3] regulator: ad5398: change enable bit name to improve readibility Isaac Scott
2025-01-29  8:31   ` Hennerich, Michael
2025-02-05 18:45   ` Guenter Roeck
2025-02-06  9:59     ` Isaac Scott [this message]
2025-02-06 11:30       ` Mark Brown
2025-01-28 17:31 ` [PATCH v2 2/3] RFC: regulator: ad5398: Change selector division calculation Isaac Scott
2025-01-29  8:34   ` Hennerich, Michael
2025-01-29 18:21     ` Isaac Scott
2025-02-06 13:38     ` Isaac Scott
2025-01-28 17:31 ` [PATCH v2 3/3] regulator: ad5398: Add device tree support Isaac Scott
2025-01-29  8:32   ` Hennerich, Michael
2025-02-03 19:57 ` (subset) [PATCH v2 0/3] regulator: Add device tree support to AD5398 Mark Brown

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=f66366da01ae84313f79b5990d9a906bf7a5eb1e.camel@ideasonboard.com \
    --to=isaac.scott@ideasonboard.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=michael.hennerich@analog.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®