Merge tag 'staging-3.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging tree fixes from Greg KH:
"Here are a few IIO fixes, and a new device id for a staging driver for
3.14-rc5. All have been in linux-next for a while, I did a final
merge to get the IIO fixes into this tree, they were incorrectly in
the char-misc tree for a few weeks, and I forgot to tell you to pull
them from there. This makes it a single pull request for you"

* tag 'staging-3.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging: r8188eu: Add new device ID
staging:iio:adc:MXS:LRADC: fix touchscreen statemachine
iio:gyro: bug on L3GD20H gyroscope support
iio: cm32181: Change cm32181 ambient light sensor driver
iio: cm36651: Fix read/write integration time function.

Changed files
+38 -39
drivers
+1 -1
drivers/iio/gyro/Kconfig
··· 70 70 select IIO_TRIGGERED_BUFFER if (IIO_BUFFER) 71 71 help 72 72 Say yes here to build support for STMicroelectronics gyroscopes: 73 - L3G4200D, LSM330DL, L3GD20, L3GD20H, LSM330DLC, L3G4IS, LSM330. 73 + L3G4200D, LSM330DL, L3GD20, LSM330DLC, L3G4IS, LSM330. 74 74 75 75 This driver can also be built as a module. If so, these modules 76 76 will be created:
-1
drivers/iio/gyro/st_gyro.h
··· 19 19 #define LSM330DL_GYRO_DEV_NAME "lsm330dl_gyro" 20 20 #define LSM330DLC_GYRO_DEV_NAME "lsm330dlc_gyro" 21 21 #define L3GD20_GYRO_DEV_NAME "l3gd20" 22 - #define L3GD20H_GYRO_DEV_NAME "l3gd20h" 23 22 #define L3G4IS_GYRO_DEV_NAME "l3g4is_ui" 24 23 #define LSM330_GYRO_DEV_NAME "lsm330_gyro" 25 24
+4 -5
drivers/iio/gyro/st_gyro_core.c
··· 167 167 .wai = ST_GYRO_2_WAI_EXP, 168 168 .sensors_supported = { 169 169 [0] = L3GD20_GYRO_DEV_NAME, 170 - [1] = L3GD20H_GYRO_DEV_NAME, 171 - [2] = LSM330D_GYRO_DEV_NAME, 172 - [3] = LSM330DLC_GYRO_DEV_NAME, 173 - [4] = L3G4IS_GYRO_DEV_NAME, 174 - [5] = LSM330_GYRO_DEV_NAME, 170 + [1] = LSM330D_GYRO_DEV_NAME, 171 + [2] = LSM330DLC_GYRO_DEV_NAME, 172 + [3] = L3G4IS_GYRO_DEV_NAME, 173 + [4] = LSM330_GYRO_DEV_NAME, 175 174 }, 176 175 .ch = (struct iio_chan_spec *)st_gyro_16bit_channels, 177 176 .odr = {
-1
drivers/iio/gyro/st_gyro_i2c.c
··· 55 55 { LSM330DL_GYRO_DEV_NAME }, 56 56 { LSM330DLC_GYRO_DEV_NAME }, 57 57 { L3GD20_GYRO_DEV_NAME }, 58 - { L3GD20H_GYRO_DEV_NAME }, 59 58 { L3G4IS_GYRO_DEV_NAME }, 60 59 { LSM330_GYRO_DEV_NAME }, 61 60 {},
-1
drivers/iio/gyro/st_gyro_spi.c
··· 54 54 { LSM330DL_GYRO_DEV_NAME }, 55 55 { LSM330DLC_GYRO_DEV_NAME }, 56 56 { L3GD20_GYRO_DEV_NAME }, 57 - { L3GD20H_GYRO_DEV_NAME }, 58 57 { L3G4IS_GYRO_DEV_NAME }, 59 58 { LSM330_GYRO_DEV_NAME }, 60 59 {},
+8 -8
drivers/iio/light/cm32181.c
··· 103 103 /** 104 104 * cm32181_read_als_it() - Get sensor integration time (ms) 105 105 * @cm32181: pointer of struct cm32181 106 - * @val: pointer of int to load the als_it value. 106 + * @val2: pointer of int to load the als_it value. 107 107 * 108 108 * Report the current integartion time by millisecond. 109 109 * 110 - * Return: IIO_VAL_INT for success, otherwise -EINVAL. 110 + * Return: IIO_VAL_INT_PLUS_MICRO for success, otherwise -EINVAL. 111 111 */ 112 - static int cm32181_read_als_it(struct cm32181_chip *cm32181, int *val) 112 + static int cm32181_read_als_it(struct cm32181_chip *cm32181, int *val2) 113 113 { 114 114 u16 als_it; 115 115 int i; ··· 119 119 als_it >>= CM32181_CMD_ALS_IT_SHIFT; 120 120 for (i = 0; i < ARRAY_SIZE(als_it_bits); i++) { 121 121 if (als_it == als_it_bits[i]) { 122 - *val = als_it_value[i]; 123 - return IIO_VAL_INT; 122 + *val2 = als_it_value[i]; 123 + return IIO_VAL_INT_PLUS_MICRO; 124 124 } 125 125 } 126 126 ··· 221 221 *val = cm32181->calibscale; 222 222 return IIO_VAL_INT; 223 223 case IIO_CHAN_INFO_INT_TIME: 224 - ret = cm32181_read_als_it(cm32181, val); 224 + ret = cm32181_read_als_it(cm32181, val2); 225 225 return ret; 226 226 } 227 227 ··· 240 240 cm32181->calibscale = val; 241 241 return val; 242 242 case IIO_CHAN_INFO_INT_TIME: 243 - ret = cm32181_write_als_it(cm32181, val); 243 + ret = cm32181_write_als_it(cm32181, val2); 244 244 return ret; 245 245 } 246 246 ··· 264 264 265 265 n = ARRAY_SIZE(als_it_value); 266 266 for (i = 0, len = 0; i < n; i++) 267 - len += sprintf(buf + len, "%d ", als_it_value[i]); 267 + len += sprintf(buf + len, "0.%06u ", als_it_value[i]); 268 268 return len + sprintf(buf + len, "\n"); 269 269 } 270 270
+23 -22
drivers/iio/light/cm36651.c
··· 50 50 #define CM36651_CS_CONF2_DEFAULT_BIT 0x08 51 51 52 52 /* CS_CONF3 channel integration time */ 53 - #define CM36651_CS_IT1 0x00 /* Integration time 80000 usec */ 54 - #define CM36651_CS_IT2 0x40 /* Integration time 160000 usec */ 55 - #define CM36651_CS_IT3 0x80 /* Integration time 320000 usec */ 56 - #define CM36651_CS_IT4 0xC0 /* Integration time 640000 usec */ 53 + #define CM36651_CS_IT1 0x00 /* Integration time 80 msec */ 54 + #define CM36651_CS_IT2 0x40 /* Integration time 160 msec */ 55 + #define CM36651_CS_IT3 0x80 /* Integration time 320 msec */ 56 + #define CM36651_CS_IT4 0xC0 /* Integration time 640 msec */ 57 57 58 58 /* PS_CONF1 command code */ 59 59 #define CM36651_PS_ENABLE 0x00 ··· 64 64 #define CM36651_PS_PERS4 0x0C 65 65 66 66 /* PS_CONF1 command code: integration time */ 67 - #define CM36651_PS_IT1 0x00 /* Integration time 320 usec */ 68 - #define CM36651_PS_IT2 0x10 /* Integration time 420 usec */ 69 - #define CM36651_PS_IT3 0x20 /* Integration time 520 usec */ 70 - #define CM36651_PS_IT4 0x30 /* Integration time 640 usec */ 67 + #define CM36651_PS_IT1 0x00 /* Integration time 0.32 msec */ 68 + #define CM36651_PS_IT2 0x10 /* Integration time 0.42 msec */ 69 + #define CM36651_PS_IT3 0x20 /* Integration time 0.52 msec */ 70 + #define CM36651_PS_IT4 0x30 /* Integration time 0.64 msec */ 71 71 72 72 /* PS_CONF1 command code: duty ratio */ 73 73 #define CM36651_PS_DR1 0x00 /* Duty ratio 1/80 */ ··· 93 93 #define CM36651_CLOSE_PROXIMITY 0x32 94 94 #define CM36651_FAR_PROXIMITY 0x33 95 95 96 - #define CM36651_CS_INT_TIME_AVAIL "80000 160000 320000 640000" 97 - #define CM36651_PS_INT_TIME_AVAIL "320 420 520 640" 96 + #define CM36651_CS_INT_TIME_AVAIL "0.08 0.16 0.32 0.64" 97 + #define CM36651_PS_INT_TIME_AVAIL "0.000320 0.000420 0.000520 0.000640" 98 98 99 99 enum cm36651_operation_mode { 100 100 CM36651_LIGHT_EN, ··· 356 356 } 357 357 358 358 static int cm36651_read_int_time(struct cm36651_data *cm36651, 359 - struct iio_chan_spec const *chan, int *val) 359 + struct iio_chan_spec const *chan, int *val2) 360 360 { 361 361 switch (chan->type) { 362 362 case IIO_LIGHT: 363 363 if (cm36651->cs_int_time[chan->address] == CM36651_CS_IT1) 364 - *val = 80000; 364 + *val2 = 80000; 365 365 else if (cm36651->cs_int_time[chan->address] == CM36651_CS_IT2) 366 - *val = 160000; 366 + *val2 = 160000; 367 367 else if (cm36651->cs_int_time[chan->address] == CM36651_CS_IT3) 368 - *val = 320000; 368 + *val2 = 320000; 369 369 else if (cm36651->cs_int_time[chan->address] == CM36651_CS_IT4) 370 - *val = 640000; 370 + *val2 = 640000; 371 371 else 372 372 return -EINVAL; 373 373 break; 374 374 case IIO_PROXIMITY: 375 375 if (cm36651->ps_int_time == CM36651_PS_IT1) 376 - *val = 320; 376 + *val2 = 320; 377 377 else if (cm36651->ps_int_time == CM36651_PS_IT2) 378 - *val = 420; 378 + *val2 = 420; 379 379 else if (cm36651->ps_int_time == CM36651_PS_IT3) 380 - *val = 520; 380 + *val2 = 520; 381 381 else if (cm36651->ps_int_time == CM36651_PS_IT4) 382 - *val = 640; 382 + *val2 = 640; 383 383 else 384 384 return -EINVAL; 385 385 break; ··· 387 387 return -EINVAL; 388 388 } 389 389 390 - return IIO_VAL_INT; 390 + return IIO_VAL_INT_PLUS_MICRO; 391 391 } 392 392 393 393 static int cm36651_write_int_time(struct cm36651_data *cm36651, ··· 459 459 ret = cm36651_read_channel(cm36651, chan, val); 460 460 break; 461 461 case IIO_CHAN_INFO_INT_TIME: 462 - ret = cm36651_read_int_time(cm36651, chan, val); 462 + *val = 0; 463 + ret = cm36651_read_int_time(cm36651, chan, val2); 463 464 break; 464 465 default: 465 466 ret = -EINVAL; ··· 480 479 int ret = -EINVAL; 481 480 482 481 if (mask == IIO_CHAN_INFO_INT_TIME) { 483 - ret = cm36651_write_int_time(cm36651, chan, val); 482 + ret = cm36651_write_int_time(cm36651, chan, val2); 484 483 if (ret < 0) 485 484 dev_err(&client->dev, "Integration time write failed\n"); 486 485 }
+1
drivers/staging/iio/adc/mxs-lradc.c
··· 757 757 } 758 758 759 759 /* if it is released, wait for the next touch via IRQ */ 760 + lradc->cur_plate = LRADC_TOUCH; 760 761 mxs_lradc_reg_clear(lradc, LRADC_CTRL1_TOUCH_DETECT_IRQ, LRADC_CTRL1); 761 762 mxs_lradc_reg_set(lradc, LRADC_CTRL1_TOUCH_DETECT_IRQ_EN, LRADC_CTRL1); 762 763 }
+1
drivers/staging/rtl8188eu/os_dep/usb_intf.c
··· 55 55 /****** 8188EUS ********/ 56 56 {USB_DEVICE(0x07b8, 0x8179)}, /* Abocom - Abocom */ 57 57 {USB_DEVICE(0x2001, 0x330F)}, /* DLink DWA-125 REV D1 */ 58 + {USB_DEVICE(0x2001, 0x3310)}, /* Dlink DWA-123 REV D1 */ 58 59 {} /* Terminating entry */ 59 60 }; 60 61