patch "iio: admv1013: add mixer_vgate corner cases" added to char-misc-linus
This is a note to let you know that I've just added the patch titled
iio: admv1013: add mixer_vgate corner cases
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 287d998af24326b009ae0956820a3188501b34a0 Mon Sep 17 00:00:00 2001
From: Antoniu Miclaus <[email protected]>
Date: Mon, 7 Aug 2023 17:38:05 +0300
Subject: iio: admv1013: add mixer_vgate corner cases
Include the corner cases in the computation of the MIXER_VGATE register value.
According to the datasheet: The MIXER_VGATE values follows the VCM such as, that for a 0V to 1.8V VCM, MIXER_VGATE = 23.89 VCM + 81, and for a > 1.8V to 2.6V VCM, MIXER_VGATE = 23.75 VCM + 1.25.
--- drivers/iio/frequency/admv1013.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/frequency/admv1013.c +2 -2
@@ -351,9 +351,9 @@ static int admv1013_update_mixer_vgate(struct admv1013_state *st)if (vcm <0 )return vcm; -if (vcm <1800000 ) +if (vcm <=1800000 ) mixer_vgate = (2389 * vcm /1000000 +8100 ) /100 ; -else if (vcm >1800000 && vcm <2600000 ) +else if (vcm >1800000 && vcm <=2600000 ) mixer_vgate = (2375 * vcm /1000000 +125 ) /100 ;else return -EINVAL ;
Signature · 1 line
2.42.0