]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'iio-fixes-for-4.13a' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jul 2017 03:54:31 +0000 (20:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jul 2017 03:54:31 +0000 (20:54 -0700)
Jonathan writes:

First set of IIO fixes for the 4.13 cycle.

* ad2s1210
  - Fix negative angular velocity reads (identified by a gcc 7 warning)
* aspeed-adc
  - Wait for initialization sequence to finish before enabling channels.
  Without it no channels work.
* axp288
  - Revert a patch that dropped some bogus register mods.  No one is entirely
  sure why but it breaks charging on some devices.
  - Fix GPADC pin read returning 0. Turns out a small sleep is needed.
* bmc150
  - Make sure device is restored to normal state after suspend / resume
  cycle.  Otherwise, simple sysfs reads are broken.
* tsl2563
  - fix wrong event code.
* st-accel
  - add spi 3-wire support. Needed to fix the lsm303agr accelerometer
  which only had 3 wires in all cases.  Side effect is to enable optional
  3-wire support for other devices.
* st-pressure
  - disable multiread by default for LPS22HB (only effects SPI)
* sun4i-gpadc-iio
  - fix unbalanced irq enable / disable
* vf610
  - Fix VALT slection for REFSEL bits - ensures we are using the
  right reference pins.

1  2 
drivers/iio/accel/st_accel_core.c
drivers/iio/adc/aspeed_adc.c
drivers/iio/pressure/st_pressure_core.c

Simple merge
index e0ea411a0b2df9563085c70552086946843ba2ca,87fd6e0ce5ee000e871934b1ebeeb8221dd20039..c02b23d675cbc1540ec47769515da714c784cf67
@@@ -211,11 -218,26 +218,29 @@@ static int aspeed_adc_probe(struct plat
                goto scaler_error;
        }
  
+       model_data = of_device_get_match_data(&pdev->dev);
+       if (model_data->wait_init_sequence) {
+               /* Enable engine in normal mode. */
+               writel(ASPEED_OPERATION_MODE_NORMAL | ASPEED_ENGINE_ENABLE,
+                      data->base + ASPEED_REG_ENGINE_CONTROL);
+               /* Wait for initial sequence complete. */
+               ret = readl_poll_timeout(data->base + ASPEED_REG_ENGINE_CONTROL,
+                                        adc_engine_control_reg_val,
+                                        adc_engine_control_reg_val &
+                                        ASPEED_ADC_CTRL_INIT_RDY,
+                                        ASPEED_ADC_INIT_POLLING_TIME,
+                                        ASPEED_ADC_INIT_TIMEOUT);
+               if (ret)
+                       goto scaler_error;
+       }
        /* Start all channels in normal mode. */
 -      clk_prepare_enable(data->clk_scaler->clk);
 +      ret = clk_prepare_enable(data->clk_scaler->clk);
 +      if (ret)
 +              goto clk_enable_error;
 +
        adc_engine_control_reg_val = GENMASK(31, 16) |
                ASPEED_OPERATION_MODE_NORMAL | ASPEED_ENGINE_ENABLE;
        writel(adc_engine_control_reg_val,