1. 14 11月, 2016 1 次提交
    • M
      reset: allow using reset_control_reset with shared reset · 7da33a37
      Martin Blumenstingl 提交于
      Some SoCs (for example Amlogic GXBB) implement a reset controller which
      only supports a reset pulse (triggered via reset_control_reset). At the
      same time multiple devices (in case of the Amlogic GXBB SoC both USB
      PHYs) are sharing the same reset line.
      
      This patch allows using reset_control_reset also for shared resets.
      There are limitations though:
      reset_control_reset can only be used if reset_control_assert was not
      used yet.
      reset_control_assert can only be used if reset_control_reset was not
      used yet.
      For shared resets the reset is only triggered once for the lifetime of
      the reset_control instance (the reset can be triggered again if all
      consumers of that specific reset_control are gone, as the reset
      framework will free the reset_control instance in that case).
      Signed-off-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com>
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      7da33a37
  2. 24 8月, 2016 1 次提交
  3. 30 5月, 2016 1 次提交
  4. 30 3月, 2016 3 次提交
    • H
      reset: Add support for shared reset controls · 0b52297f
      Hans de Goede 提交于
      In some SoCs some hw-blocks share a reset control. Add support for this
      setup by adding new:
      
      reset_control_get_shared()
      devm_reset_control_get_shared()
      devm_reset_control_get_shared_by_index()
      
      methods to get a reset_control. Note that this patch omits adding of_
      variants, if these are needed later they can be easily added.
      
      This patch also changes the behavior of the existing exclusive
      reset_control_get() variants, if these are now called more then once
      for the same reset_control they will return -EBUSY. To catch existing
      drivers triggering this error (there should not be any) a WARN_ON(1)
      is added in this path.
      
      When a reset_control is shared, the behavior of reset_control_assert /
      deassert is changed, for shared reset_controls these will work like the
      clock-enable/disable and regulator-on/off functions. They will keep a
      deassert_count, and only (re-)assert the reset after reset_control_assert
      has been called as many times as reset_control_deassert was called.
      
      Calling reset_control_assert without first calling reset_control_deassert
      is not allowed on a shared reset control. Calling reset_control_reset is
      also not allowed on a shared reset control.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      0b52297f
    • H
      reset: Share struct reset_control between reset_control_get calls · c15ddec2
      Hans de Goede 提交于
      Now that struct reset_control no longer stores the device pointer for
      the device calling reset_control_get we can share a single struct
      reset_control when multiple calls to reset_control_get are made for
      the same reset line (same id / index).
      
      This is a preparation patch for adding support for shared reset lines.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      c15ddec2
    • H
      reset: Make [of_]reset_control_get[_foo] functions wrappers · 6c96f05c
      Hans de Goede 提交于
      With both the regular, _by_index and _optional variants we already have
      quite a few variants of [of_]reset_control_get[_foo], the upcoming
      addition of shared reset lines support makes this worse.
      
      This commit changes all the variants into wrappers around common core
      functions. For completeness sake this commit also adds a new
      devm_get_reset_control_by_index wrapper.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      6c96f05c
  5. 25 1月, 2016 2 次提交
  6. 18 11月, 2015 1 次提交
  7. 16 11月, 2015 3 次提交
  8. 20 10月, 2014 1 次提交
  9. 03 2月, 2014 3 次提交
  10. 12 4月, 2013 2 次提交