Skip to content

Commit 3920474

Browse files
mhennerichrodrigo455
authored andcommitted
iio: amplifiers: ad8366: Fix ADRF5720/30/31 gain calculation
This fixes and inverted gain read. Fixes: f4a69c8 ("iio: amplifiers: ad8366: Update device support") Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
1 parent f4a69c8 commit 3920474

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/iio/amplifiers/ad8366.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,10 @@ static int ad8366_read_raw(struct iio_dev *indio_dev,
181181
break;
182182
case ID_ADRF5720:
183183
case ID_ADRF5730:
184-
gain = -31500 + code * 500;
184+
gain = -1 * code * 500;
185185
break;
186186
case ID_ADRF5731:
187-
gain = -30000 + code * 500;
187+
gain = -1 * code * 500;
188188
break;
189189
case ID_HMC792:
190190
gain = -1 * code * 500;

0 commit comments

Comments
 (0)