mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
Second set of IIO fixes for the 4.10 cycle.
* afe4403
- retrieve valid iio_dev in suspend / resume. Previously using the wrong
dev for a call to dev_to_iio_dev.
* afe4404
- retrieve valid iio_dev in suspend / resume. Previously using the wrong
dev for a call to dev_to_iio_dev.
* dht11
- Something seems to have caused a regression in timing on the raspberry pi
2B. However, the bug that it threw up was real. msleep was occasionally
resulting in very long sleeps, over the limit possible to read from this
chip. Switch to usleep_range to avoid this. The timing needed by this
part is very fiddly.
* max30100
- wrong parenthesis around fifo count check meant it always read after the
almost_full state had been reached. I've tagged this with a fixes tag which
covers the last patch that it will not need precursor patches. The bug
predates that but will need backporting.
* palmas_gpadc.
- retrieve valid iio_dev in suspend / resume. Previously using the wrong
dev for a call to dev_to_iio_dev.
-----BEGIN PGP SIGNATURE-----
iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAliE2QQRHGppYzIzQGtl
cm5lbC5vcmcACgkQVIU0mcT0FojQYw//Ue6T61qUSLDucf8a0Li03Jo3Os/7bcK9
CsRGH0x6CmDeMy7Kcc8Mvvc/x95DHbhXZMk7AAbl9YDolFpdI11k4+6a0HPHoFYS
sX2aM9wcAi1dE9C8yWLsQm75+bohJsq5x3N3eLpLbiR6yLkml0CS1O6Bc67q9VHK
byz2dxHkxceqIVzZcrba1xtoo3OOEW7SAEJ0Ehj7jDiAaLEz+4myY0t9zrhBmbbP
kVL+Jefr35hrNDRmnIir3zbXXIF60n+AMeNwt7sf7c+mUnLw4A2XaOdtc9nIA7hC
RpoNxOLtpqQB5vs3Z7jT2z0uegg4xjKkCbAFJPo+EIHSJVud4I3Gd0kGElAQyqvY
X5IvfhTpIAZix4GIGcWIlR1EdyQswU7obGiADOth7I+2db8Vwi8ZtJCI8OAi7Ntp
kLPe92rgqABFYh14fqe26PJZDS4HX2AdbtRh32i8P9jcGBXHM0sb5fXAZ3dYwQJ5
AU3qkW0mCKR8gG3j1/yOfGZHiQIp8coM7o8HoTNQCidSqtedtQfTU7NXFplEVUzw
9OvaPtYjvx9qnH50x0jFAioBFraIZDTXGzgp2WZhutjmUcoGT1Q1sxjVuhdnTSti
uwrkR/WZB11+YU/yFRmoQ8emjwpNVGh3ID/t0I9sJuPxip6dWSMeGtBjptIh1uP4
9yi97j5YWl4=
=tk+L
-----END PGP SIGNATURE-----
Merge tag 'iio-fixes-for-4.10b' 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.10 cycle.
* afe4403
- retrieve valid iio_dev in suspend / resume. Previously using the wrong
dev for a call to dev_to_iio_dev.
* afe4404
- retrieve valid iio_dev in suspend / resume. Previously using the wrong
dev for a call to dev_to_iio_dev.
* dht11
- Something seems to have caused a regression in timing on the raspberry pi
2B. However, the bug that it threw up was real. msleep was occasionally
resulting in very long sleeps, over the limit possible to read from this
chip. Switch to usleep_range to avoid this. The timing needed by this
part is very fiddly.
* max30100
- wrong parenthesis around fifo count check meant it always read after the
almost_full state had been reached. I've tagged this with a fixes tag which
covers the last patch that it will not need precursor patches. The bug
predates that but will need backporting.
* palmas_gpadc.
- retrieve valid iio_dev in suspend / resume. Previously using the wrong
dev for a call to dev_to_iio_dev.
This commit is contained in:
commit
9579c4dc21
5 changed files with 11 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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…
Reference in a new issue