[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250206103153.59114-1-dheeraj.linuxdev@gmail.com>
Date: Thu, 6 Feb 2025 16:01:53 +0530
From: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@...il.com>
To: michael.hennerich@...log.com
Cc: lgirdwood@...il.com,
broonie@...nel.org,
linux-kernel@...r.kernel.org,
Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@...il.com>
Subject: [PATCH drivers-next] 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 <dheeraj.linuxdev@...il.com>
---
drivers/regulator/ad5398.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/ad5398.c b/drivers/regulator/ad5398.c
index 0274f41d0233..eb2a666a45cb 100644
--- a/drivers/regulator/ad5398.c
+++ b/drivers/regulator/ad5398.c
@@ -16,7 +16,7 @@
#include <linux/regulator/machine.h>
#include <linux/regulator/of_regulator.h>
-#define AD5398_SW_POWER_DOWN BIT(16)
+#define AD5398_SW_POWER_DOWN BIT(15)
struct ad5398_chip_info {
struct i2c_client *client;
--
2.34.1
Powered by blists - more mailing lists