Second set of IIO fix for the 5.3 cycle.
* adf4371
- Calculation of the value to program to control the output frequency
was incorrect.
* max9611
- Fix temperature reading in probe. A recent fix for a wrong mask
meant this code was looked at afresh. A second bug became obvious
in which the return value was used inplace of the desired register
value. This had no visible effect other than a communication test
not actually testing the communications.
-----BEGIN PGP SIGNATURE-----
iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAl1Ru4ARHGppYzIzQGtl
cm5lbC5vcmcACgkQVIU0mcT0FoiYQxAApOyWvu9pc1Kt040iO4dHTgT4gZTKBl8N
W3tXRKLC8kS9K6SyDi6OZBCDGRpnUZPKWtqaSmjY/sGe0KQr0XTnCNXRgXooNHkK
L1ky7scG69y1yEIa0ruSegnPLszyh8axt8FMkAN5gxBu7fCduY9EujbWYCa6mRLD
O0j3KH2ATSrXFRw9GNAGiU2Nul3GMTmDpoFVcyHXhJmtBU6deexXEC7/bZ+q7W8m
xjfmceBbkxTzyMc7u2V9y9OJg0GllHqcEe12wsmR04pPAWaVFIeGRDaPkq6TpZo1
IH1Hn4HxuJp9Hlk3LLyCRtQ5RthNE1BcQeLDVNPoq91Fcn364m/8nDfOaQ6UHkU2
cpumNcewzYMTaNKHpq6mr6yKufR8EG+/yir35B3JSwrD0yI5DxAE1A8nPTbvuAsB
VXhEwArtzm9F7lssK6fAxubi3jLBnQHW6TW2p7s314nFVdh8FEgD6UwnVezX7w53
8p+1LROVBJ5CDS/gCMho6JALf7sLapwLZ32cr7yF5kAU7/UQGeFQl9HOZzMf48r4
FCxJjac5hq/ykFqG5Fk+D96tQHdUVf3eNNnA+6LVzybxVEHcL5E56fCnxFFsfOGE
KbC+mE9Y/B6BrobG71MLJVf1x9I7Eqgy5Sufd2ylDXRf9YbbDCSiERTB98IL6l94
Cwjra+PuZJE=
=bhXg
-----END PGP SIGNATURE-----
Merge tag 'iio-fixes-for-5.3b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
Jonathan writes:
Second set of IIO fix for the 5.3 cycle.
* adf4371
- Calculation of the value to program to control the output frequency
was incorrect.
* max9611
- Fix temperature reading in probe. A recent fix for a wrong mask
meant this code was looked at afresh. A second bug became obvious
in which the return value was used inplace of the desired register
value. This had no visible effect other than a communication test
not actually testing the communications.
* tag 'iio-fixes-for-5.3b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio:
iio: adc: max9611: Fix temperature reading in probe
iio: frequency: adf4371: Fix output frequency setting
This commit is contained in:
commit
48b30e10bf
2 changed files with 5 additions and 5 deletions
|
|
@ -480,7 +480,7 @@ static int max9611_init(struct max9611_dev *max9611)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
regval = ret & MAX9611_TEMP_MASK;
|
||||
regval &= MAX9611_TEMP_MASK;
|
||||
|
||||
if ((regval > MAX9611_TEMP_MAX_POS &&
|
||||
regval < MAX9611_TEMP_MIN_NEG) ||
|
||||
|
|
|
|||
|
|
@ -276,11 +276,11 @@ static int adf4371_set_freq(struct adf4371_state *st, unsigned long long freq,
|
|||
st->buf[0] = st->integer >> 8;
|
||||
st->buf[1] = 0x40; /* REG12 default */
|
||||
st->buf[2] = 0x00;
|
||||
st->buf[3] = st->fract2 & 0xFF;
|
||||
st->buf[4] = st->fract2 >> 7;
|
||||
st->buf[5] = st->fract2 >> 15;
|
||||
st->buf[3] = st->fract1 & 0xFF;
|
||||
st->buf[4] = st->fract1 >> 8;
|
||||
st->buf[5] = st->fract1 >> 16;
|
||||
st->buf[6] = ADF4371_FRAC2WORD_L(st->fract2 & 0x7F) |
|
||||
ADF4371_FRAC1WORD(st->fract1 >> 23);
|
||||
ADF4371_FRAC1WORD(st->fract1 >> 24);
|
||||
st->buf[7] = ADF4371_FRAC2WORD_H(st->fract2 >> 7);
|
||||
st->buf[8] = st->mod2 & 0xFF;
|
||||
st->buf[9] = ADF4371_MOD2WORD(st->mod2 >> 8);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue