summaryrefslogtreecommitdiff
path: root/drivers/iio/common
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-16 19:20:40 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-16 19:20:40 +0300
commit2c52b1efd6937e492863deb2485fdebddf5d7223 (patch)
tree2950eb6a15d2fcb8d4c1cf087ae26f2daff3d0ff /drivers/iio/common
parent81710951fb36ff5d53fb4cfc8a31e6e73302be83 (diff)
parentf44d5c8ac3993421370fc00951abd5864ca71689 (diff)
downloadlinux-2c52b1efd6937e492863deb2485fdebddf5d7223.tar.xz
Merge tag 'iio-for-4.10c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes: Third set of IIO new device support, features and cleanup for the 4.10 cycle. Includes Peter Rosin's interesting drivers for a comparator. First complex use we have had with an analog front end made from discrete components. Brian Masney's work on moving the tsl2583 driver out of staging also feature extensively! New Drivers * DAC based on a digital potentiometer - New driver for the use of a dpot as a DAC. Includes bindings and Axentia entry in vendor prefixes. * Envelope detector baed on DAC and a comparator including device tree bindings. Staging Graduation * tsl2583. Core new features - Core provision for _available attributes. This one had been stalled for a long time until Peter picked it up and ran with it! - In kernel interface helpers to retrieve available info from channels. Driver new features * mcp4531 - Add range of available raw values (used for the dpot dac driver). Driver cleanups and fixes for issues introduced * ad7766 - Testing the wrong variable following devm_regulator_bulk_get introduced with the driver earlier in this cycle. * ad9832 - Fix a wrong ordering in the probe introduced in the previous set of patches. A use before allocation bug. * cros_ec_sensors - Testing for an error in a u8 will never work. * mpu3050 - Remove duplicate initializer for the module owner. - Add missing i2c dependency. - Inform the i2c mux core how it is used - step one in implifying device tree bindings. * st-sensors - Get rid of large number of uninformative defines in favour of putting the constants where they are relevant. It is clear what they are from where they are used. * tsl2583 - Fix unused function warning when CONFIG_PM disabled and remove the ifdefs in favour of __maybe_unused. - Refactor taos_chip_on to only read relevant registers. - Make sure calibscale and integration time are being set. - Verify chip is in ready to be used before calibration. - Remove some repeated checks for chip status (it's protected by a mutex so can't change until it's released) - Change current state storage from a tristate enum to a boolean seeing as only two values are actually used now. - Drop a redundant write to the control regiser in taos_probe (it's a noop) - Drop the FSF mailing address. - Clean up logging to not use hard coded function names (use __func__ instead). - Cleanup up variable and function name prefixes. - Alignment of #define fixes. - Fix comparison between signed and unsigned integer warnings. - Add some newlines in favour of readability. - Combine the two sysfs ABI docs that somehow ended up in different places. - Fix multiline comment syntax. - Move a code block to inside an else statement as it makes more sense there. - Change tsl2583_als_calibrate to return 0 rather than a value nothing reads. - Drop some pointless brackets - Don't assume 32bit unsigned int. - Change to a per device instance lux table. - Add missing tsl2583 to the list of supported devices in the intro comments. - Improve commment on clearing of interrupts. - Drop some uninformative comments. - Drop a memset call that doesn't do anything useful any more. - Don't initialize some return variables that are always set. - Add Brian Masney as a module author after all these changes.
Diffstat (limited to 'drivers/iio/common')
-rw-r--r--drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c b/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c
index a3be7991355e..416cae5ebbd0 100644
--- a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c
+++ b/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c
@@ -291,15 +291,15 @@ int cros_ec_sensors_read_lpc(struct iio_dev *indio_dev,
return -EIO;
/* Read status byte until EC is not busy. */
- status = cros_ec_sensors_read_until_not_busy(st);
- if (status < 0)
- return status;
+ ret = cros_ec_sensors_read_until_not_busy(st);
+ if (ret < 0)
+ return ret;
/*
* Store the current sample id so that we can compare to the
* sample id after reading the data.
*/
- samp_id = status & EC_MEMMAP_ACC_STATUS_SAMPLE_ID_MASK;
+ samp_id = ret & EC_MEMMAP_ACC_STATUS_SAMPLE_ID_MASK;
/* Read all EC data, format it, and store it into data. */
ret = cros_ec_sensors_read_data_unsafe(indio_dev, scan_mask,