Skip to content

Commit c6e6e58

Browse files
committed
Merge tag 'staging-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging and IIO driver fixes from Greg KH: "Here are some IIO driver fixes, along with two staging driver fixes for 4.6-rc3. One staging driver patch reverts the deletion of a driver that happened in 4.6-rc1. We thought that laptop.org was dead, but it's still alive and kicking, and has users that were mad we broke their hardware by deleting a driver for their machines. So that driver is added back and everyone is happy again. All of these have been in linux-next for a while with no reported issues" * tag 'staging-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: Revert "Staging: olpc_dcon: Remove obsolete driver" staging/rdma/hfi1: select CRC32 iio: gyro: bmg160: fix buffer read values iio: gyro: bmg160: fix endianness when reading axes iio: accel: bmc150: fix endianness when reading axes iio: st_magn: always define ST_MAGN_TRIGGER_SET_STATE iio: fix config watermark initial value iio: health: max30100: correct FIFO check condition iio: imu: Fix inv_mpu6050 dependencies iio: adc: Fix build error of missing devm_ioremap_resource on UM iio: light: apds9960: correct FIFO check condition iio: adc: max1363: correct reference voltage iio: adc: max1363: add missing adc to max1363_id
2 parents fb41b4b + 53c43c5 commit c6e6e58

File tree

20 files changed

+1377
-15
lines changed

20 files changed

+1377
-15
lines changed

MAINTAINERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10595,6 +10595,14 @@ L: linux-tegra@vger.kernel.org
1059510595
S: Maintained
1059610596
F: drivers/staging/nvec/
1059710597

10598+
STAGING - OLPC SECONDARY DISPLAY CONTROLLER (DCON)
10599+
M: Jens Frederich <jfrederich@gmail.com>
10600+
M: Daniel Drake <dsd@laptop.org>
10601+
M: Jon Nettleton <jon.nettleton@gmail.com>
10602+
W: http://wiki.laptop.org/go/DCON
10603+
S: Maintained
10604+
F: drivers/staging/olpc_dcon/
10605+
1059810606
STAGING - REALTEK RTL8712U DRIVERS
1059910607
M: Larry Finger <Larry.Finger@lwfinger.net>
1060010608
M: Florian Schilhabel <florian.c.schilhabel@googlemail.com>.

drivers/iio/accel/bmc150-accel-core.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ static int bmc150_accel_get_axis(struct bmc150_accel_data *data,
547547
{
548548
int ret;
549549
int axis = chan->scan_index;
550-
unsigned int raw_val;
550+
__le16 raw_val;
551551

552552
mutex_lock(&data->mutex);
553553
ret = bmc150_accel_set_power_state(data, true);
@@ -557,14 +557,14 @@ static int bmc150_accel_get_axis(struct bmc150_accel_data *data,
557557
}
558558

559559
ret = regmap_bulk_read(data->regmap, BMC150_ACCEL_AXIS_TO_REG(axis),
560-
&raw_val, 2);
560+
&raw_val, sizeof(raw_val));
561561
if (ret < 0) {
562562
dev_err(data->dev, "Error reading axis %d\n", axis);
563563
bmc150_accel_set_power_state(data, false);
564564
mutex_unlock(&data->mutex);
565565
return ret;
566566
}
567-
*val = sign_extend32(raw_val >> chan->scan_type.shift,
567+
*val = sign_extend32(le16_to_cpu(raw_val) >> chan->scan_type.shift,
568568
chan->scan_type.realbits - 1);
569569
ret = bmc150_accel_set_power_state(data, false);
570570
mutex_unlock(&data->mutex);
@@ -988,6 +988,7 @@ static const struct iio_event_spec bmc150_accel_event = {
988988
.realbits = (bits), \
989989
.storagebits = 16, \
990990
.shift = 16 - (bits), \
991+
.endianness = IIO_LE, \
991992
}, \
992993
.event_spec = &bmc150_accel_event, \
993994
.num_event_specs = 1 \

drivers/iio/adc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ config AT91_ADC
134134
config AT91_SAMA5D2_ADC
135135
tristate "Atmel AT91 SAMA5D2 ADC"
136136
depends on ARCH_AT91 || COMPILE_TEST
137+
depends on HAS_IOMEM
137138
help
138139
Say yes here to build support for Atmel SAMA5D2 ADC which is
139140
available on SAMA5D2 SoC family.

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/gyro/bmg160_core.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ static int bmg160_get_temp(struct bmg160_data *data, int *val)
452452
static int bmg160_get_axis(struct bmg160_data *data, int axis, int *val)
453453
{
454454
int ret;
455-
unsigned int raw_val;
455+
__le16 raw_val;
456456

457457
mutex_lock(&data->mutex);
458458
ret = bmg160_set_power_state(data, true);
@@ -462,15 +462,15 @@ static int bmg160_get_axis(struct bmg160_data *data, int axis, int *val)
462462
}
463463

464464
ret = regmap_bulk_read(data->regmap, BMG160_AXIS_TO_REG(axis), &raw_val,
465-
2);
465+
sizeof(raw_val));
466466
if (ret < 0) {
467467
dev_err(data->dev, "Error reading axis %d\n", axis);
468468
bmg160_set_power_state(data, false);
469469
mutex_unlock(&data->mutex);
470470
return ret;
471471
}
472472

473-
*val = sign_extend32(raw_val, 15);
473+
*val = sign_extend32(le16_to_cpu(raw_val), 15);
474474
ret = bmg160_set_power_state(data, false);
475475
mutex_unlock(&data->mutex);
476476
if (ret < 0)
@@ -733,6 +733,7 @@ static const struct iio_event_spec bmg160_event = {
733733
.sign = 's', \
734734
.realbits = 16, \
735735
.storagebits = 16, \
736+
.endianness = IIO_LE, \
736737
}, \
737738
.event_spec = &bmg160_event, \
738739
.num_event_specs = 1 \
@@ -780,7 +781,7 @@ static irqreturn_t bmg160_trigger_handler(int irq, void *p)
780781
mutex_unlock(&data->mutex);
781782
goto err;
782783
}
783-
data->buffer[i++] = ret;
784+
data->buffer[i++] = val;
784785
}
785786
mutex_unlock(&data->mutex);
786787

drivers/iio/health/max30100.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,13 @@ static irqreturn_t max30100_interrupt_handler(int irq, void *private)
238238

239239
mutex_lock(&data->lock);
240240

241-
while (cnt-- || (cnt = max30100_fifo_count(data) > 0)) {
241+
while (cnt || (cnt = max30100_fifo_count(data) > 0)) {
242242
ret = max30100_read_measurement(data);
243243
if (ret)
244244
break;
245245

246246
iio_push_to_buffers(data->indio_dev, data->buffer);
247+
cnt--;
247248
}
248249

249250
mutex_unlock(&data->lock);

drivers/iio/imu/inv_mpu6050/Kconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ config INV_MPU6050_IIO
99

1010
config INV_MPU6050_I2C
1111
tristate "Invensense MPU6050 devices (I2C)"
12-
depends on I2C
12+
depends on I2C_MUX
1313
select INV_MPU6050_IIO
14-
select I2C_MUX
1514
select REGMAP_I2C
1615
help
1716
This driver supports the Invensense MPU6050 devices.

drivers/iio/industrialio-buffer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,7 @@ static int iio_verify_update(struct iio_dev *indio_dev,
653653
unsigned int modes;
654654

655655
memset(config, 0, sizeof(*config));
656+
config->watermark = ~0;
656657

657658
/*
658659
* If there is just one buffer and we are removing it there is nothing

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:

drivers/iio/magnetometer/st_magn.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ static inline int st_magn_allocate_ring(struct iio_dev *indio_dev)
4444
static inline void st_magn_deallocate_ring(struct iio_dev *indio_dev)
4545
{
4646
}
47+
#define ST_MAGN_TRIGGER_SET_STATE NULL
4748
#endif /* CONFIG_IIO_BUFFER */
4849

4950
#endif /* ST_MAGN_H */

0 commit comments

Comments
 (0)