Skip to content

Commit

Permalink
iio: adc: ad9361: Return ERROR code when writing manual gain in AGC m…
Browse files Browse the repository at this point in the history
…odes

Signed-off-by: Michael Hennerich <[email protected]>
  • Loading branch information
mhennerich committed Jan 23, 2018
1 parent 54b5e1a commit 101cdb9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/iio/adc/ad9361.c
Original file line number Diff line number Diff line change
Expand Up @@ -1813,6 +1813,7 @@ static int ad9361_set_rx_gain(struct ad9361_rf_phy *phy,

if (val != RX_GAIN_CTL_MGC) {
dev_dbg(dev, "Rx gain can be set in MGC mode only\n");
rc = -EOPNOTSUPP;
goto out;
}

Expand Down

1 comment on commit 101cdb9

@mhennerich
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tfcollins this fix will cause some noise with the GRC fmcomms blocks.

Executing: /usr/bin/python -u /home/michael/devel/pshare/top_block.py

Unable to write attribute in_voltage0_hardwaregain: -95

We should make sure we only write manual gain, in case MGC mode is selected

Please sign in to comment.