Skip to content

Commit a34d5df

Browse files
committed
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.
2 parents f55532a + 655048a commit a34d5df

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

drivers/iio/adc/max1363.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,7 +1386,7 @@ static const struct max1363_chip_info max1363_chip_info_tbl[] = {
13861386
},
13871387
[max11644] = {
13881388
.bits = 12,
1389-
.int_vref_mv = 2048,
1389+
.int_vref_mv = 4096,
13901390
.mode_list = max11644_mode_list,
13911391
.num_modes = ARRAY_SIZE(max11644_mode_list),
13921392
.default_mode = s0to1,
@@ -1396,7 +1396,7 @@ static const struct max1363_chip_info max1363_chip_info_tbl[] = {
13961396
},
13971397
[max11645] = {
13981398
.bits = 12,
1399-
.int_vref_mv = 4096,
1399+
.int_vref_mv = 2048,
14001400
.mode_list = max11644_mode_list,
14011401
.num_modes = ARRAY_SIZE(max11644_mode_list),
14021402
.default_mode = s0to1,
@@ -1406,7 +1406,7 @@ static const struct max1363_chip_info max1363_chip_info_tbl[] = {
14061406
},
14071407
[max11646] = {
14081408
.bits = 10,
1409-
.int_vref_mv = 2048,
1409+
.int_vref_mv = 4096,
14101410
.mode_list = max11644_mode_list,
14111411
.num_modes = ARRAY_SIZE(max11644_mode_list),
14121412
.default_mode = s0to1,
@@ -1416,7 +1416,7 @@ static const struct max1363_chip_info max1363_chip_info_tbl[] = {
14161416
},
14171417
[max11647] = {
14181418
.bits = 10,
1419-
.int_vref_mv = 4096,
1419+
.int_vref_mv = 2048,
14201420
.mode_list = max11644_mode_list,
14211421
.num_modes = ARRAY_SIZE(max11644_mode_list),
14221422
.default_mode = s0to1,
@@ -1680,6 +1680,10 @@ static const struct i2c_device_id max1363_id[] = {
16801680
{ "max11615", max11615 },
16811681
{ "max11616", max11616 },
16821682
{ "max11617", max11617 },
1683+
{ "max11644", max11644 },
1684+
{ "max11645", max11645 },
1685+
{ "max11646", max11646 },
1686+
{ "max11647", max11647 },
16831687
{}
16841688
};
16851689

drivers/iio/light/apds9960.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,14 +769,15 @@ static void apds9960_read_gesture_fifo(struct apds9960_data *data)
769769
mutex_lock(&data->lock);
770770
data->gesture_mode_running = 1;
771771

772-
while (cnt-- || (cnt = apds9660_fifo_is_empty(data) > 0)) {
772+
while (cnt || (cnt = apds9660_fifo_is_empty(data) > 0)) {
773773
ret = regmap_bulk_read(data->regmap, APDS9960_REG_GFIFO_BASE,
774774
&data->buffer, 4);
775775

776776
if (ret)
777777
goto err_read;
778778

779779
iio_push_to_buffers(data->indio_dev, data->buffer);
780+
cnt--;
780781
}
781782

782783
err_read:

0 commit comments

Comments
 (0)