Skip to content

Commit

Permalink
Merge tag 'staging-4.6-rc3' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/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
  • Loading branch information
torvalds committed Apr 9, 2016
2 parents fb41b4b + 53c43c5 commit c6e6e58
Show file tree
Hide file tree
Showing 20 changed files with 1,377 additions and 15 deletions.
8 changes: 8 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -10595,6 +10595,14 @@ L: [email protected]
S: Maintained
F: drivers/staging/nvec/

STAGING - OLPC SECONDARY DISPLAY CONTROLLER (DCON)
M: Jens Frederich <[email protected]>
M: Daniel Drake <[email protected]>
M: Jon Nettleton <[email protected]>
W: http://wiki.laptop.org/go/DCON
S: Maintained
F: drivers/staging/olpc_dcon/

STAGING - REALTEK RTL8712U DRIVERS
M: Larry Finger <[email protected]>
M: Florian Schilhabel <[email protected]>.
Expand Down
7 changes: 4 additions & 3 deletions drivers/iio/accel/bmc150-accel-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ static int bmc150_accel_get_axis(struct bmc150_accel_data *data,
{
int ret;
int axis = chan->scan_index;
unsigned int raw_val;
__le16 raw_val;

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

ret = regmap_bulk_read(data->regmap, BMC150_ACCEL_AXIS_TO_REG(axis),
&raw_val, 2);
&raw_val, sizeof(raw_val));
if (ret < 0) {
dev_err(data->dev, "Error reading axis %d\n", axis);
bmc150_accel_set_power_state(data, false);
mutex_unlock(&data->mutex);
return ret;
}
*val = sign_extend32(raw_val >> chan->scan_type.shift,
*val = sign_extend32(le16_to_cpu(raw_val) >> chan->scan_type.shift,
chan->scan_type.realbits - 1);
ret = bmc150_accel_set_power_state(data, false);
mutex_unlock(&data->mutex);
Expand Down Expand Up @@ -988,6 +988,7 @@ static const struct iio_event_spec bmc150_accel_event = {
.realbits = (bits), \
.storagebits = 16, \
.shift = 16 - (bits), \
.endianness = IIO_LE, \
}, \
.event_spec = &bmc150_accel_event, \
.num_event_specs = 1 \
Expand Down
1 change: 1 addition & 0 deletions drivers/iio/adc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ config AT91_ADC
config AT91_SAMA5D2_ADC
tristate "Atmel AT91 SAMA5D2 ADC"
depends on ARCH_AT91 || COMPILE_TEST
depends on HAS_IOMEM
help
Say yes here to build support for Atmel SAMA5D2 ADC which is
available on SAMA5D2 SoC family.
Expand Down
12 changes: 8 additions & 4 deletions drivers/iio/adc/max1363.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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 },
{}
};

Expand Down
9 changes: 5 additions & 4 deletions drivers/iio/gyro/bmg160_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ static int bmg160_get_temp(struct bmg160_data *data, int *val)
static int bmg160_get_axis(struct bmg160_data *data, int axis, int *val)
{
int ret;
unsigned int raw_val;
__le16 raw_val;

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

ret = regmap_bulk_read(data->regmap, BMG160_AXIS_TO_REG(axis), &raw_val,
2);
sizeof(raw_val));
if (ret < 0) {
dev_err(data->dev, "Error reading axis %d\n", axis);
bmg160_set_power_state(data, false);
mutex_unlock(&data->mutex);
return ret;
}

*val = sign_extend32(raw_val, 15);
*val = sign_extend32(le16_to_cpu(raw_val), 15);
ret = bmg160_set_power_state(data, false);
mutex_unlock(&data->mutex);
if (ret < 0)
Expand Down Expand Up @@ -733,6 +733,7 @@ static const struct iio_event_spec bmg160_event = {
.sign = 's', \
.realbits = 16, \
.storagebits = 16, \
.endianness = IIO_LE, \
}, \
.event_spec = &bmg160_event, \
.num_event_specs = 1 \
Expand Down Expand Up @@ -780,7 +781,7 @@ static irqreturn_t bmg160_trigger_handler(int irq, void *p)
mutex_unlock(&data->mutex);
goto err;
}
data->buffer[i++] = ret;
data->buffer[i++] = val;
}
mutex_unlock(&data->mutex);

Expand Down
3 changes: 2 additions & 1 deletion drivers/iio/health/max30100.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,13 @@ static irqreturn_t max30100_interrupt_handler(int irq, void *private)

mutex_lock(&data->lock);

while (cnt-- || (cnt = max30100_fifo_count(data) > 0)) {
while (cnt || (cnt = max30100_fifo_count(data) > 0)) {
ret = max30100_read_measurement(data);
if (ret)
break;

iio_push_to_buffers(data->indio_dev, data->buffer);
cnt--;
}

mutex_unlock(&data->lock);
Expand Down
3 changes: 1 addition & 2 deletions drivers/iio/imu/inv_mpu6050/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ config INV_MPU6050_IIO

config INV_MPU6050_I2C
tristate "Invensense MPU6050 devices (I2C)"
depends on I2C
depends on I2C_MUX
select INV_MPU6050_IIO
select I2C_MUX
select REGMAP_I2C
help
This driver supports the Invensense MPU6050 devices.
Expand Down
1 change: 1 addition & 0 deletions drivers/iio/industrialio-buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@ static int iio_verify_update(struct iio_dev *indio_dev,
unsigned int modes;

memset(config, 0, sizeof(*config));
config->watermark = ~0;

/*
* If there is just one buffer and we are removing it there is nothing
Expand Down
3 changes: 2 additions & 1 deletion drivers/iio/light/apds9960.c
Original file line number Diff line number Diff line change
Expand Up @@ -769,14 +769,15 @@ 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);

if (ret)
goto err_read;

iio_push_to_buffers(data->indio_dev, data->buffer);
cnt--;
}

err_read:
Expand Down
1 change: 1 addition & 0 deletions drivers/iio/magnetometer/st_magn.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ static inline int st_magn_allocate_ring(struct iio_dev *indio_dev)
static inline void st_magn_deallocate_ring(struct iio_dev *indio_dev)
{
}
#define ST_MAGN_TRIGGER_SET_STATE NULL
#endif /* CONFIG_IIO_BUFFER */

#endif /* ST_MAGN_H */
2 changes: 2 additions & 0 deletions drivers/staging/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ source "drivers/staging/wlan-ng/Kconfig"

source "drivers/staging/comedi/Kconfig"

source "drivers/staging/olpc_dcon/Kconfig"

source "drivers/staging/rtl8192u/Kconfig"

source "drivers/staging/rtl8192e/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/staging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ obj-y += media/
obj-$(CONFIG_SLICOSS) += slicoss/
obj-$(CONFIG_PRISM2_USB) += wlan-ng/
obj-$(CONFIG_COMEDI) += comedi/
obj-$(CONFIG_FB_OLPC_DCON) += olpc_dcon/
obj-$(CONFIG_RTL8192U) += rtl8192u/
obj-$(CONFIG_RTL8192E) += rtl8192e/
obj-$(CONFIG_R8712U) += rtl8712/
Expand Down
35 changes: 35 additions & 0 deletions drivers/staging/olpc_dcon/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
config FB_OLPC_DCON
tristate "One Laptop Per Child Display CONtroller support"
depends on OLPC && FB
depends on I2C
depends on (GPIO_CS5535 || GPIO_CS5535=n)
select BACKLIGHT_CLASS_DEVICE
---help---
In order to support very low power operation, the XO laptop uses a
secondary Display CONtroller, or DCON. This secondary controller
is present in the video pipeline between the primary display
controller (integrate into the processor or chipset) and the LCD
panel. It allows the main processor/display controller to be
completely powered off while still retaining an image on the display.
This controller is only available on OLPC platforms. Unless you have
one of these platforms, you will want to say 'N'.

config FB_OLPC_DCON_1
bool "OLPC XO-1 DCON support"
depends on FB_OLPC_DCON && GPIO_CS5535
default y
---help---
Enable support for the DCON in XO-1 model laptops. The kernel
communicates with the DCON using model-specific code. If you
have an XO-1 (or if you're unsure what model you have), you should
say 'Y'.

config FB_OLPC_DCON_1_5
bool "OLPC XO-1.5 DCON support"
depends on FB_OLPC_DCON && ACPI
default y
---help---
Enable support for the DCON in XO-1.5 model laptops. The kernel
communicates with the DCON using model-specific code. If you
have an XO-1.5 (or if you're unsure what model you have), you
should say 'Y'.
6 changes: 6 additions & 0 deletions drivers/staging/olpc_dcon/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
olpc-dcon-objs += olpc_dcon.o
olpc-dcon-$(CONFIG_FB_OLPC_DCON_1) += olpc_dcon_xo_1.o
olpc-dcon-$(CONFIG_FB_OLPC_DCON_1_5) += olpc_dcon_xo_1_5.o
obj-$(CONFIG_FB_OLPC_DCON) += olpc-dcon.o


9 changes: 9 additions & 0 deletions drivers/staging/olpc_dcon/TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
TODO:
- see if vx855 gpio API can be made similar enough to cs5535 so we can
share more code
- allow simultaneous XO-1 and XO-1.5 support

Please send patches to Greg Kroah-Hartman <[email protected]> and
copy:
Daniel Drake <[email protected]>
Jens Frederich <[email protected]>
Loading

0 comments on commit c6e6e58

Please sign in to comment.