Re: [PATCH v2 1/3] regulator: ad5398: change enable bit name to improve readibility
From: Guenter Roeck
Date: Wed Feb 05 2025 - 13:45:44 EST
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@xxxxxxxxxxxxxxxx>
> ---
[ ... ]
>
> -#define AD5398_CURRENT_EN_MASK 0x8000
> +#define AD5398_SW_POWER_DOWN BIT(16)
0x8000 is BIT(15).
Guenter