[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f66366da01ae84313f79b5990d9a906bf7a5eb1e.camel@ideasonboard.com>
Date: Thu, 06 Feb 2025 09:59:13 +0000
From: Isaac Scott <isaac.scott@...asonboard.com>
To: Guenter Roeck <linux@...ck-us.net>
Cc: michael.hennerich@...log.com, lgirdwood@...il.com, broonie@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/3] regulator: ad5398: change enable bit name to
improve readibility
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@...asonboard.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
Powered by blists - more mailing lists