diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2014-01-10 14:50:36 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2014-01-10 14:50:36 +1100 |
commit | ceaf7570b0e9c46c99a85e9ad93d9aa460ed4754 (patch) | |
tree | aea76c43d80142b08b51b80f5d2543e53aaa0c2c /drivers/iio/light/hid-sensor-als.c | |
parent | 3c9b3f171cdf6ef02a6eaa2ec8c93c50fb7cf490 (diff) | |
parent | 2783980525df12b9c49e8b4baaff06abc7f2f8f2 (diff) |
Merge remote-tracking branch 'staging/staging-next'
Conflicts:
drivers/staging/imx-drm/imx-drm-core.c
Diffstat (limited to 'drivers/iio/light/hid-sensor-als.c')
-rw-r--r-- | drivers/iio/light/hid-sensor-als.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/iio/light/hid-sensor-als.c b/drivers/iio/light/hid-sensor-als.c index 8e8b9d722853..621541fb10a9 100644 --- a/drivers/iio/light/hid-sensor-als.c +++ b/drivers/iio/light/hid-sensor-als.c @@ -229,6 +229,17 @@ static int als_parse_report(struct platform_device *pdev, dev_dbg(&pdev->dev, "als %x:%x\n", st->als_illum.index, st->als_illum.report_id); + /* Set Sensitivity field ids, when there is no individual modifier */ + if (st->common_attributes.sensitivity.index < 0) { + sensor_hub_input_get_attribute_info(hsdev, + HID_FEATURE_REPORT, usage_id, + HID_USAGE_SENSOR_DATA_MOD_CHANGE_SENSITIVITY_ABS | + HID_USAGE_SENSOR_DATA_LIGHT, + &st->common_attributes.sensitivity); + dev_dbg(&pdev->dev, "Sensitivity index:report %d:%d\n", + st->common_attributes.sensitivity.index, + st->common_attributes.sensitivity.report_id); + } return ret; } |