Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'staging-4.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging/IIO fixes from Greg KH:
"Here are a few small IIO and one staging driver fix for 4.10-rc7. They
fix some reported issues with the drivers.

All of them have been in linux-next for a week or so with no reported
issues"

* tag 'staging-4.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging: greybus: timesync: validate platform state callback
iio: dht11: Use usleep_range instead of msleep for start signal
iio: adc: palmas_gpadc: retrieve a valid iio_dev in suspend/resume
iio: health: max30100: fixed parenthesis around FIFO count check
iio: health: afe4404: retrieve a valid iio_dev in suspend/resume
iio: health: afe4403: retrieve a valid iio_dev in suspend/resume

+17 -9
+2 -2
drivers/iio/adc/palmas_gpadc.c
··· 775 775 776 776 static int palmas_gpadc_suspend(struct device *dev) 777 777 { 778 - struct iio_dev *indio_dev = dev_to_iio_dev(dev); 778 + struct iio_dev *indio_dev = dev_get_drvdata(dev); 779 779 struct palmas_gpadc *adc = iio_priv(indio_dev); 780 780 int wakeup = adc->wakeup1_enable || adc->wakeup2_enable; 781 781 int ret; ··· 798 798 799 799 static int palmas_gpadc_resume(struct device *dev) 800 800 { 801 - struct iio_dev *indio_dev = dev_to_iio_dev(dev); 801 + struct iio_dev *indio_dev = dev_get_drvdata(dev); 802 802 struct palmas_gpadc *adc = iio_priv(indio_dev); 803 803 int wakeup = adc->wakeup1_enable || adc->wakeup2_enable; 804 804 int ret;
+2 -2
drivers/iio/health/afe4403.c
··· 422 422 423 423 static int __maybe_unused afe4403_suspend(struct device *dev) 424 424 { 425 - struct iio_dev *indio_dev = dev_to_iio_dev(dev); 425 + struct iio_dev *indio_dev = spi_get_drvdata(to_spi_device(dev)); 426 426 struct afe4403_data *afe = iio_priv(indio_dev); 427 427 int ret; 428 428 ··· 443 443 444 444 static int __maybe_unused afe4403_resume(struct device *dev) 445 445 { 446 - struct iio_dev *indio_dev = dev_to_iio_dev(dev); 446 + struct iio_dev *indio_dev = spi_get_drvdata(to_spi_device(dev)); 447 447 struct afe4403_data *afe = iio_priv(indio_dev); 448 448 int ret; 449 449
+2 -2
drivers/iio/health/afe4404.c
··· 428 428 429 429 static int __maybe_unused afe4404_suspend(struct device *dev) 430 430 { 431 - struct iio_dev *indio_dev = dev_to_iio_dev(dev); 431 + struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev)); 432 432 struct afe4404_data *afe = iio_priv(indio_dev); 433 433 int ret; 434 434 ··· 449 449 450 450 static int __maybe_unused afe4404_resume(struct device *dev) 451 451 { 452 - struct iio_dev *indio_dev = dev_to_iio_dev(dev); 452 + struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev)); 453 453 struct afe4404_data *afe = iio_priv(indio_dev); 454 454 int ret; 455 455
+1 -1
drivers/iio/health/max30100.c
··· 238 238 239 239 mutex_lock(&data->lock); 240 240 241 - while (cnt || (cnt = max30100_fifo_count(data) > 0)) { 241 + while (cnt || (cnt = max30100_fifo_count(data)) > 0) { 242 242 ret = max30100_read_measurement(data); 243 243 if (ret) 244 244 break;
+4 -2
drivers/iio/humidity/dht11.c
··· 71 71 * a) select an implementation using busy loop polling on those systems 72 72 * b) use the checksum to do some probabilistic decoding 73 73 */ 74 - #define DHT11_START_TRANSMISSION 18 /* ms */ 74 + #define DHT11_START_TRANSMISSION_MIN 18000 /* us */ 75 + #define DHT11_START_TRANSMISSION_MAX 20000 /* us */ 75 76 #define DHT11_MIN_TIMERES 34000 /* ns */ 76 77 #define DHT11_THRESHOLD 49000 /* ns */ 77 78 #define DHT11_AMBIG_LOW 23000 /* ns */ ··· 229 228 ret = gpio_direction_output(dht11->gpio, 0); 230 229 if (ret) 231 230 goto err; 232 - msleep(DHT11_START_TRANSMISSION); 231 + usleep_range(DHT11_START_TRANSMISSION_MIN, 232 + DHT11_START_TRANSMISSION_MAX); 233 233 ret = gpio_direction_input(dht11->gpio); 234 234 if (ret) 235 235 goto err;
+6
drivers/staging/greybus/timesync_platform.c
··· 45 45 46 46 int gb_timesync_platform_lock_bus(struct gb_timesync_svc *pdata) 47 47 { 48 + if (!arche_platform_change_state_cb) 49 + return 0; 50 + 48 51 return arche_platform_change_state_cb(ARCHE_PLATFORM_STATE_TIME_SYNC, 49 52 pdata); 50 53 } 51 54 52 55 void gb_timesync_platform_unlock_bus(void) 53 56 { 57 + if (!arche_platform_change_state_cb) 58 + return; 59 + 54 60 arche_platform_change_state_cb(ARCHE_PLATFORM_STATE_ACTIVE, NULL); 55 61 } 56 62