1. 03 6月, 2014 4 次提交
    • M
      i2c: designware: Disable device on system suspend · f537295a
      Mika Westerberg 提交于
      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: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      f537295a
    • W
      i2c: nuc900: remove driver · 7da62cb1
      Wolfram Sang 提交于
      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: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      Cc: Wan ZongShun <mcuos.com@gmail.org>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      7da62cb1
    • F
      i2c: imx: update i2c clock divider for each transaction · 9b2a6da3
      Fugang Duan 提交于
      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: NFugang Duan  <B38611@freescale.com>
      [wsa: removed an outdated comment and simplified debug output]
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      9b2a6da3
    • F
      i2c: imx: fix the i2c bus hang issue when do repeat restart · 054b62d9
      Fugang Duan 提交于
      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: NFugang Duan <B38611@freescale.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      054b62d9
  2. 02 6月, 2014 13 次提交
  3. 22 5月, 2014 16 次提交
  4. 20 5月, 2014 2 次提交
  5. 18 5月, 2014 1 次提交
    • M
      target: fix memory leak on XCOPY · 1e1110c4
      Mikulas Patocka 提交于
      On each processed XCOPY command, two "kmalloc-512" memory objects are
      leaked. These represent two allocations of struct xcopy_pt_cmd in
      target_core_xcopy.c.
      
      The reason for the memory leak is that the cmd_kref field is not
      initialized (thus, it is zero because the allocations were done with
      kzalloc). When we decrement zero kref in target_put_sess_cmd, the result
      is not zero, thus target_release_cmd_kref is not called.
      
      This patch fixes the bug by moving kref initialization from
      target_get_sess_cmd to transport_init_se_cmd (this function is called from
      target_core_xcopy.c, so it will correctly initialize cmd_kref). It can be
      easily verified that all code that calls target_get_sess_cmd also calls
      transport_init_se_cmd earlier, thus moving kref_init shouldn't introduce
      any new problems.
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Cc: stable@vger.kernel.org	# 3.12+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      1e1110c4
  6. 17 5月, 2014 4 次提交