Skip to contentSkip to conversation

patch "iio: adc: rtq6056: Correct the sign bit index" added to char-misc-linus

PATCH [email protected] 1 participant 1 message Nov 13, 2025

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

iio: adc: rtq6056: Correct the sign bit index

to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

From 9b45744bf09fc2a3287e05287141d6e123c125a7 Mon Sep 17 00:00:00 2001
From: ChiYuan Huang <[email protected]>
Date: Thu, 18 Sep 2025 11:10:59 +0800
Subject: iio: adc: rtq6056: Correct the sign bit index

The vshunt/current reported register is a signed 16bit integer. The sign bit index should be '15', not '16'.

Fixes 4396f45d211b ("iio: adc: Add rtq6056 support")
---
 drivers/iio/adc/rtq6056.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/rtq6056.c +1 -1
index ad9738228b7f..2bf3a09ac6b0 100644
@@ -300,7 +300,7 @@ static int rtq6056_adc_read_channel(struct rtq6056_priv *priv,
 		return IIO_VAL_INT;
 	case RTQ6056_REG_SHUNTVOLT:
 	case RTQ6056_REG_CURRENT:
-		*val = sign_extend32(regval, 16);
+		*val = sign_extend32(regval, 15);
 		return IIO_VAL_INT;
 	default:
 		return -EINVAL;
Signature · 1 line
2.51.2