Re: [PATCH] staging: iio: ad5933: fix handling of settling time cycles

2016-06-01 Thread Luis de Bethencourt
On 01/06/16 17:22, Lars-Peter Clausen wrote: > On 06/01/2016 05:55 PM, Luis de Bethencourt wrote: >> Correctly handle the settling time cycles value. The else branch was an >> impossible condition (> 1022 in the else branch of > 511) and the handling >> of the values was dividing by 2 and 4, with

Re: [PATCH] staging: iio: ad5933: fix handling of settling time cycles

2016-06-01 Thread Lars-Peter Clausen
On 06/01/2016 05:55 PM, Luis de Bethencourt wrote: > Correctly handle the settling time cycles value. The else branch was an > impossible condition (> 1022 in the else branch of > 511) and the handling > of the values was dividing by 2 and 4, with a left shift, instead of > multiplying. > > Based

[PATCH] staging: iio: ad5933: fix handling of settling time cycles

2016-06-01 Thread Luis de Bethencourt
Correctly handle the settling time cycles value. The else branch was an impossible condition (> 1022 in the else branch of > 511) and the handling of the values was dividing by 2 and 4, with a left shift, instead of multiplying. Based on the Table 13 at the bottom of Page 25 of the Data Sheet: