Skip to content

Commit

Permalink
iio: adc: ad9361: Fix erroneous clearing of the TO_ALERT bit
Browse files Browse the repository at this point in the history
The TO_ALERT bit should always be set during normal operation.
Only intentionally when entering SLEEP or WAIT state we need to clear it.
This fixes an issue when in ENSM pin control mode, a calibration is
issued, either by changing TX LO > 100MHz or calling any of the manual
calibration modes.

Signed-off-by: Michael Hennerich <[email protected]>
  • Loading branch information
mhennerich committed Jan 23, 2018
1 parent 7515399 commit 54b5e1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/iio/adc/ad9361.c
Original file line number Diff line number Diff line change
Expand Up @@ -1650,8 +1650,8 @@ void ad9361_ensm_restore_prev_state(struct ad9361_rf_phy *phy)
/* We are restoring state only, so clear State bits first
* which might have set while forcing a particular state
*/
val &= ~(FORCE_TX_ON | FORCE_RX_ON |
TO_ALERT | FORCE_ALERT_STATE);
val &= ~(FORCE_TX_ON | FORCE_RX_ON | FORCE_ALERT_STATE);
val |= TO_ALERT;

switch (phy->prev_ensm_state) {

Expand Down

0 comments on commit 54b5e1a

Please sign in to comment.