1. 20 11月, 2015 1 次提交
  2. 25 10月, 2015 1 次提交
    • D
      i2c: add ACPI support for I2C mux ports · 8eb5c87a
      Dustin Byford 提交于
      Although I2C mux devices are easily enumerated using ACPI (_HID/_CID or
      device property compatible string match), enumerating I2C client devices
      connected through an I2C mux needs a little extra work.
      
      This change implements a method for describing an I2C device hierarchy that
      includes mux devices by using an ACPI Device() for each mux channel along
      with an _ADR to set the channel number for the device.  See
      Documentation/acpi/i2c-muxes.txt for a simple example.
      
      To make this work the ismt, i801, and designware pci/platform devs now
      share an ACPI companion with their I2C adapter dev similar to how it's done
      in OF.  This is done on the assumption that power management functions will
      not be called directly on the I2C dev that is sharing the ACPI node.
      Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Tested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NDustin Byford <dustin@cumulusnetworks.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      8eb5c87a
  3. 20 10月, 2015 1 次提交
  4. 15 10月, 2015 1 次提交
  5. 27 8月, 2015 1 次提交
    • D
      i2c: allow specifying separate wakeup interrupt in device tree · 3fffd128
      Dmitry Torokhov 提交于
      Instead of having each i2c driver individually parse device tree data in
      case it or platform supports separate wakeup interrupt, and handle
      enabling and disabling wakeup interrupts in their power management
      routines, let's have i2c core do that for us.
      
      Platforms wishing to specify separate wakeup interrupt for the device
      should use named interrupt syntax in their DTSes:
      
      	interrupt-parent = <&intc1>;
      	interrupts = <5 0>, <6 0>;
      	interrupt-names = "irq", "wakeup";
      
      This patch is inspired by work done by Vignesh R <vigneshr@ti.com> for
      pixcir_i2c_ts driver.
      
      Note that the original code tried to preserve any existing wakeup
      settings from userspace but was not quite right in that regard:
      it would preserve wakeup flag set by userspace upon driver rebinding;
      but it would re-arm the wakeup flag if it was disabled by userspace.
      
      We think that resetting the flag upon re-binding the driver is proper
      behavior as the driver is responsible for setting up and handling
      wakeups.
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      Tested-by: NVignesh R <vigneshr@ti.com>
      [wsa: updated the commit message]
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      3fffd128
  6. 24 8月, 2015 8 次提交
  7. 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
  8. 01 8月, 2015 1 次提交
  9. 31 7月, 2015 1 次提交
  10. 10 7月, 2015 1 次提交
  11. 02 6月, 2015 1 次提交
  12. 01 6月, 2015 3 次提交
  13. 13 5月, 2015 2 次提交
  14. 24 4月, 2015 1 次提交
  15. 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
  16. 10 4月, 2015 1 次提交
  17. 18 3月, 2015 1 次提交
  18. 17 3月, 2015 1 次提交
  19. 13 3月, 2015 1 次提交
  20. 12 3月, 2015 1 次提交
  21. 06 2月, 2015 1 次提交
  22. 27 1月, 2015 1 次提交
  23. 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
  24. 22 1月, 2015 1 次提交
  25. 14 1月, 2015 1 次提交
  26. 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
  27. 12 12月, 2014 1 次提交
  28. 25 11月, 2014 2 次提交