Skip to content

Commit

Permalink
iio: adc: ad9361: clamp the user entered RF BW between min/max
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Hennerich <[email protected]>
  • Loading branch information
mhennerich committed Feb 28, 2018
1 parent 06b6363 commit 7108b38
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 @@ -857,9 +857,9 @@ u32 ad9361_validate_rf_bw(struct ad9361_rf_phy *phy, u32 bw)
{
switch(spi_get_device_id(phy->spi)->driver_data) {
case ID_AD9363A:
return clamp_t(u32, bw, 0, 20000000UL);
return clamp_t(u32, bw, 200000UL, 20000000UL);
default:
return clamp_t(u32, bw, 0, 56000000UL);
return clamp_t(u32, bw, 200000UL, 56000000UL);
}
}

Expand Down

0 comments on commit 7108b38

Please sign in to comment.