[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bf646a72-1695-4305-be7e-a64ce9d32523@roeck-us.net>
Date: Wed, 5 Feb 2025 10:45:26 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Isaac Scott <isaac.scott@...asonboard.com>
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
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).
Guenter
Powered by blists - more mailing lists