1. 25 10月, 2016 9 次提交
  2. 29 9月, 2016 1 次提交
  3. 24 9月, 2016 4 次提交
  4. 23 9月, 2016 3 次提交
  5. 22 9月, 2016 4 次提交
  6. 17 9月, 2016 1 次提交
  7. 16 9月, 2016 2 次提交
  8. 09 9月, 2016 13 次提交
  9. 31 8月, 2016 3 次提交
    • J
      i2c: tegra: Add pinctrl support · 718917b9
      Jon Hunter 提交于
      On Tegra124/132 the pins for I2C6 are shared with the Display Port AUX
      (DPAUX) channel and on Tegra210 the pins for I2C4 and I2C6 are shared
      with DPAUX1 and DPAUX0, respectively. The multiplexing of the pins is
      handled by a register in the DPAUX and so the Tegra DPAUX driver has
      been updated to register a pinctrl device for managing these pins.
      
      The pins for these particular I2C devices are bound to the I2C device
      prior to probing. However, these I2C devices are in a different power
      partition to the DPAUX devices that own the pins. Hence, it is desirable
      to place the pins in the 'idle' state and allow the DPAUX power
      partition to switch off, when these I2C devices is not in use.
      Therefore, add calls to place the I2C pins in the 'default' and 'idle'
      states when the I2C device is runtime resumed and suspended,
      respectively.
      
      Please note that the pinctrl functions that set the state of the pins
      check to see if the devices has pins associated and will return zero
      if they do not. Therefore, it is safe to call these pinctrl functions
      even for I2C devices that do not have any pins associated.
      Signed-off-by: NJon Hunter <jonathanh@nvidia.com>
      Acked-by: NLaxman Dewangan <ldewangan@nvidia.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      718917b9
    • J
      i2c: tegra: Add runtime power-management support · 1f50ad2c
      Jon Hunter 提交于
      Update the Tegra I2C driver to use runtime PM and move the code in the
      tegra_i2c_clock_enable/disable() functions to the PM runtime resume and
      suspend callbacks, respectively.
      
      Note that given that CONFIG_PM is not mandatory for Tegra, if CONFIG_PM
      is not enabled and so runtime PM is not enabled, ensure that the I2C
      clocks are turned on during probe and kept on by calling the resume
      callback directly.
      
      In the function tegra_i2c_init(), the variable 'err' does not need to be
      initialised to zero in tegra_i2c_init() because it is initialised when
      pm_runtime_get_sync() is called. Furthermore, to ensure we only return 0
      from tegra_i2c_init(), it is necessary to re-initialise 'err' to 0 after
      a successful call to pm_runtime_get_sync() because it can return a
      positive value on success. However, alternatively re-initialise 'err' by
      using the return value of the function tegra_i2c_flush_fifos() because
      it can only be 0 or -ETIMEDOUT.
      Signed-off-by: NJon Hunter <jonathanh@nvidia.com>
      Acked-by: NLaxman Dewangan <ldewangan@nvidia.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      1f50ad2c
    • J
      i2c: tegra: Simplify I2C resume · f4c2d89b
      Jon Hunter 提交于
      The I2C adapter is unlocked regardless of whether the tegra_i2c_init()
      called during the resume is successful or not. However, if the
      tegra_i2c_init() is not successful, then ->is_suspended is not set to
      false. Simplify the resume code by only setting ->is_suspended to false
      if tegra_i2c_init() is successful and return the error code from
      tegra_i2c_init().
      Signed-off-by: NJon Hunter <jonathanh@nvidia.com>
      Acked-by: NLaxman Dewangan <ldewangan@nvidia.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      f4c2d89b