提交 9ff7aeb6 编写于 作者: L Linus Torvalds

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.
...@@ -70,7 +70,7 @@ config IIO_ST_GYRO_3AXIS ...@@ -70,7 +70,7 @@ config IIO_ST_GYRO_3AXIS
select IIO_TRIGGERED_BUFFER if (IIO_BUFFER) select IIO_TRIGGERED_BUFFER if (IIO_BUFFER)
help help
Say yes here to build support for STMicroelectronics gyroscopes: Say yes here to build support for STMicroelectronics gyroscopes:
L3G4200D, LSM330DL, L3GD20, L3GD20H, LSM330DLC, L3G4IS, LSM330. L3G4200D, LSM330DL, L3GD20, LSM330DLC, L3G4IS, LSM330.
This driver can also be built as a module. If so, these modules This driver can also be built as a module. If so, these modules
will be created: will be created:
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#define LSM330DL_GYRO_DEV_NAME "lsm330dl_gyro" #define LSM330DL_GYRO_DEV_NAME "lsm330dl_gyro"
#define LSM330DLC_GYRO_DEV_NAME "lsm330dlc_gyro" #define LSM330DLC_GYRO_DEV_NAME "lsm330dlc_gyro"
#define L3GD20_GYRO_DEV_NAME "l3gd20" #define L3GD20_GYRO_DEV_NAME "l3gd20"
#define L3GD20H_GYRO_DEV_NAME "l3gd20h"
#define L3G4IS_GYRO_DEV_NAME "l3g4is_ui" #define L3G4IS_GYRO_DEV_NAME "l3g4is_ui"
#define LSM330_GYRO_DEV_NAME "lsm330_gyro" #define LSM330_GYRO_DEV_NAME "lsm330_gyro"
......
...@@ -167,11 +167,10 @@ static const struct st_sensors st_gyro_sensors[] = { ...@@ -167,11 +167,10 @@ static const struct st_sensors st_gyro_sensors[] = {
.wai = ST_GYRO_2_WAI_EXP, .wai = ST_GYRO_2_WAI_EXP,
.sensors_supported = { .sensors_supported = {
[0] = L3GD20_GYRO_DEV_NAME, [0] = L3GD20_GYRO_DEV_NAME,
[1] = L3GD20H_GYRO_DEV_NAME, [1] = LSM330D_GYRO_DEV_NAME,
[2] = LSM330D_GYRO_DEV_NAME, [2] = LSM330DLC_GYRO_DEV_NAME,
[3] = LSM330DLC_GYRO_DEV_NAME, [3] = L3G4IS_GYRO_DEV_NAME,
[4] = L3G4IS_GYRO_DEV_NAME, [4] = LSM330_GYRO_DEV_NAME,
[5] = LSM330_GYRO_DEV_NAME,
}, },
.ch = (struct iio_chan_spec *)st_gyro_16bit_channels, .ch = (struct iio_chan_spec *)st_gyro_16bit_channels,
.odr = { .odr = {
......
...@@ -55,7 +55,6 @@ static const struct i2c_device_id st_gyro_id_table[] = { ...@@ -55,7 +55,6 @@ static const struct i2c_device_id st_gyro_id_table[] = {
{ LSM330DL_GYRO_DEV_NAME }, { LSM330DL_GYRO_DEV_NAME },
{ LSM330DLC_GYRO_DEV_NAME }, { LSM330DLC_GYRO_DEV_NAME },
{ L3GD20_GYRO_DEV_NAME }, { L3GD20_GYRO_DEV_NAME },
{ L3GD20H_GYRO_DEV_NAME },
{ L3G4IS_GYRO_DEV_NAME }, { L3G4IS_GYRO_DEV_NAME },
{ LSM330_GYRO_DEV_NAME }, { LSM330_GYRO_DEV_NAME },
{}, {},
......
...@@ -54,7 +54,6 @@ static const struct spi_device_id st_gyro_id_table[] = { ...@@ -54,7 +54,6 @@ static const struct spi_device_id st_gyro_id_table[] = {
{ LSM330DL_GYRO_DEV_NAME }, { LSM330DL_GYRO_DEV_NAME },
{ LSM330DLC_GYRO_DEV_NAME }, { LSM330DLC_GYRO_DEV_NAME },
{ L3GD20_GYRO_DEV_NAME }, { L3GD20_GYRO_DEV_NAME },
{ L3GD20H_GYRO_DEV_NAME },
{ L3G4IS_GYRO_DEV_NAME }, { L3G4IS_GYRO_DEV_NAME },
{ LSM330_GYRO_DEV_NAME }, { LSM330_GYRO_DEV_NAME },
{}, {},
......
...@@ -103,13 +103,13 @@ static int cm32181_reg_init(struct cm32181_chip *cm32181) ...@@ -103,13 +103,13 @@ static int cm32181_reg_init(struct cm32181_chip *cm32181)
/** /**
* cm32181_read_als_it() - Get sensor integration time (ms) * cm32181_read_als_it() - Get sensor integration time (ms)
* @cm32181: pointer of struct cm32181 * @cm32181: pointer of struct cm32181
* @val: pointer of int to load the als_it value. * @val2: pointer of int to load the als_it value.
* *
* Report the current integartion time by millisecond. * Report the current integartion time by millisecond.
* *
* Return: IIO_VAL_INT for success, otherwise -EINVAL. * Return: IIO_VAL_INT_PLUS_MICRO for success, otherwise -EINVAL.
*/ */
static int cm32181_read_als_it(struct cm32181_chip *cm32181, int *val) static int cm32181_read_als_it(struct cm32181_chip *cm32181, int *val2)
{ {
u16 als_it; u16 als_it;
int i; int i;
...@@ -119,8 +119,8 @@ static int cm32181_read_als_it(struct cm32181_chip *cm32181, int *val) ...@@ -119,8 +119,8 @@ static int cm32181_read_als_it(struct cm32181_chip *cm32181, int *val)
als_it >>= CM32181_CMD_ALS_IT_SHIFT; als_it >>= CM32181_CMD_ALS_IT_SHIFT;
for (i = 0; i < ARRAY_SIZE(als_it_bits); i++) { for (i = 0; i < ARRAY_SIZE(als_it_bits); i++) {
if (als_it == als_it_bits[i]) { if (als_it == als_it_bits[i]) {
*val = als_it_value[i]; *val2 = als_it_value[i];
return IIO_VAL_INT; return IIO_VAL_INT_PLUS_MICRO;
} }
} }
...@@ -221,7 +221,7 @@ static int cm32181_read_raw(struct iio_dev *indio_dev, ...@@ -221,7 +221,7 @@ static int cm32181_read_raw(struct iio_dev *indio_dev,
*val = cm32181->calibscale; *val = cm32181->calibscale;
return IIO_VAL_INT; return IIO_VAL_INT;
case IIO_CHAN_INFO_INT_TIME: case IIO_CHAN_INFO_INT_TIME:
ret = cm32181_read_als_it(cm32181, val); ret = cm32181_read_als_it(cm32181, val2);
return ret; return ret;
} }
...@@ -240,7 +240,7 @@ static int cm32181_write_raw(struct iio_dev *indio_dev, ...@@ -240,7 +240,7 @@ static int cm32181_write_raw(struct iio_dev *indio_dev,
cm32181->calibscale = val; cm32181->calibscale = val;
return val; return val;
case IIO_CHAN_INFO_INT_TIME: case IIO_CHAN_INFO_INT_TIME:
ret = cm32181_write_als_it(cm32181, val); ret = cm32181_write_als_it(cm32181, val2);
return ret; return ret;
} }
...@@ -264,7 +264,7 @@ static ssize_t cm32181_get_it_available(struct device *dev, ...@@ -264,7 +264,7 @@ static ssize_t cm32181_get_it_available(struct device *dev,
n = ARRAY_SIZE(als_it_value); n = ARRAY_SIZE(als_it_value);
for (i = 0, len = 0; i < n; i++) for (i = 0, len = 0; i < n; i++)
len += sprintf(buf + len, "%d ", als_it_value[i]); len += sprintf(buf + len, "0.%06u ", als_it_value[i]);
return len + sprintf(buf + len, "\n"); return len + sprintf(buf + len, "\n");
} }
......
...@@ -50,10 +50,10 @@ ...@@ -50,10 +50,10 @@
#define CM36651_CS_CONF2_DEFAULT_BIT 0x08 #define CM36651_CS_CONF2_DEFAULT_BIT 0x08
/* CS_CONF3 channel integration time */ /* CS_CONF3 channel integration time */
#define CM36651_CS_IT1 0x00 /* Integration time 80000 usec */ #define CM36651_CS_IT1 0x00 /* Integration time 80 msec */
#define CM36651_CS_IT2 0x40 /* Integration time 160000 usec */ #define CM36651_CS_IT2 0x40 /* Integration time 160 msec */
#define CM36651_CS_IT3 0x80 /* Integration time 320000 usec */ #define CM36651_CS_IT3 0x80 /* Integration time 320 msec */
#define CM36651_CS_IT4 0xC0 /* Integration time 640000 usec */ #define CM36651_CS_IT4 0xC0 /* Integration time 640 msec */
/* PS_CONF1 command code */ /* PS_CONF1 command code */
#define CM36651_PS_ENABLE 0x00 #define CM36651_PS_ENABLE 0x00
...@@ -64,10 +64,10 @@ ...@@ -64,10 +64,10 @@
#define CM36651_PS_PERS4 0x0C #define CM36651_PS_PERS4 0x0C
/* PS_CONF1 command code: integration time */ /* PS_CONF1 command code: integration time */
#define CM36651_PS_IT1 0x00 /* Integration time 320 usec */ #define CM36651_PS_IT1 0x00 /* Integration time 0.32 msec */
#define CM36651_PS_IT2 0x10 /* Integration time 420 usec */ #define CM36651_PS_IT2 0x10 /* Integration time 0.42 msec */
#define CM36651_PS_IT3 0x20 /* Integration time 520 usec */ #define CM36651_PS_IT3 0x20 /* Integration time 0.52 msec */
#define CM36651_PS_IT4 0x30 /* Integration time 640 usec */ #define CM36651_PS_IT4 0x30 /* Integration time 0.64 msec */
/* PS_CONF1 command code: duty ratio */ /* PS_CONF1 command code: duty ratio */
#define CM36651_PS_DR1 0x00 /* Duty ratio 1/80 */ #define CM36651_PS_DR1 0x00 /* Duty ratio 1/80 */
...@@ -93,8 +93,8 @@ ...@@ -93,8 +93,8 @@
#define CM36651_CLOSE_PROXIMITY 0x32 #define CM36651_CLOSE_PROXIMITY 0x32
#define CM36651_FAR_PROXIMITY 0x33 #define CM36651_FAR_PROXIMITY 0x33
#define CM36651_CS_INT_TIME_AVAIL "80000 160000 320000 640000" #define CM36651_CS_INT_TIME_AVAIL "0.08 0.16 0.32 0.64"
#define CM36651_PS_INT_TIME_AVAIL "320 420 520 640" #define CM36651_PS_INT_TIME_AVAIL "0.000320 0.000420 0.000520 0.000640"
enum cm36651_operation_mode { enum cm36651_operation_mode {
CM36651_LIGHT_EN, CM36651_LIGHT_EN,
...@@ -356,30 +356,30 @@ static int cm36651_read_channel(struct cm36651_data *cm36651, ...@@ -356,30 +356,30 @@ static int cm36651_read_channel(struct cm36651_data *cm36651,
} }
static int cm36651_read_int_time(struct cm36651_data *cm36651, static int cm36651_read_int_time(struct cm36651_data *cm36651,
struct iio_chan_spec const *chan, int *val) struct iio_chan_spec const *chan, int *val2)
{ {
switch (chan->type) { switch (chan->type) {
case IIO_LIGHT: case IIO_LIGHT:
if (cm36651->cs_int_time[chan->address] == CM36651_CS_IT1) if (cm36651->cs_int_time[chan->address] == CM36651_CS_IT1)
*val = 80000; *val2 = 80000;
else if (cm36651->cs_int_time[chan->address] == CM36651_CS_IT2) else if (cm36651->cs_int_time[chan->address] == CM36651_CS_IT2)
*val = 160000; *val2 = 160000;
else if (cm36651->cs_int_time[chan->address] == CM36651_CS_IT3) else if (cm36651->cs_int_time[chan->address] == CM36651_CS_IT3)
*val = 320000; *val2 = 320000;
else if (cm36651->cs_int_time[chan->address] == CM36651_CS_IT4) else if (cm36651->cs_int_time[chan->address] == CM36651_CS_IT4)
*val = 640000; *val2 = 640000;
else else
return -EINVAL; return -EINVAL;
break; break;
case IIO_PROXIMITY: case IIO_PROXIMITY:
if (cm36651->ps_int_time == CM36651_PS_IT1) if (cm36651->ps_int_time == CM36651_PS_IT1)
*val = 320; *val2 = 320;
else if (cm36651->ps_int_time == CM36651_PS_IT2) else if (cm36651->ps_int_time == CM36651_PS_IT2)
*val = 420; *val2 = 420;
else if (cm36651->ps_int_time == CM36651_PS_IT3) else if (cm36651->ps_int_time == CM36651_PS_IT3)
*val = 520; *val2 = 520;
else if (cm36651->ps_int_time == CM36651_PS_IT4) else if (cm36651->ps_int_time == CM36651_PS_IT4)
*val = 640; *val2 = 640;
else else
return -EINVAL; return -EINVAL;
break; break;
...@@ -387,7 +387,7 @@ static int cm36651_read_int_time(struct cm36651_data *cm36651, ...@@ -387,7 +387,7 @@ static int cm36651_read_int_time(struct cm36651_data *cm36651,
return -EINVAL; return -EINVAL;
} }
return IIO_VAL_INT; return IIO_VAL_INT_PLUS_MICRO;
} }
static int cm36651_write_int_time(struct cm36651_data *cm36651, static int cm36651_write_int_time(struct cm36651_data *cm36651,
...@@ -459,7 +459,8 @@ static int cm36651_read_raw(struct iio_dev *indio_dev, ...@@ -459,7 +459,8 @@ static int cm36651_read_raw(struct iio_dev *indio_dev,
ret = cm36651_read_channel(cm36651, chan, val); ret = cm36651_read_channel(cm36651, chan, val);
break; break;
case IIO_CHAN_INFO_INT_TIME: case IIO_CHAN_INFO_INT_TIME:
ret = cm36651_read_int_time(cm36651, chan, val); *val = 0;
ret = cm36651_read_int_time(cm36651, chan, val2);
break; break;
default: default:
ret = -EINVAL; ret = -EINVAL;
...@@ -479,7 +480,7 @@ static int cm36651_write_raw(struct iio_dev *indio_dev, ...@@ -479,7 +480,7 @@ static int cm36651_write_raw(struct iio_dev *indio_dev,
int ret = -EINVAL; int ret = -EINVAL;
if (mask == IIO_CHAN_INFO_INT_TIME) { if (mask == IIO_CHAN_INFO_INT_TIME) {
ret = cm36651_write_int_time(cm36651, chan, val); ret = cm36651_write_int_time(cm36651, chan, val2);
if (ret < 0) if (ret < 0)
dev_err(&client->dev, "Integration time write failed\n"); dev_err(&client->dev, "Integration time write failed\n");
} }
......
...@@ -757,6 +757,7 @@ static void mxs_lradc_finish_touch_event(struct mxs_lradc *lradc, bool valid) ...@@ -757,6 +757,7 @@ static void mxs_lradc_finish_touch_event(struct mxs_lradc *lradc, bool valid)
} }
/* if it is released, wait for the next touch via IRQ */ /* if it is released, wait for the next touch via IRQ */
lradc->cur_plate = LRADC_TOUCH;
mxs_lradc_reg_clear(lradc, LRADC_CTRL1_TOUCH_DETECT_IRQ, LRADC_CTRL1); mxs_lradc_reg_clear(lradc, LRADC_CTRL1_TOUCH_DETECT_IRQ, LRADC_CTRL1);
mxs_lradc_reg_set(lradc, LRADC_CTRL1_TOUCH_DETECT_IRQ_EN, LRADC_CTRL1); mxs_lradc_reg_set(lradc, LRADC_CTRL1_TOUCH_DETECT_IRQ_EN, LRADC_CTRL1);
} }
......
...@@ -55,6 +55,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = { ...@@ -55,6 +55,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
/****** 8188EUS ********/ /****** 8188EUS ********/
{USB_DEVICE(0x07b8, 0x8179)}, /* Abocom - Abocom */ {USB_DEVICE(0x07b8, 0x8179)}, /* Abocom - Abocom */
{USB_DEVICE(0x2001, 0x330F)}, /* DLink DWA-125 REV D1 */ {USB_DEVICE(0x2001, 0x330F)}, /* DLink DWA-125 REV D1 */
{USB_DEVICE(0x2001, 0x3310)}, /* Dlink DWA-123 REV D1 */
{} /* Terminating entry */ {} /* Terminating entry */
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册