Merge 4.11-rc6 into staging-next
We want the staging and iio fixes in here to handle merging easier. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
@@ -61,7 +61,7 @@ static int cros_ec_sensors_read(struct iio_dev *indio_dev,
|
||||
ret = st->core.read_ec_sensors_data(indio_dev, 1 << idx, &data);
|
||||
if (ret < 0)
|
||||
break;
|
||||
|
||||
ret = IIO_VAL_INT;
|
||||
*val = data;
|
||||
break;
|
||||
case IIO_CHAN_INFO_CALIBBIAS:
|
||||
@@ -76,7 +76,7 @@ static int cros_ec_sensors_read(struct iio_dev *indio_dev,
|
||||
for (i = CROS_EC_SENSOR_X; i < CROS_EC_SENSOR_MAX_AXIS; i++)
|
||||
st->core.calib[i] =
|
||||
st->core.resp->sensor_offset.offset[i];
|
||||
|
||||
ret = IIO_VAL_INT;
|
||||
*val = st->core.calib[idx];
|
||||
break;
|
||||
case IIO_CHAN_INFO_SCALE:
|
||||
|
@@ -390,6 +390,8 @@ int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev,
|
||||
{
|
||||
|
||||
struct hid_sensor_hub_attribute_info timestamp;
|
||||
s32 value;
|
||||
int ret;
|
||||
|
||||
hid_sensor_get_reporting_interval(hsdev, usage_id, st);
|
||||
|
||||
@@ -428,6 +430,14 @@ int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev,
|
||||
st->sensitivity.index, st->sensitivity.report_id,
|
||||
timestamp.index, timestamp.report_id);
|
||||
|
||||
ret = sensor_hub_get_feature(hsdev,
|
||||
st->power_state.report_id,
|
||||
st->power_state.index, sizeof(value), &value);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
if (value < 0)
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(hid_sensor_parse_common_attributes);
|
||||
|
Reference in New Issue
Block a user