Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 252bf9f4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 8fcdcc42 b17c1bba
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -775,7 +775,7 @@ static int palmas_adc_wakeup_reset(struct palmas_gpadc *adc)

static int palmas_gpadc_suspend(struct device *dev)
{
	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
	struct iio_dev *indio_dev = dev_get_drvdata(dev);
	struct palmas_gpadc *adc = iio_priv(indio_dev);
	int wakeup = adc->wakeup1_enable || adc->wakeup2_enable;
	int ret;
@@ -798,7 +798,7 @@ static int palmas_gpadc_suspend(struct device *dev)

static int palmas_gpadc_resume(struct device *dev)
{
	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
	struct iio_dev *indio_dev = dev_get_drvdata(dev);
	struct palmas_gpadc *adc = iio_priv(indio_dev);
	int wakeup = adc->wakeup1_enable || adc->wakeup2_enable;
	int ret;
+2 −2
Original line number Diff line number Diff line
@@ -422,7 +422,7 @@ MODULE_DEVICE_TABLE(of, afe4403_of_match);

static int __maybe_unused afe4403_suspend(struct device *dev)
{
	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
	struct iio_dev *indio_dev = spi_get_drvdata(to_spi_device(dev));
	struct afe4403_data *afe = iio_priv(indio_dev);
	int ret;

@@ -443,7 +443,7 @@ static int __maybe_unused afe4403_suspend(struct device *dev)

static int __maybe_unused afe4403_resume(struct device *dev)
{
	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
	struct iio_dev *indio_dev = spi_get_drvdata(to_spi_device(dev));
	struct afe4403_data *afe = iio_priv(indio_dev);
	int ret;

+2 −2
Original line number Diff line number Diff line
@@ -428,7 +428,7 @@ MODULE_DEVICE_TABLE(of, afe4404_of_match);

static int __maybe_unused afe4404_suspend(struct device *dev)
{
	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
	struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
	struct afe4404_data *afe = iio_priv(indio_dev);
	int ret;

@@ -449,7 +449,7 @@ static int __maybe_unused afe4404_suspend(struct device *dev)

static int __maybe_unused afe4404_resume(struct device *dev)
{
	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
	struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
	struct afe4404_data *afe = iio_priv(indio_dev);
	int ret;

+1 −1
Original line number Diff line number Diff line
@@ -238,7 +238,7 @@ static irqreturn_t max30100_interrupt_handler(int irq, void *private)

	mutex_lock(&data->lock);

	while (cnt || (cnt = max30100_fifo_count(data) > 0)) {
	while (cnt || (cnt = max30100_fifo_count(data)) > 0) {
		ret = max30100_read_measurement(data);
		if (ret)
			break;
+4 −2
Original line number Diff line number Diff line
@@ -71,7 +71,8 @@
 * a) select an implementation using busy loop polling on those systems
 * b) use the checksum to do some probabilistic decoding
 */
#define DHT11_START_TRANSMISSION	18  /* ms */
#define DHT11_START_TRANSMISSION_MIN	18000  /* us */
#define DHT11_START_TRANSMISSION_MAX	20000  /* us */
#define DHT11_MIN_TIMERES	34000  /* ns */
#define DHT11_THRESHOLD		49000  /* ns */
#define DHT11_AMBIG_LOW		23000  /* ns */
@@ -228,7 +229,8 @@ static int dht11_read_raw(struct iio_dev *iio_dev,
		ret = gpio_direction_output(dht11->gpio, 0);
		if (ret)
			goto err;
		msleep(DHT11_START_TRANSMISSION);
		usleep_range(DHT11_START_TRANSMISSION_MIN,
			     DHT11_START_TRANSMISSION_MAX);
		ret = gpio_direction_input(dht11->gpio);
		if (ret)
			goto err;
Loading