1. 04 7月, 2013 1 次提交
  2. 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
  3. 26 6月, 2013 4 次提交
  4. 21 6月, 2013 1 次提交
  5. 19 6月, 2013 3 次提交
    • 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
    • W
      Revert "i2c: core: make it possible to match a pure device tree driver" · 661f6c1c
      Wolfram Sang 提交于
      This reverts commit c80f5284.
      Regressions have been found and also run time based instantiation would
      fail. We need more thoughts on this.
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      661f6c1c
  6. 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
  7. 15 6月, 2013 6 次提交
  8. 13 6月, 2013 7 次提交
    • S
      i2c: bfin-twi: Read and write the FIFO in loop · 8419c8de
      Sonic Zhang 提交于
      TWI transfer interrupts may be lost when system is heavily handling other
      interrupts, while current transfer handler depends on each accurate interrupt
      and misses some data in this case. Because there are 2 2-byte FIFOs in blackfin
      TWI controller, the occurrence of the data loss can be reduced by reading till
      the RX FIFO is empty and writing till the TX FIFO is full.
      Reported-by: NBob Maris <mail@maris-ee.eu>
      Signed-off-by: NSonic Zhang <sonic.zhang@analog.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      8419c8de
    • L
      i2c: core: make it possible to match a pure device tree driver · c80f5284
      Linus Walleij 提交于
      This tries to address an issue found when writing an MFD driver
      for the Nomadik STw481x PMICs: as the platform is using device
      tree exclusively I want to specify the driver matching like
      this:
      
      static const struct of_device_id stw481x_match[] = {
      	{ .compatible = "st,stw4810", },
      	{ .compatible = "st,stw4811", },
      	{},
      };
      
      static struct i2c_driver stw481x_driver = {
      	.driver = {
      		.name	= "stw481x",
      		.of_match_table = stw481x_match,
      	},
      	.probe		= stw481x_probe,
      	.remove		= stw481x_remove,
      };
      
      However that turns out not to be possible: the I2C probe code
      is written so that the probe() call is always passed a match
      from i2c_match_id() using non-devicetree matches.
      
      This is probably why most devices using device tree for I2C
      clients currently will pass no .of_match_table *at all* but
      instead just use .id_table from struct i2c_driver to match
      the device. As you realize that means that the whole idea with
      compatible strings is discarded, and that is why we find strange
      device tree I2C device compatible strings like "product" instead
      of "vendor,product" as you could expect.
      
      Let's figure out how to fix this before the mess spreads. This
      patch will allow probeing devices with only an of_match_table
      as per above, and will pass NULL as the second argument to the
      probe() function. If the driver wants to deduce secondary info
      from the struct of_device_id .data field, it has to call
      of_match_device() on its own match table in the probe function
      device tree probe path.
      
      If drivers define both an .of_match_table *AND* a i2c_driver
      .id_table, the .of_match_table will take precedence, just
      as is done in the i2c_device_match() function in i2c-core.c.
      
      I2C devices probed from device tree should subsequently be
      fixed to handle the case where of_match_table() is
      used (I think none of them do that today), and platforms should
      fix their device trees to use compatible strings for I2C devices
      instead of setting the name to Linux device driver names as is
      done in multiple cases today.
      
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Grant Likely <grant.likely@linaro.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      c80f5284
    • J
      i2c: use platform_{get,set}_drvdata() · c2c64954
      Jingoo Han 提交于
      Use the wrapper functions for getting and setting the driver data using
      platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
      so we can directly pass a struct platform_device.
      Signed-off-by: NJingoo Han <jg1.han@samsung.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      c2c64954
    • W
      drivers/i2c/busses: don't check resource with devm_ioremap_resource · 3cc2d009
      Wolfram Sang 提交于
      devm_ioremap_resource does sanity checks on the given resource. No need to
      duplicate this in the driver.
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      3cc2d009
    • M
      i2c: designware: prevent signals from aborting I2C transfers · e42dba56
      Mika Westerberg 提交于
      If a process receives signal while it is waiting for I2C transfer to
      complete, an error is returned to the caller and the transfer is aborted.
      This can cause the driver to fail subsequent transfers. Also according to
      commit d295a86e (i2c: mv64xxx: work around signals causing I2C
      transactions to be aborted) I2C drivers aren't supposed to abort
      transactions on signals.
      
      To prevent this switch to use wait_for_completion_timeout() instead of
      wait_for_completion_interruptible_timeout() in the designware I2C driver.
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: NChristian Ruppert <christian.ruppert@abilis.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      e42dba56
    • F
      i2c: mxs: Let device core handle pinctrl · dfda7d8f
      Fabio Estevam 提交于
      Since commit ab78029e (drivers/pinctrl: grab default handles from device core),
      we can rely on device core for handling pinctrl.
      
      So remove devm_pinctrl_get_select_default() from the driver.
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      dfda7d8f
    • F
      i2c: imx: Let device core handle pinctrl · 76b1f723
      Fabio Estevam 提交于
      Since commit ab78029e (drivers/pinctrl: grab default handles from device core),
      we can rely on device core for handling pinctrl.
      
      So remove devm_pinctrl_get_select_default() from the driver.
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      76b1f723
  9. 06 6月, 2013 9 次提交
  10. 03 6月, 2013 4 次提交
  11. 02 6月, 2013 2 次提交
    • L
      Linux 3.10-rc4 · d683b96b
      Linus Torvalds 提交于
      d683b96b
    • S
      sata_rcar: fix interrupt handling · 52a2a108
      Sergei Shtylyov 提交于
      The driver's interrupt handling code is too picky in deciding whether it should
      handle an interrupt or not which causes completely unneeded spurious interrupts.
      Thus make sata_rcar_{ata|serr}_interrupt() *void*; add ATA status register read
      to sata_rcar_ata_interrupt() to clear an unexpected ATA interrupt -- it doesn't
      get cleared by writing to the SATAINTSTAT register in the interrupt mode we use.
      
      Also, in sata_rcar_ata_interrupt() we should check SATAINTSTAT register only for
      enabled interrupts and we should clear  only those interrupts  that we have read
      as active first time around, because else we have  a  race and risk clearing  an
      interrupt that  can  occur between read  and write of the  SATAINTSTAT  register
      and never registering it...
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: stable@vger.kernel.org
      52a2a108