First round of IIO fixes for the 4.6 cycle.

Again I've ended up with two early fix sets, depending on whether they are
 dependent on elements of the merge window or simply came in after I had
 patches with that dependency already, vs older fixes that were just too
 late for the last cycle.  This first set is for the older ones.
 
 - max1353
   * Add a missing adc to max1363_id - the driver has supported the
     max11644-11647 for a while, but as they weren't in the id table there
     was no way of actually initializing it.
   * Fix a wrong reference voltage for the above models.  Given you couldn't
     initialize the driver for these parts without patching, no one noticed
     that the reference voltage used in computing the scaling was wrong.
  - apds9960
    * The fifo last enelement was read twice (and hence pushed out twice) due
      to a small logic bug.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJXAXr7AAoJEFSFNJnE9BaItS0P/2wAnYTMEU67ja9SSu6Z2oeU
 rxDesnKm0g/coa1+nx42lb8fXfYQKCb57o234fq9odKKuc1g7K77Fdaf3/bv8HD6
 sPbDqHx66yk5iYPAAOn8pAYpB6GPzhN5xLE7oJzuHs/qLuUn36G09PL1lo1sdVdF
 3wT7U3bOgdaRcQyxQJ6zR229Vq9kgG1RHYeqFzooO/Al+IgfCW5F3MNJWKUr4UpP
 IHyusbpH5vjVMTqs1WNmcT3q7miFGl8FeEFVFXFv7rjrYD24Zvl+CiZTA8zyai0/
 kOF1ptsw3WuxTfshTMiv7PX0HzNerPrRCIXqoNjpN++k234K+mDU/hjeACoRe5jH
 ud4zxkOx7ssmPk8xh5U9ICD+AFcFVrhpVQq6esqkukaYA/CXGbY99e9p0TRH/7T7
 I/53xBnesyCPPV5ppr5J7Mbgzd4jdVsQN+Cj5aVpTyg2PkP+WqM2xx9nEfrfcg1T
 RCv02PFZFrZsECRT35pOmbM5FMnU83sW5CZak11I5cHMEDPU+TCq89H226ppHP2O
 3HwGB+s473whNfRBPrVGcTZSx71li3orv4XNYX3wFNMLdWXzIDlGlWk52I3NqKwi
 GEdYvsdKjFoTho/nWgxyw/Nqqj9wtrCznbvSCnWwJf9a0AxdzKurFCygfKoCskAC
 XcdojNMWdwLH4twvPT7z
 =Bfg6
 -----END PGP SIGNATURE-----

Merge tag 'iio-fixes-for-4.6a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into usb-linus

Jonathan writes:

First round of IIO fixes for the 4.6 cycle.

Again I've ended up with two early fix sets, depending on whether they are
dependent on elements of the merge window or simply came in after I had
patches with that dependency already, vs older fixes that were just too
late for the last cycle.  This first set is for the older ones.

- max1353
  * Add a missing adc to max1363_id - the driver has supported the
    max11644-11647 for a while, but as they weren't in the id table there
    was no way of actually initializing it.
  * Fix a wrong reference voltage for the above models.  Given you couldn't
    initialize the driver for these parts without patching, no one noticed
    that the reference voltage used in computing the scaling was wrong.
 - apds9960
   * The fifo last enelement was read twice (and hence pushed out twice) due
     to a small logic bug.
This commit is contained in:
Greg Kroah-Hartman 2016-04-04 12:59:48 -07:00
Родитель f55532a0c0 655048a0b9
Коммит a34d5df85e
2 изменённых файлов: 10 добавлений и 5 удалений

Просмотреть файл

@ -1386,7 +1386,7 @@ static const struct max1363_chip_info max1363_chip_info_tbl[] = {
},
[max11644] = {
.bits = 12,
.int_vref_mv = 2048,
.int_vref_mv = 4096,
.mode_list = max11644_mode_list,
.num_modes = ARRAY_SIZE(max11644_mode_list),
.default_mode = s0to1,
@ -1396,7 +1396,7 @@ static const struct max1363_chip_info max1363_chip_info_tbl[] = {
},
[max11645] = {
.bits = 12,
.int_vref_mv = 4096,
.int_vref_mv = 2048,
.mode_list = max11644_mode_list,
.num_modes = ARRAY_SIZE(max11644_mode_list),
.default_mode = s0to1,
@ -1406,7 +1406,7 @@ static const struct max1363_chip_info max1363_chip_info_tbl[] = {
},
[max11646] = {
.bits = 10,
.int_vref_mv = 2048,
.int_vref_mv = 4096,
.mode_list = max11644_mode_list,
.num_modes = ARRAY_SIZE(max11644_mode_list),
.default_mode = s0to1,
@ -1416,7 +1416,7 @@ static const struct max1363_chip_info max1363_chip_info_tbl[] = {
},
[max11647] = {
.bits = 10,
.int_vref_mv = 4096,
.int_vref_mv = 2048,
.mode_list = max11644_mode_list,
.num_modes = ARRAY_SIZE(max11644_mode_list),
.default_mode = s0to1,
@ -1680,6 +1680,10 @@ static const struct i2c_device_id max1363_id[] = {
{ "max11615", max11615 },
{ "max11616", max11616 },
{ "max11617", max11617 },
{ "max11644", max11644 },
{ "max11645", max11645 },
{ "max11646", max11646 },
{ "max11647", max11647 },
{}
};

Просмотреть файл

@ -769,7 +769,7 @@ static void apds9960_read_gesture_fifo(struct apds9960_data *data)
mutex_lock(&data->lock);
data->gesture_mode_running = 1;
while (cnt-- || (cnt = apds9660_fifo_is_empty(data) > 0)) {
while (cnt || (cnt = apds9660_fifo_is_empty(data) > 0)) {
ret = regmap_bulk_read(data->regmap, APDS9960_REG_GFIFO_BASE,
&data->buffer, 4);
@ -777,6 +777,7 @@ static void apds9960_read_gesture_fifo(struct apds9960_data *data)
goto err_read;
iio_push_to_buffers(data->indio_dev, data->buffer);
cnt--;
}
err_read: