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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 3c32a43 commit 0a7c85b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)