From 2360bdddc8e093cf6f8ab691399066d15c343be0 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Thu, 9 Feb 2023 13:18:44 -0500 Subject: [PATCH] Fixes for 4.19 Signed-off-by: Sasha Levin --- ...dc-twl6030-enable-measurement-of-vac.patch | 39 +++++++++++++++++++ queue-4.19/series | 1 + 2 files changed, 40 insertions(+) create mode 100644 queue-4.19/iio-adc-twl6030-enable-measurement-of-vac.patch diff --git a/queue-4.19/iio-adc-twl6030-enable-measurement-of-vac.patch b/queue-4.19/iio-adc-twl6030-enable-measurement-of-vac.patch new file mode 100644 index 00000000000..a5965be9250 --- /dev/null +++ b/queue-4.19/iio-adc-twl6030-enable-measurement-of-vac.patch @@ -0,0 +1,39 @@ +From 9430f06fb2de20597bf0163754b52bf3c0ae94dd Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sat, 17 Dec 2022 23:13:05 +0100 +Subject: iio:adc:twl6030: Enable measurement of VAC + +From: Andreas Kemnade + +[ Upstream commit bffb7d9d1a3dbd09e083b88aefd093b3b10abbfb ] + +VAC needs to be wired up to produce proper measurements, +without this change only near zero values are reported. + +Reported-by: kernel test robot +Reported-by: Julia Lawall +Fixes: 1696f36482e7 ("iio: twl6030-gpadc: TWL6030, TWL6032 GPADC driver") +Signed-off-by: Andreas Kemnade +Link: https://lore.kernel.org/r/20221217221305.671117-1-andreas@kemnade.info +Signed-off-by: Jonathan Cameron +Signed-off-by: Sasha Levin +--- + drivers/iio/adc/twl6030-gpadc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/iio/adc/twl6030-gpadc.c b/drivers/iio/adc/twl6030-gpadc.c +index b9c4722063eb0..3007cfbf84918 100644 +--- a/drivers/iio/adc/twl6030-gpadc.c ++++ b/drivers/iio/adc/twl6030-gpadc.c +@@ -968,7 +968,7 @@ static int twl6030_gpadc_probe(struct platform_device *pdev) + } + + ret = twl_i2c_write_u8(TWL6030_MODULE_ID0, +- VBAT_MEAS | BB_MEAS | BB_MEAS, ++ VBAT_MEAS | BB_MEAS | VAC_MEAS, + TWL6030_MISC1); + if (ret < 0) { + dev_err(dev, "failed to wire up inputs\n"); +-- +2.39.0 + diff --git a/queue-4.19/series b/queue-4.19/series index 9a2a67ea2ee..861f394f486 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -39,3 +39,4 @@ squashfs-fix-handling-and-sanity-checking-of-xattr_ids-count.patch serial-8250_dma-fix-dma-rx-completion-race.patch serial-8250_dma-fix-dma-rx-rearm-race.patch thermal-intel-int340x-add-locking-to-int340x_thermal_get_trip_type.patch +iio-adc-twl6030-enable-measurement-of-vac.patch -- 2.47.3