1. 01 7月, 2013 2 次提交
    • K
      i2c: Kontron PLD i2c bus driver · e0b9b7b0
      Kevin Strasser 提交于
      Add i2c support for the on-board PLD found on some Kontron embedded
      modules.
      
      Originally-From: Michael Brunner <michael.brunner@kontron.com>
      Signed-off-by: NKevin Strasser <kevin.strasser@linux.intel.com>
      Acked-by: NGuenter Roeck <linux@roeck-us.net>
      Acked-by: NDarren Hart <dvhart@linux.intel.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      e0b9b7b0
    • K
      i2c: iop3xxx: fix build failure after waitqueue changes · 88a8e4aa
      Kevin Hilman 提交于
      There has long been a syntax problem in iop3xx_i2c_wait_event() which
      has been somehow hidden by the macros in <linux/wait.h>.  After some
      recent cleanup/rework of the wait_event_* helpers, the bug has come
      out from hiding and now results in build failure:
      
      /work/kernel/next/drivers/i2c/busses/i2c-iop3xx.c: In function 'iop3xx_i2c_wait_event':
      /work/kernel/next/drivers/i2c/busses/i2c-iop3xx.c:176:143: error: expected ')' before ';' token
      /work/kernel/next/drivers/i2c/busses/i2c-iop3xx.c:176:157: error: expected ')' before ';' token
      /work/kernel/next/drivers/i2c/busses/i2c-iop3xx.c:176:213: error: expected ')' before ';' token
      /work/kernel/next/drivers/i2c/busses/i2c-iop3xx.c:176:291: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
      /work/kernel/next/drivers/i2c/busses/i2c-iop3xx.c:176:551: error: expected ')' before ';' token
      /work/kernel/next/drivers/i2c/busses/i2c-iop3xx.c:176:565: error: expected ')' before ';' token
      /work/kernel/next/drivers/i2c/busses/i2c-iop3xx.c:176:764: error: expected ')' before ';' token
      /work/kernel/next/drivers/i2c/busses/i2c-iop3xx.c:176:778: error: expected ')' b
      
      Fix by removing stray ';'
      Signed-off-by: NKevin Hilman <khilman@linaro.org>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      88a8e4aa
  2. 26 6月, 2013 4 次提交
  3. 21 6月, 2013 1 次提交
  4. 19 6月, 2013 2 次提交
    • 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
    • D
      i2c-pxa: prepare clock before use · 7a10f473
      Daniel Drake 提交于
      On OLPC XO-1.75 (MMP2), a WARN_ON() was occurring during boot
      since the clock being enabled by i2c-pxa had not been prepared.
      
      Use clk_prepare_enable() to ensure that the prepare operation
      has taken place, and use clk_disable_unprepare() in the matching
      shutdown paths.
      Signed-off-by: NDaniel Drake <dsd@laptop.org>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      7a10f473
  5. 16 6月, 2013 1 次提交
    • L
      i2c: nomadik: allocate adapter number dynamically · d15b8575
      Linus Walleij 提交于
      The Nomadik I2C was using a local atomic counter to number
      the I2C adapters. This does not work on configurations where
      you also add, say a GPIO bit-banged adapter to the system.
      They will start to conflict about being adapter 0.
      
      There is no reason to use the numbered adapter function, and
      the semantic effect on systems with only Nomadik I2C blocks
      will be none - instead of increasing the number atomically
      in the driver itself, it is done in the I2C core.
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      d15b8575
  6. 15 6月, 2013 6 次提交
  7. 13 6月, 2013 6 次提交
  8. 06 6月, 2013 9 次提交
  9. 18 5月, 2013 4 次提交
  10. 17 5月, 2013 2 次提交
    • M
      i2c: designware: always clear interrupts before enabling them · 2a2d95e9
      Mika Westerberg 提交于
      If the I2C bus is put to a low power state by an ACPI method it might pull
      the SDA line low (as its power is removed). Once the bus is put to full
      power state again, the SDA line is pulled back to high. This transition
      looks like a STOP condition from the controller point-of-view which sets
      STOP detected bit in its status register causing the driver to fail
      subsequent transfers.
      
      Fix this by always clearing all interrupts before we start a transfer.
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      Cc: stable@kernel.org
      2a2d95e9
    • J
      i2c: designware: fix RX FIFO overrun · e6f34cea
      Josef Ahmad 提交于
      i2c_dw_xfer_msg() pushes a number of bytes to transmit/receive
      to/from the bus into the TX FIFO.
      For master-rx transactions, the maximum amount of data that can be
      received is calculated depending solely on TX and RX FIFO load.
      
      This is racy - TX FIFO may contain master-rx data yet to be
      processed, which will eventually land into the RX FIFO. This
      data is not taken into account and the function may request more
      data than the controller is actually capable of storing.
      
      This patch ensures the driver takes into account the outstanding
      master-rx data in TX FIFO to prevent RX FIFO overrun.
      Signed-off-by: NJosef Ahmad <josef.ahmad@linux.intel.com>
      Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      Cc: stable@kernel.org
      e6f34cea
  11. 24 4月, 2013 2 次提交
  12. 20 4月, 2013 1 次提交