Second set of IIO fixes for the 4.5 cycle. These ones are mostly
dependent on patches from the recent merge cycle. * adc, imu and iio staging drivers - !HAS_IOMEM dependency fixes * dht11 - use boottime clock for time measurement to avoid incorrect measurements due to clock updates. * lidar - correct a return value for short i2c transfers. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJWr72hAAoJEFSFNJnE9BaILWsP/3hVDegr+6TRoVgqqfk8USz2 Jb3omDrxvb1LDlMgR5sbwYMQw3JKg9Dn6ACPtsFJ4kdOHvZ/xQ5dzwKXuUTe9MfB ij3gl1/wO6czUvdW0FYEKwMHORh/z5ILKaVS/lOPjeJnRPhFD4GNRo3nM6qQ/le8 nl/Q1RB1ONml0EKzWgQrcFAzdRessPU3ALsvXrmJQVn6Ah1fYcig46/jn/PZ8/iO 1/9lgROCo78vwHMvu1vuBI/pjfm0Ry/AB1WTGrjquMY4Q/kEwM18qE2I4lRfoQSd 3N9DvGkfhkmLpnqag3ujC5uVtMJK/SUlK5DPaAsLT7PtTuQ75UQfFZpy0syANfbD lLVnKqMBbTWpetin8butW1OBgKaCWukq9zvFvsp1ZbbxJIEeYaIF6vdkcVyn66j/ O3u45zdbL0WrhvPZrQRbTa3jdXLVMe4psaBWF1fhBW/+8tYEpPzddHuE2miyVHP8 2uxg7H+UR7WRJyZ20BzF18G1AFjtAouzuVtWtPEAw2z8BbtMfAf9g+02xHhwYmVd USdPfVHhAmYgFsgfRLRZRmbiSlg/SzBHK0RVS9ZwXsh3nnPvuYflfT/bCXxGvBzI j8pVAAkfrnTItKuFQ2rTgQ23JUHdOdmwkYtrMa6bHuFCCN6kIH8BTVxwGexEhE5U tBTWNHQxx/N1VhtY7BQG =iF19 -----END PGP SIGNATURE----- Merge tag 'iio-fixes-for-4.5b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: Second set of IIO fixes for the 4.5 cycle. These ones are mostly dependent on patches from the recent merge cycle. * adc, imu and iio staging drivers - !HAS_IOMEM dependency fixes * dht11 - use boottime clock for time measurement to avoid incorrect measurements due to clock updates. * lidar - correct a return value for short i2c transfers.
This commit is contained in:
commit
5982557ac6
@ -175,6 +175,7 @@ config DA9150_GPADC
|
||||
config EXYNOS_ADC
|
||||
tristate "Exynos ADC driver support"
|
||||
depends on ARCH_EXYNOS || ARCH_S3C24XX || ARCH_S3C64XX || (OF && COMPILE_TEST)
|
||||
depends on HAS_IOMEM
|
||||
help
|
||||
Core support for the ADC block found in the Samsung EXYNOS series
|
||||
of SoCs for drivers such as the touchscreen and hwmon to use to share
|
||||
@ -207,6 +208,7 @@ config INA2XX_ADC
|
||||
config IMX7D_ADC
|
||||
tristate "IMX7D ADC driver"
|
||||
depends on ARCH_MXC || COMPILE_TEST
|
||||
depends on HAS_IOMEM
|
||||
help
|
||||
Say yes here to build support for IMX7D ADC.
|
||||
|
||||
|
@ -117,7 +117,7 @@ static int dht11_decode(struct dht11 *dht11, int offset, int timeres)
|
||||
if (((hum_int + hum_dec + temp_int + temp_dec) & 0xff) != checksum)
|
||||
return -EIO;
|
||||
|
||||
dht11->timestamp = ktime_get_real_ns();
|
||||
dht11->timestamp = ktime_get_boot_ns();
|
||||
if (hum_int < 20) { /* DHT22 */
|
||||
dht11->temperature = (((temp_int & 0x7f) << 8) + temp_dec) *
|
||||
((temp_int & 0x80) ? -100 : 100);
|
||||
@ -145,7 +145,7 @@ static irqreturn_t dht11_handle_irq(int irq, void *data)
|
||||
|
||||
/* TODO: Consider making the handler safe for IRQ sharing */
|
||||
if (dht11->num_edges < DHT11_EDGES_PER_READ && dht11->num_edges >= 0) {
|
||||
dht11->edges[dht11->num_edges].ts = ktime_get_real_ns();
|
||||
dht11->edges[dht11->num_edges].ts = ktime_get_boot_ns();
|
||||
dht11->edges[dht11->num_edges++].value =
|
||||
gpio_get_value(dht11->gpio);
|
||||
|
||||
@ -164,7 +164,7 @@ static int dht11_read_raw(struct iio_dev *iio_dev,
|
||||
int ret, timeres;
|
||||
|
||||
mutex_lock(&dht11->lock);
|
||||
if (dht11->timestamp + DHT11_DATA_VALID_TIME < ktime_get_real_ns()) {
|
||||
if (dht11->timestamp + DHT11_DATA_VALID_TIME < ktime_get_boot_ns()) {
|
||||
timeres = ktime_get_resolution_ns();
|
||||
if (DHT11_DATA_BIT_HIGH < 2 * timeres) {
|
||||
dev_err(dht11->dev, "timeresolution %dns too low\n",
|
||||
@ -279,7 +279,7 @@ static int dht11_probe(struct platform_device *pdev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
dht11->timestamp = ktime_get_real_ns() - DHT11_DATA_VALID_TIME - 1;
|
||||
dht11->timestamp = ktime_get_boot_ns() - DHT11_DATA_VALID_TIME - 1;
|
||||
dht11->num_edges = -1;
|
||||
|
||||
platform_set_drvdata(pdev, iio);
|
||||
|
@ -5,9 +5,9 @@
|
||||
config INV_MPU6050_IIO
|
||||
tristate "Invensense MPU6050 devices"
|
||||
depends on I2C && SYSFS
|
||||
depends on I2C_MUX
|
||||
select IIO_BUFFER
|
||||
select IIO_TRIGGERED_BUFFER
|
||||
select I2C_MUX
|
||||
help
|
||||
This driver supports the Invensense MPU6050 devices.
|
||||
This driver can also support MPU6500 in MPU6050 compatibility mode
|
||||
|
@ -87,7 +87,7 @@ static int lidar_i2c_xfer(struct lidar_data *data, u8 reg, u8 *val, int len)
|
||||
|
||||
ret = i2c_transfer(client->adapter, msg, 2);
|
||||
|
||||
return (ret == 2) ? 0 : ret;
|
||||
return (ret == 2) ? 0 : -EIO;
|
||||
}
|
||||
|
||||
static int lidar_smbus_xfer(struct lidar_data *data, u8 reg, u8 *val, int len)
|
||||
|
@ -6,6 +6,7 @@ menu "Analog to digital converters"
|
||||
config AD7606
|
||||
tristate "Analog Devices AD7606 ADC driver"
|
||||
depends on GPIOLIB || COMPILE_TEST
|
||||
depends on HAS_IOMEM
|
||||
select IIO_BUFFER
|
||||
select IIO_TRIGGERED_BUFFER
|
||||
help
|
||||
|
Loading…
Reference in New Issue
Block a user