1. 02 Jun, 2014 5 commits
    • Mika Westerberg's avatar
      i2c: designware: Add runtime PM hooks · 1fc2fe20
      Mika Westerberg authored
      It is possible that after entering runtime PM suspend the controller
      context is lost due the fact that its power is removed. This happens for
      example on Asus T100, an Intel Baytrail based tablet/laptop.
      
      In order to get the controller back to functional state, we need to
      implement runtime PM hooks which will re-initialize the hardware during
      runtime PM resume. We can re-use the existing system suspend hooks as the
      steps to resume/suspend the controller are the same.
      Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      1fc2fe20
    • Mika Westerberg's avatar
      i2c: designware: Disable device on system suspend · f537295a
      Mika Westerberg authored
      Userspace can initiate system suspend on arbitrary times which means that
      device drivers must make sure that their device gets quiesced before system
      suspend is entered. Therefore disable the I2C host controller in the driver
      system suspend hook.
      Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      f537295a
    • Wolfram Sang's avatar
      i2c: nuc900: remove driver · 7da62cb1
      Wolfram Sang authored
      Arnd said in another patch:
      
      "As far as I can tell, this driver must have produced this
      error for as long as it has been merged into the mainline kernel, but
      it was never part of the normal build tests:
      
      drivers/i2c/busses/i2c-nuc900.c: In function 'nuc900_i2c_probe':
      drivers/i2c/busses/i2c-nuc900.c:601:17: error: request for member
      'apbfreq' in something not a structure or union
        ret = (i2c->clk.apbfreq)/(pdata->bus_freq * 5) - 1;
                       ^
      This is an attempt to get the driver to build and possibly
      work correctly, although I do wonder whether we should just
      remove it, as it has clearly never worked."
      
      I agree with removing it since nobody showed interest in Arnd's fixup
      patch.
      Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      Cc: Wan ZongShun <mcuos.com@gmail.org>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      7da62cb1
    • Fugang Duan's avatar
      i2c: imx: update i2c clock divider for each transaction · 9b2a6da3
      Fugang Duan authored
      Since IMX serial SOCs support low bus freq mode, some clocks freq
      may change to save power. I2C needs to check the clock source and
      update the divider.
      
      For example:
      i.MX6SL I2C clk is from IPG_PERCLK which is sourced from IPG_CLK.
      Under normal operation, IPG_CLK is 66MHz, ipg_perclk is at 22MHz.
      In low bus freq mode, IPG_CLK is at 12MHz and IPG_PERCLK is down
      to 4MHz. So the I2C driver must update the divider register for
      each transaction when the current IPG_PERCLK is not equal to the
      clock of previous transaction.
      Signed-off-by: default avatarFugang Duan  <B38611@freescale.com>
      [wsa: removed an outdated comment and simplified debug output]
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      9b2a6da3
    • Fugang Duan's avatar
      i2c: imx: fix the i2c bus hang issue when do repeat restart · 054b62d9
      Fugang Duan authored
      Test i2c device Maxim max44009, datasheet is located at:
      http://www.maximintegrated.com/datasheet/index.mvp/id/7175
      
      The max44009 support repeat operation like:
      read -> repeat restart -> read/write
      
      The current i2c imx host controller driver don't support this
      operation that causes i2c bus hang due to "MTX" is cleared in
      .i2c_imx_read(). If "read" is the last message there have no problem,
      so the current driver supports all SMbus operation like:
      write -> repeat restart -> read/write
      
      IMX i2c controller for master receiver has some limitation:
      - If it is the last byte for one operation, it must generate STOP
        signal before read I2DR to prevent controller from generating another
        clock cycle.
      - If it is the last byte in the read, and then do repeat restart, it must
        set "MTX" before read I2DR to prevent controller from generating another
        extra clock cycle.
      
      The patch is to fix the issue.
      Signed-off-by: default avatarFugang Duan <B38611@freescale.com>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      054b62d9
  2. 01 Jun, 2014 13 commits
  3. 22 May, 2014 19 commits
  4. 21 May, 2014 3 commits