diff options
author | Hans de Goede <hdegoede@redhat.com> | 2016-02-23 20:46:26 +0300 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2016-03-30 16:42:05 +0300 |
commit | 0b52297f2288ca239e598afe6c92db83d8d2bfcd (patch) | |
tree | af0f180666543d4a45bf4c68270edbc3c606a5d9 /sound/soc/codecs | |
parent | c15ddec2ca06076a11195313aa1fce47d2a28c5d (diff) | |
download | linux-0b52297f2288ca239e598afe6c92db83d8d2bfcd.tar.xz |
reset: Add support for shared reset controls
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: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'sound/soc/codecs')
0 files changed, 0 insertions, 0 deletions