Skip to content

Commit 0a7c85b

Browse files
Dheeraj Reddy Jonnalagaddabroonie
authored andcommitted
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: 19d022d ("regulator: ad5398: change enable bit name to improve readibility") Signed-off-by: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com> Link: https://patch.msgid.link/20250206103153.59114-1-dheeraj.linuxdev@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 3c32a43 commit 0a7c85b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/regulator/ad5398.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <linux/regulator/machine.h>
1717
#include <linux/regulator/of_regulator.h>
1818

19-
#define AD5398_SW_POWER_DOWN BIT(16)
19+
#define AD5398_SW_POWER_DOWN BIT(15)
2020

2121
struct ad5398_chip_info {
2222
struct i2c_client *client;

0 commit comments

Comments
 (0)