All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com>
To: michael.hennerich@analog.com
Cc: lgirdwood@gmail.com, broonie@kernel.org,
	linux-kernel@vger.kernel.org,
	Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com>
Subject: [PATCH drivers-next] regulator: ad5398: Fix incorrect power down bit mask
Date: Thu,  6 Feb 2025 16:01:53 +0530	[thread overview]
Message-ID: <20250206103153.59114-1-dheeraj.linuxdev@gmail.com> (raw)

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@gmail.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


             reply	other threads:[~2025-02-06 10:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-06 10:31 Dheeraj Reddy Jonnalagadda [this message]
2025-02-06 11:28 ` [PATCH drivers-next] regulator: ad5398: Fix incorrect power down bit mask Mark Brown
2025-02-06 13:55 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250206103153.59114-1-dheeraj.linuxdev@gmail.com \
    --to=dheeraj.linuxdev@gmail.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.