1. 10 8月, 2015 2 次提交
    • V
      i2c: core: add and export of_get_i2c_adapter_by_node() interface · 48e9743d
      Vladimir Zapolskiy 提交于
      of_find_i2c_adapter_by_node() call requires quite often missing
      put_device(), and i2c_put_adapter() releases a device locked by
      i2c_get_adapter() only. In general module_put(adapter->owner) and
      put_device(dev) are not interchangeable.
      
      This is a common error reproduction scenario as a result of the
      misusage described above (for clearness this is run on iMX6 platform
      with HDMI and I2C bus drivers compiled as kernel modules):
      
          root@mx6q:~# lsmod | grep i2c
          i2c_imx                10213  0
          root@mx6q:~# lsmod | grep dw_hdmi_imx
          dw_hdmi_imx             3631  0
          dw_hdmi                11846  1 dw_hdmi_imx
          imxdrm                  8674  3 dw_hdmi_imx,imx_ipuv3_crtc,imx_ldb
          drm_kms_helper        113765  5 dw_hdmi,imxdrm,imx_ipuv3_crtc,imx_ldb
          root@mx6q:~# rmmod dw_hdmi_imx
          root@mx6q:~# lsmod | grep i2c
          i2c_imx                10213  -1
      
                                       ^^^^^
      
          root@mx6q:~# rmmod i2c_imx
          rmmod: ERROR: Module i2c_imx is in use
      
      To fix existing users of these interfaces and to avoid any further
      confusion and misusage in future, add one more interface
      of_get_i2c_adapter_by_node(), it is similar to i2c_get_adapter() in
      sense that an I2C bus device driver found and locked by user can be
      correctly unlocked by i2c_put_adapter().
      Signed-off-by: NVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      48e9743d
    • V
      i2c: core: manage i2c bus device refcount in i2c_[get|put]_adapter · 611e12ea
      Vladimir Zapolskiy 提交于
      In addition to module_get()/module_put() add get_device()/put_device()
      calls into i2c_get_adapter()/i2c_put_adapter() exported
      interfaces. This is done to lock I2C bus device, if it is in use by a
      client.
      Signed-off-by: NVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      611e12ea
  2. 01 8月, 2015 1 次提交
  3. 31 7月, 2015 1 次提交
  4. 10 7月, 2015 1 次提交
  5. 02 6月, 2015 1 次提交
  6. 01 6月, 2015 3 次提交
  7. 13 5月, 2015 2 次提交
  8. 24 4月, 2015 1 次提交
  9. 16 4月, 2015 1 次提交
    • M
      i2c: core: Export bus recovery functions · c1c21f4e
      Mark Brown 提交于
      Current -next fails to link an ARM allmodconfig because drivers that use
      the core recovery functions can be built as modules but those functions
      are not exported:
      
      ERROR: "i2c_generic_gpio_recovery" [drivers/i2c/busses/i2c-davinci.ko] undefined!
      ERROR: "i2c_generic_scl_recovery" [drivers/i2c/busses/i2c-davinci.ko] undefined!
      ERROR: "i2c_recover_bus" [drivers/i2c/busses/i2c-davinci.ko] undefined!
      
      Add exports to fix this.
      
      Fixes: 5f9296ba (i2c: Add bus recovery infrastructure)
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      c1c21f4e
  10. 10 4月, 2015 1 次提交
  11. 18 3月, 2015 1 次提交
  12. 17 3月, 2015 1 次提交
  13. 13 3月, 2015 1 次提交
  14. 12 3月, 2015 1 次提交
  15. 06 2月, 2015 1 次提交
  16. 27 1月, 2015 1 次提交
  17. 26 1月, 2015 1 次提交
    • D
      i2c: do not try to load modules for of-registered devices · c680eed5
      Dmitry Torokhov 提交于
      Trying to register an I2C device asynchronously (via async_schedule() call)
      results in an ugly warning from request_module() warning about potential
      deadlock (because request_module tries to wait for async works to
      complete). While we could try to switch to request_module_nowait(), other
      buses, as well as I2C itself when not using device tree, do not try to load
      modules, but rather rely on the standard infrastructure (udev) to execute
      module loading, and we should be doing the same.
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      c680eed5
  18. 22 1月, 2015 1 次提交
  19. 14 1月, 2015 1 次提交
  20. 23 12月, 2014 1 次提交
    • L
      i2c: Remove support for legacy PM · 523c5b89
      Lars-Peter Clausen 提交于
      There haven't been any I2C driver that use the legacy suspend/resume
      callbacks for a while now and new drivers are supposed to use PM ops. So
      remove support for legacy suspend/resume for I2C drivers.
      
      Since there aren't any special bus specific things to do during
      suspend/resume and since the PM core will automatically fallback directly to
      using the device's PM ops if no bus PM ops are specified there is no need to
      have any I2C bus PM ops.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      523c5b89
  21. 12 12月, 2014 1 次提交
  22. 25 11月, 2014 2 次提交
  23. 24 11月, 2014 1 次提交
  24. 18 11月, 2014 2 次提交
  25. 10 11月, 2014 1 次提交
  26. 08 11月, 2014 2 次提交
  27. 30 9月, 2014 1 次提交
  28. 25 9月, 2014 2 次提交
  29. 22 9月, 2014 1 次提交
  30. 26 7月, 2014 1 次提交
  31. 17 7月, 2014 1 次提交
    • W
      i2c: add debug info when class instantiation was dropped · 45552272
      Wolfram Sang 提交于
      We have a warning already when support for old-fashioned class based
      instantiation is about to be dropped somewhen soon from a driver. Let's
      have another one when it was actually dropped. This allows to remove the
      cruft a little earlier and still let users know what happened in the
      rare case they are missing devices after the change. However, there is
      enough interest to get rid of class based instantiation rather sooner
      than later because it improves boot up time.
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      45552272
  32. 27 6月, 2014 1 次提交