diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-02-07 01:13:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-02-07 01:13:16 -0500 |
commit | dacd53c80525809cc9ce85e3a4ad409d15209f2a (patch) | |
tree | 38121a0e5df24dc0b438962589b91ebaf5856022 | |
parent | 5af9c2e19da6514a1a50b07d97d93b74a7711873 (diff) | |
parent | 5982557ac6ee5d36a02248be18a2ba945360d9f6 (diff) |
Merge tag 'staging-4.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging and IIO driver fixes from Greg KH:
"Here are some IIO and staging driver fixes for 4.5-rc3.
All of them, except one, are for IIO drivers, and one is for a speakup
driver fix caused by some earlier patches, to resolve a reported build
failure"
* tag 'staging-4.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
Staging: speakup: Fix allyesconfig build on mn10300
iio: dht11: Use boottime
iio: ade7753: avoid uninitialized data
iio: pressure: mpl115: fix temperature offset sign
iio: imu: Fix dependencies for !HAS_IOMEM archs
staging: iio: Fix dependencies for !HAS_IOMEM archs
iio: adc: Fix dependencies for !HAS_IOMEM archs
iio: inkern: fix a NULL dereference on error
iio:adc:ti_am335x_adc Fix buffered mode by identifying as software buffer.
iio: light: acpi-als: Report data as processed
iio: dac: mcp4725: set iio name property in sysfs
iio: add HAS_IOMEM dependency to VF610_ADC
iio: add IIO_TRIGGER dependency to STK8BA50
iio: proximity: lidar: correct return value
iio-light: Use a signed return type for ltr501_match_samp_freq()
-rw-r--r-- | drivers/iio/accel/Kconfig | 1 | ||||
-rw-r--r-- | drivers/iio/adc/Kconfig | 3 | ||||
-rw-r--r-- | drivers/iio/adc/ti_am335x_adc.c | 2 | ||||
-rw-r--r-- | drivers/iio/dac/mcp4725.c | 1 | ||||
-rw-r--r-- | drivers/iio/humidity/dht11.c | 8 | ||||
-rw-r--r-- | drivers/iio/imu/inv_mpu6050/Kconfig | 2 | ||||
-rw-r--r-- | drivers/iio/inkern.c | 2 | ||||
-rw-r--r-- | drivers/iio/light/acpi-als.c | 6 | ||||
-rw-r--r-- | drivers/iio/light/ltr501.c | 2 | ||||
-rw-r--r-- | drivers/iio/pressure/mpl115.c | 2 | ||||
-rw-r--r-- | drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 2 | ||||
-rw-r--r-- | drivers/staging/iio/adc/Kconfig | 1 | ||||
-rw-r--r-- | drivers/staging/iio/meter/ade7753.c | 12 | ||||
-rw-r--r-- | drivers/staging/speakup/Kconfig | 2 |
14 files changed, 32 insertions, 14 deletions
diff --git a/drivers/iio/accel/Kconfig b/drivers/iio/accel/Kconfig index edc29b173f6c..833ea9dd4464 100644 --- a/drivers/iio/accel/Kconfig +++ b/drivers/iio/accel/Kconfig | |||
@@ -213,6 +213,7 @@ config STK8312 | |||
213 | config STK8BA50 | 213 | config STK8BA50 |
214 | tristate "Sensortek STK8BA50 3-Axis Accelerometer Driver" | 214 | tristate "Sensortek STK8BA50 3-Axis Accelerometer Driver" |
215 | depends on I2C | 215 | depends on I2C |
216 | depends on IIO_TRIGGER | ||
216 | help | 217 | help |
217 | Say yes here to get support for the Sensortek STK8BA50 3-axis | 218 | Say yes here to get support for the Sensortek STK8BA50 3-axis |
218 | accelerometer. | 219 | accelerometer. |
diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig index 605ff42c4631..283ded7747a9 100644 --- a/drivers/iio/adc/Kconfig +++ b/drivers/iio/adc/Kconfig | |||
@@ -175,6 +175,7 @@ config DA9150_GPADC | |||
175 | config EXYNOS_ADC | 175 | config EXYNOS_ADC |
176 | tristate "Exynos ADC driver support" | 176 | tristate "Exynos ADC driver support" |
177 | depends on ARCH_EXYNOS || ARCH_S3C24XX || ARCH_S3C64XX || (OF && COMPILE_TEST) | 177 | depends on ARCH_EXYNOS || ARCH_S3C24XX || ARCH_S3C64XX || (OF && COMPILE_TEST) |
178 | depends on HAS_IOMEM | ||
178 | help | 179 | help |
179 | Core support for the ADC block found in the Samsung EXYNOS series | 180 | Core support for the ADC block found in the Samsung EXYNOS series |
180 | of SoCs for drivers such as the touchscreen and hwmon to use to share | 181 | of SoCs for drivers such as the touchscreen and hwmon to use to share |
@@ -207,6 +208,7 @@ config INA2XX_ADC | |||
207 | config IMX7D_ADC | 208 | config IMX7D_ADC |
208 | tristate "IMX7D ADC driver" | 209 | tristate "IMX7D ADC driver" |
209 | depends on ARCH_MXC || COMPILE_TEST | 210 | depends on ARCH_MXC || COMPILE_TEST |
211 | depends on HAS_IOMEM | ||
210 | help | 212 | help |
211 | Say yes here to build support for IMX7D ADC. | 213 | Say yes here to build support for IMX7D ADC. |
212 | 214 | ||
@@ -409,6 +411,7 @@ config TWL6030_GPADC | |||
409 | config VF610_ADC | 411 | config VF610_ADC |
410 | tristate "Freescale vf610 ADC driver" | 412 | tristate "Freescale vf610 ADC driver" |
411 | depends on OF | 413 | depends on OF |
414 | depends on HAS_IOMEM | ||
412 | select IIO_BUFFER | 415 | select IIO_BUFFER |
413 | select IIO_TRIGGERED_BUFFER | 416 | select IIO_TRIGGERED_BUFFER |
414 | help | 417 | help |
diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c index 942320e32753..c1e05532d437 100644 --- a/drivers/iio/adc/ti_am335x_adc.c +++ b/drivers/iio/adc/ti_am335x_adc.c | |||
@@ -289,7 +289,7 @@ static int tiadc_iio_buffered_hardware_setup(struct iio_dev *indio_dev, | |||
289 | goto error_kfifo_free; | 289 | goto error_kfifo_free; |
290 | 290 | ||
291 | indio_dev->setup_ops = setup_ops; | 291 | indio_dev->setup_ops = setup_ops; |
292 | indio_dev->modes |= INDIO_BUFFER_HARDWARE; | 292 | indio_dev->modes |= INDIO_BUFFER_SOFTWARE; |
293 | 293 | ||
294 | return 0; | 294 | return 0; |
295 | 295 | ||
diff --git a/drivers/iio/dac/mcp4725.c b/drivers/iio/dac/mcp4725.c index 43d14588448d..b4dde8315210 100644 --- a/drivers/iio/dac/mcp4725.c +++ b/drivers/iio/dac/mcp4725.c | |||
@@ -300,6 +300,7 @@ static int mcp4725_probe(struct i2c_client *client, | |||
300 | data->client = client; | 300 | data->client = client; |
301 | 301 | ||
302 | indio_dev->dev.parent = &client->dev; | 302 | indio_dev->dev.parent = &client->dev; |
303 | indio_dev->name = id->name; | ||
303 | indio_dev->info = &mcp4725_info; | 304 | indio_dev->info = &mcp4725_info; |
304 | indio_dev->channels = &mcp4725_channel; | 305 | indio_dev->channels = &mcp4725_channel; |
305 | indio_dev->num_channels = 1; | 306 | indio_dev->num_channels = 1; |
diff --git a/drivers/iio/humidity/dht11.c b/drivers/iio/humidity/dht11.c index 1165b1c4f9d6..cfc5a051ab9f 100644 --- a/drivers/iio/humidity/dht11.c +++ b/drivers/iio/humidity/dht11.c | |||
@@ -117,7 +117,7 @@ static int dht11_decode(struct dht11 *dht11, int offset, int timeres) | |||
117 | if (((hum_int + hum_dec + temp_int + temp_dec) & 0xff) != checksum) | 117 | if (((hum_int + hum_dec + temp_int + temp_dec) & 0xff) != checksum) |
118 | return -EIO; | 118 | return -EIO; |
119 | 119 | ||
120 | dht11->timestamp = ktime_get_real_ns(); | 120 | dht11->timestamp = ktime_get_boot_ns(); |
121 | if (hum_int < 20) { /* DHT22 */ | 121 | if (hum_int < 20) { /* DHT22 */ |
122 | dht11->temperature = (((temp_int & 0x7f) << 8) + temp_dec) * | 122 | dht11->temperature = (((temp_int & 0x7f) << 8) + temp_dec) * |
123 | ((temp_int & 0x80) ? -100 : 100); | 123 | ((temp_int & 0x80) ? -100 : 100); |
@@ -145,7 +145,7 @@ static irqreturn_t dht11_handle_irq(int irq, void *data) | |||
145 | 145 | ||
146 | /* TODO: Consider making the handler safe for IRQ sharing */ | 146 | /* TODO: Consider making the handler safe for IRQ sharing */ |
147 | if (dht11->num_edges < DHT11_EDGES_PER_READ && dht11->num_edges >= 0) { | 147 | if (dht11->num_edges < DHT11_EDGES_PER_READ && dht11->num_edges >= 0) { |
148 | dht11->edges[dht11->num_edges].ts = ktime_get_real_ns(); | 148 | dht11->edges[dht11->num_edges].ts = ktime_get_boot_ns(); |
149 | dht11->edges[dht11->num_edges++].value = | 149 | dht11->edges[dht11->num_edges++].value = |
150 | gpio_get_value(dht11->gpio); | 150 | gpio_get_value(dht11->gpio); |
151 | 151 | ||
@@ -164,7 +164,7 @@ static int dht11_read_raw(struct iio_dev *iio_dev, | |||
164 | int ret, timeres; | 164 | int ret, timeres; |
165 | 165 | ||
166 | mutex_lock(&dht11->lock); | 166 | mutex_lock(&dht11->lock); |
167 | if (dht11->timestamp + DHT11_DATA_VALID_TIME < ktime_get_real_ns()) { | 167 | if (dht11->timestamp + DHT11_DATA_VALID_TIME < ktime_get_boot_ns()) { |
168 | timeres = ktime_get_resolution_ns(); | 168 | timeres = ktime_get_resolution_ns(); |
169 | if (DHT11_DATA_BIT_HIGH < 2 * timeres) { | 169 | if (DHT11_DATA_BIT_HIGH < 2 * timeres) { |
170 | dev_err(dht11->dev, "timeresolution %dns too low\n", | 170 | dev_err(dht11->dev, "timeresolution %dns too low\n", |
@@ -279,7 +279,7 @@ static int dht11_probe(struct platform_device *pdev) | |||
279 | return -EINVAL; | 279 | return -EINVAL; |
280 | } | 280 | } |
281 | 281 | ||
282 | dht11->timestamp = ktime_get_real_ns() - DHT11_DATA_VALID_TIME - 1; | 282 | dht11->timestamp = ktime_get_boot_ns() - DHT11_DATA_VALID_TIME - 1; |
283 | dht11->num_edges = -1; | 283 | dht11->num_edges = -1; |
284 | 284 | ||
285 | platform_set_drvdata(pdev, iio); | 285 | platform_set_drvdata(pdev, iio); |
diff --git a/drivers/iio/imu/inv_mpu6050/Kconfig b/drivers/iio/imu/inv_mpu6050/Kconfig index 48fbc0bc7e2a..8f8d1370ed8b 100644 --- a/drivers/iio/imu/inv_mpu6050/Kconfig +++ b/drivers/iio/imu/inv_mpu6050/Kconfig | |||
@@ -5,9 +5,9 @@ | |||
5 | config INV_MPU6050_IIO | 5 | config INV_MPU6050_IIO |
6 | tristate "Invensense MPU6050 devices" | 6 | tristate "Invensense MPU6050 devices" |
7 | depends on I2C && SYSFS | 7 | depends on I2C && SYSFS |
8 | depends on I2C_MUX | ||
8 | select IIO_BUFFER | 9 | select IIO_BUFFER |
9 | select IIO_TRIGGERED_BUFFER | 10 | select IIO_TRIGGERED_BUFFER |
10 | select I2C_MUX | ||
11 | help | 11 | help |
12 | This driver supports the Invensense MPU6050 devices. | 12 | This driver supports the Invensense MPU6050 devices. |
13 | This driver can also support MPU6500 in MPU6050 compatibility mode | 13 | This driver can also support MPU6500 in MPU6050 compatibility mode |
diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c index 80fbbfd76faf..734a0042de0c 100644 --- a/drivers/iio/inkern.c +++ b/drivers/iio/inkern.c | |||
@@ -349,6 +349,8 @@ EXPORT_SYMBOL_GPL(iio_channel_get); | |||
349 | 349 | ||
350 | void iio_channel_release(struct iio_channel *channel) | 350 | void iio_channel_release(struct iio_channel *channel) |
351 | { | 351 | { |
352 | if (!channel) | ||
353 | return; | ||
352 | iio_device_put(channel->indio_dev); | 354 | iio_device_put(channel->indio_dev); |
353 | kfree(channel); | 355 | kfree(channel); |
354 | } | 356 | } |
diff --git a/drivers/iio/light/acpi-als.c b/drivers/iio/light/acpi-als.c index 60537ec0c923..53201d99a16c 100644 --- a/drivers/iio/light/acpi-als.c +++ b/drivers/iio/light/acpi-als.c | |||
@@ -54,7 +54,9 @@ static const struct iio_chan_spec acpi_als_channels[] = { | |||
54 | .realbits = 32, | 54 | .realbits = 32, |
55 | .storagebits = 32, | 55 | .storagebits = 32, |
56 | }, | 56 | }, |
57 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), | 57 | /* _RAW is here for backward ABI compatibility */ |
58 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | | ||
59 | BIT(IIO_CHAN_INFO_PROCESSED), | ||
58 | }, | 60 | }, |
59 | }; | 61 | }; |
60 | 62 | ||
@@ -152,7 +154,7 @@ static int acpi_als_read_raw(struct iio_dev *indio_dev, | |||
152 | s32 temp_val; | 154 | s32 temp_val; |
153 | int ret; | 155 | int ret; |
154 | 156 | ||
155 | if (mask != IIO_CHAN_INFO_RAW) | 157 | if ((mask != IIO_CHAN_INFO_PROCESSED) && (mask != IIO_CHAN_INFO_RAW)) |
156 | return -EINVAL; | 158 | return -EINVAL; |
157 | 159 | ||
158 | /* we support only illumination (_ALI) so far. */ | 160 | /* we support only illumination (_ALI) so far. */ |
diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/light/ltr501.c index 809a961b9a7f..6bf89d8f3741 100644 --- a/drivers/iio/light/ltr501.c +++ b/drivers/iio/light/ltr501.c | |||
@@ -180,7 +180,7 @@ static const struct ltr501_samp_table ltr501_ps_samp_table[] = { | |||
180 | {500000, 2000000} | 180 | {500000, 2000000} |
181 | }; | 181 | }; |
182 | 182 | ||
183 | static unsigned int ltr501_match_samp_freq(const struct ltr501_samp_table *tab, | 183 | static int ltr501_match_samp_freq(const struct ltr501_samp_table *tab, |
184 | int len, int val, int val2) | 184 | int len, int val, int val2) |
185 | { | 185 | { |
186 | int i, freq; | 186 | int i, freq; |
diff --git a/drivers/iio/pressure/mpl115.c b/drivers/iio/pressure/mpl115.c index f5ecd6e19f5d..a0d7deeac62f 100644 --- a/drivers/iio/pressure/mpl115.c +++ b/drivers/iio/pressure/mpl115.c | |||
@@ -117,7 +117,7 @@ static int mpl115_read_raw(struct iio_dev *indio_dev, | |||
117 | *val = ret >> 6; | 117 | *val = ret >> 6; |
118 | return IIO_VAL_INT; | 118 | return IIO_VAL_INT; |
119 | case IIO_CHAN_INFO_OFFSET: | 119 | case IIO_CHAN_INFO_OFFSET: |
120 | *val = 605; | 120 | *val = -605; |
121 | *val2 = 750000; | 121 | *val2 = 750000; |
122 | return IIO_VAL_INT_PLUS_MICRO; | 122 | return IIO_VAL_INT_PLUS_MICRO; |
123 | case IIO_CHAN_INFO_SCALE: | 123 | case IIO_CHAN_INFO_SCALE: |
diff --git a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c index 93e29fb67fa0..db35e04a0637 100644 --- a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c +++ b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | |||
@@ -87,7 +87,7 @@ static int lidar_i2c_xfer(struct lidar_data *data, u8 reg, u8 *val, int len) | |||
87 | 87 | ||
88 | ret = i2c_transfer(client->adapter, msg, 2); | 88 | ret = i2c_transfer(client->adapter, msg, 2); |
89 | 89 | ||
90 | return (ret == 2) ? 0 : ret; | 90 | return (ret == 2) ? 0 : -EIO; |
91 | } | 91 | } |
92 | 92 | ||
93 | static int lidar_smbus_xfer(struct lidar_data *data, u8 reg, u8 *val, int len) | 93 | static int lidar_smbus_xfer(struct lidar_data *data, u8 reg, u8 *val, int len) |
diff --git a/drivers/staging/iio/adc/Kconfig b/drivers/staging/iio/adc/Kconfig index 58d4517e1836..b9519be90fda 100644 --- a/drivers/staging/iio/adc/Kconfig +++ b/drivers/staging/iio/adc/Kconfig | |||
@@ -6,6 +6,7 @@ menu "Analog to digital converters" | |||
6 | config AD7606 | 6 | config AD7606 |
7 | tristate "Analog Devices AD7606 ADC driver" | 7 | tristate "Analog Devices AD7606 ADC driver" |
8 | depends on GPIOLIB || COMPILE_TEST | 8 | depends on GPIOLIB || COMPILE_TEST |
9 | depends on HAS_IOMEM | ||
9 | select IIO_BUFFER | 10 | select IIO_BUFFER |
10 | select IIO_TRIGGERED_BUFFER | 11 | select IIO_TRIGGERED_BUFFER |
11 | help | 12 | help |
diff --git a/drivers/staging/iio/meter/ade7753.c b/drivers/staging/iio/meter/ade7753.c index f129039bece3..69287108f793 100644 --- a/drivers/staging/iio/meter/ade7753.c +++ b/drivers/staging/iio/meter/ade7753.c | |||
@@ -217,8 +217,12 @@ error_ret: | |||
217 | static int ade7753_reset(struct device *dev) | 217 | static int ade7753_reset(struct device *dev) |
218 | { | 218 | { |
219 | u16 val; | 219 | u16 val; |
220 | int ret; | ||
221 | |||
222 | ret = ade7753_spi_read_reg_16(dev, ADE7753_MODE, &val); | ||
223 | if (ret) | ||
224 | return ret; | ||
220 | 225 | ||
221 | ade7753_spi_read_reg_16(dev, ADE7753_MODE, &val); | ||
222 | val |= BIT(6); /* Software Chip Reset */ | 226 | val |= BIT(6); /* Software Chip Reset */ |
223 | 227 | ||
224 | return ade7753_spi_write_reg_16(dev, ADE7753_MODE, val); | 228 | return ade7753_spi_write_reg_16(dev, ADE7753_MODE, val); |
@@ -343,8 +347,12 @@ error_ret: | |||
343 | static int ade7753_stop_device(struct device *dev) | 347 | static int ade7753_stop_device(struct device *dev) |
344 | { | 348 | { |
345 | u16 val; | 349 | u16 val; |
350 | int ret; | ||
351 | |||
352 | ret = ade7753_spi_read_reg_16(dev, ADE7753_MODE, &val); | ||
353 | if (ret) | ||
354 | return ret; | ||
346 | 355 | ||
347 | ade7753_spi_read_reg_16(dev, ADE7753_MODE, &val); | ||
348 | val |= BIT(4); /* AD converters can be turned off */ | 356 | val |= BIT(4); /* AD converters can be turned off */ |
349 | 357 | ||
350 | return ade7753_spi_write_reg_16(dev, ADE7753_MODE, val); | 358 | return ade7753_spi_write_reg_16(dev, ADE7753_MODE, val); |
diff --git a/drivers/staging/speakup/Kconfig b/drivers/staging/speakup/Kconfig index efd6f4560d3e..7e8037e230b8 100644 --- a/drivers/staging/speakup/Kconfig +++ b/drivers/staging/speakup/Kconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | menu "Speakup console speech" | 1 | menu "Speakup console speech" |
2 | 2 | ||
3 | config SPEAKUP | 3 | config SPEAKUP |
4 | depends on VT | 4 | depends on VT && !MN10300 |
5 | tristate "Speakup core" | 5 | tristate "Speakup core" |
6 | ---help--- | 6 | ---help--- |
7 | This is the Speakup screen reader. Think of it as a | 7 | This is the Speakup screen reader. Think of it as a |