The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH drivers-next] regulator: ad5398: Fix incorrect power down bit mask
@ 2025-02-06 10:31 Dheeraj Reddy Jonnalagadda
  2025-02-06 11:28 ` Mark Brown
  2025-02-06 13:55 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Dheeraj Reddy Jonnalagadda @ 2025-02-06 10:31 UTC (permalink / raw)
  To: michael.hennerich
  Cc: lgirdwood, broonie, linux-kernel, Dheeraj Reddy Jonnalagadda

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH drivers-next] regulator: ad5398: Fix incorrect power down bit mask
  2025-02-06 10:31 [PATCH drivers-next] regulator: ad5398: Fix incorrect power down bit mask Dheeraj Reddy Jonnalagadda
@ 2025-02-06 11:28 ` Mark Brown
  2025-02-06 13:55 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2025-02-06 11:28 UTC (permalink / raw)
  To: Dheeraj Reddy Jonnalagadda; +Cc: michael.hennerich, lgirdwood, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 425 bytes --]

On Thu, Feb 06, 2025 at 04:01:53PM +0530, Dheeraj Reddy Jonnalagadda wrote:
> 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.

Please don't add noise like drivers-next to your subject lines - it just
makes it harder to see the actual subject.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH drivers-next] regulator: ad5398: Fix incorrect power down bit mask
  2025-02-06 10:31 [PATCH drivers-next] regulator: ad5398: Fix incorrect power down bit mask Dheeraj Reddy Jonnalagadda
  2025-02-06 11:28 ` Mark Brown
@ 2025-02-06 13:55 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2025-02-06 13:55 UTC (permalink / raw)
  To: michael.hennerich, Dheeraj Reddy Jonnalagadda; +Cc: lgirdwood, linux-kernel

On Thu, 06 Feb 2025 16:01:53 +0530, Dheeraj Reddy Jonnalagadda wrote:
> 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.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/1] regulator: ad5398: Fix incorrect power down bit mask
      commit: 0a7c85b516830c0bb088b0bdb2f2c50c76fc531a

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-06 13:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-06 10:31 [PATCH drivers-next] regulator: ad5398: Fix incorrect power down bit mask Dheeraj Reddy Jonnalagadda
2025-02-06 11:28 ` Mark Brown
2025-02-06 13:55 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox