From: Dheeraj Reddy Jonnalagadda Date: Thu, 6 Feb 2025 10:31:53 +0000 (+0530) Subject: regulator: ad5398: Fix incorrect power down bit mask X-Git-Tag: v6.15-rc1~183^2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a7c85b516830c0bb088b0bdb2f2c50c76fc531a;p=thirdparty%2Fkernel%2Flinux.git regulator: ad5398: Fix incorrect power down bit mask AD5398_SW_POWER_DOWN was defined with a bit position outside the valid range of the device's 16-bit register. The bitwise operation with an unsigned short would always evaluate to 0, making the power down check ineffective. Update AD5398_SW_POWER_DOWN to use a valid bit position within the 16-bit range of the register. Fixes: 19d022d67d73 ("regulator: ad5398: change enable bit name to improve readibility") Signed-off-by: Dheeraj Reddy Jonnalagadda Link: https://patch.msgid.link/20250206103153.59114-1-dheeraj.linuxdev@gmail.com Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/ad5398.c b/drivers/regulator/ad5398.c index 0274f41d0233a..eb2a666a45cba 100644 --- a/drivers/regulator/ad5398.c +++ b/drivers/regulator/ad5398.c @@ -16,7 +16,7 @@ #include #include -#define AD5398_SW_POWER_DOWN BIT(16) +#define AD5398_SW_POWER_DOWN BIT(15) struct ad5398_chip_info { struct i2c_client *client;