1. 13 2月, 2016 1 次提交
    • T
      i2c: omap: Fix PM regression with deferred probe for pm_runtime_reinit · e6244dee
      Tony Lindgren 提交于
      Commit 5de85b9d ("PM / runtime: Re-init runtime PM states at probe
      error and driver unbind") introduced pm_runtime_reinit() that is used
      to reinitialize PM runtime after -EPROBE_DEFER. This allows shutting
      down the device after a failed probe.
      
      However, for drivers using pm_runtime_use_autosuspend() this can cause
      a state where suspend callback is never called after -EPROBE_DEFER.
      On the following device driver probe, hardware state is different from
      the PM runtime state causing omap_device to produce the following
      error:
      
      omap_device_enable() called from invalid state 1
      
      And with omap_device and omap hardware being picky for PM, this will
      block any deeper idle states in hardware.
      
      The solution is to fix the drivers to follow the PM runtime documentation:
      
      1. For sections of code that needs the device disabled, use
         pm_runtime_put_sync_suspend() if pm_runtime_set_autosuspend() has
         been set.
      
      2. For driver exit code, use pm_runtime_dont_use_autosuspend() before
         pm_runtime_put_sync() if pm_runtime_use_autosuspend() has been
         set.
      
      Fixes: 5de85b9d ("PM / runtime: Re-init runtime PM states at probe
      error and driver unbind")
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Acked-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      e6244dee
  2. 10 8月, 2015 4 次提交
  3. 31 7月, 2015 1 次提交
  4. 13 5月, 2015 1 次提交
  5. 12 5月, 2015 1 次提交
  6. 06 12月, 2014 1 次提交
  7. 26 11月, 2014 1 次提交
  8. 24 11月, 2014 4 次提交
  9. 23 11月, 2014 1 次提交
  10. 21 11月, 2014 1 次提交
    • A
      i2c: omap: fix NACK and Arbitration Lost irq handling · 27caca9d
      Alexander Kochetkov 提交于
      commit 1d7afc95 (i2c: omap: ack IRQ in parts)
      changed the interrupt handler to complete transfers without clearing
      XRDY (AL case) and ARDY (NACK case) flags. XRDY or ARDY interrupts will be
      fired again. As a result, ISR keep processing transfer after it was already
      complete (from the driver code point of view).
      
      A didn't see real impacts of the 1d7afc95, but it is really bad idea to
      have ISR running on user data after transfer was complete.
      
      It looks, what 1d7afc95 violate TI specs in what how AL and NACK should be
      handled (see Note 1, sprugn4r, Figure 17-31 and Figure 17-32).
      
      According to specs (if I understood correctly), in case of NACK and AL driver
      must reset NACK, AL, ARDY, RDR, and RRDY (Master Receive Mode), and
      NACK, AL, ARDY, and XDR (Master Transmitter Mode).
      
      All that is done down the code under the if condition:
      if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK | OMAP_I2C_STAT_AL)) ...
      
      The patch restore pre 1d7afc95 logic of handling NACK and AL interrupts, so
      no interrupts is fired after ISR informs the rest of driver what transfer
      complete.
      
      Note: instead of removing break under NACK case, we could just replace 'break'
      with 'continue' and allow NACK transfer to finish using ARDY event. I found
      that NACK and ARDY bits usually set together. That case confirm TI wiki:
      http://processors.wiki.ti.com/index.php/I2C_Tips#Detecting_and_handling_NACK
      
      In order if someone interested in the event traces for NACK and AL cases,
      I sent them to mailing list.
      
      Tested on Beagleboard XM C.
      Signed-off-by: NAlexander Kochetkov <al.kochet@gmail.com>
      Fixes: 1d7afc95 i2c: omap: ack IRQ in parts
      Cc: <stable@vger.kernel.org> # v3.7+
      Acked-by: NFelipe Balbi <balbi@ti.com>
      Tested-by: NAaro Koskinen <aaro.koskinen@iki.fi>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      27caca9d
  11. 08 11月, 2014 1 次提交
  12. 20 10月, 2014 1 次提交
  13. 17 7月, 2014 1 次提交
    • W
      i2c: i2c-omap: Drop class based scanning to improve bootup time · cfac71d9
      Wolfram Sang 提交于
      This driver has been flagged to drop class based instantiation. The removal
      improves boot-up time and is unneeded for embedded controllers. Users have been
      warned to switch for some time now, so we can actually do the removal. Keep the
      DEPRECATED flag, so the core can inform users that the behaviour finally
      changed now. After another transition period, this flag can go, too.
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      cfac71d9
  14. 03 6月, 2014 1 次提交
  15. 28 3月, 2014 1 次提交
    • N
      i2c: omap: fix usage of IS_ERR_VALUE with pm_runtime_get_sync · ff370257
      Nishanth Menon 提交于
      we use IS_ERR_VALUE to check for error values of pm_runtime_get_sync,
      when the value can only be < 0 in the case of err. Replace the
      check with a simpler < 0 check.
      
      This fixes the coccicheck warnings:
      linux-2.6/drivers/i2c/busses/i2c-omap.c:1157:5-24:
      pm_runtime_get_sync returns < 0 as error. Unecessary IS_ERR_VALUE at
      line 1158
      linux-2.6/drivers/i2c/busses/i2c-omap.c:1278:7-26:
      pm_runtime_get_sync returns < 0 as error. Unecessary IS_ERR_VALUE at
      line 1279
      drivers/i2c/busses/i2c-omap.c:638:5-24:
      pm_runtime_get_sync returns < 0 as error. Unecessary IS_ERR_VALUE at
      line 639
      Signed-off-by: NNishanth Menon <nm@ti.com>
      Reviewed-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      ff370257
  16. 06 3月, 2014 1 次提交
  17. 28 11月, 2013 1 次提交
  18. 16 11月, 2013 1 次提交
  19. 15 11月, 2013 1 次提交
  20. 10 10月, 2013 1 次提交
  21. 23 8月, 2013 1 次提交
    • W
      i2c: move OF helpers into the core · 687b81d0
      Wolfram Sang 提交于
      I2C of helpers used to live in of_i2c.c but experience (from SPI) shows
      that it is much cleaner to have this in the core. This also removes a
      circular dependency between the helpers and the core, and so we can
      finally register child nodes in the core instead of doing this manually
      in each driver. So, fix the drivers and documentation, too.
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      687b81d0
  22. 20 8月, 2013 1 次提交
  23. 19 8月, 2013 1 次提交
  24. 07 8月, 2013 1 次提交
  25. 19 6月, 2013 1 次提交
    • O
      i2c: omap: correct usage of the interrupt enable register · 4368de19
      Oleksandr Dmytryshyn 提交于
      We've been lucky not to have any interrupts fire during the suspend
      path, otherwise we would have unpredictable behaviour in the kernel.
      
      Based on the logic of the kernel code interrupts from i2c should be
      prohibited during suspend. Kernel writes 0 to the I2C_IE register in
      the omap_i2c_runtime_suspend() function. In the other side kernel
      writes saved interrupt flags to the I2C_IE register in
      omap_i2c_runtime_resume() function. I.e. interrupts should be disabled
      during suspend.
      
      This works for chips with version1 registers scheme. Interrupts are
      disabled during suspend. For chips with version2 scheme registers
      writting 0 to the I2C_IE register does nothing (because now the
      I2C_IRQENABLE_SET register is located at this address). This register
      is used to enable interrupts. For disabling interrupts
      I2C_IRQENABLE_CLR register should be used.
      
      Because the registers I2C_IRQENABLE_SET and I2C_IE have the same
      addresses, the interrupt enabling procedure is unchanged.
      
      I've checked that interrupts in the i2c controller are still enabled
      after writting 0 to the I2C_IRQENABLE_SET register. With this patch
      interrupts are disabled in the omap_i2c_runtime_suspend() function.
      
      Patch is based on:
      git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
      tag: v3.10-rc2
      
      Verified on OMAP4430.
      Signed-off-by: NOleksandr Dmytryshyn <oleksandr.dmytryshyn@ti.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      4368de19
  26. 13 6月, 2013 1 次提交
  27. 22 2月, 2013 1 次提交
  28. 25 1月, 2013 1 次提交
  29. 22 1月, 2013 2 次提交
  30. 23 12月, 2012 1 次提交
  31. 28 11月, 2012 1 次提交
  32. 16 11月, 2012 1 次提交
  33. 15 11月, 2012 1 次提交