linux/drivers/reset
Hans de Goede 0b52297f22 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>
2016-03-30 15:42:05 +02:00
..
hisilicon reset: hi6220: Make reset_control_ops const 2016-02-10 10:53:35 +01:00
sti reset: sti: Make reset_control_ops const 2016-02-10 10:53:38 +01:00
core.c reset: Add support for shared reset controls 2016-03-30 15:42:05 +02:00
Kconfig reset: hi6220: Reset driver for hisilicon hi6220 SoC 2015-11-20 15:41:45 +01:00
Makefile reset: img: Add Pistachio reset controller driver 2016-02-05 16:41:20 +01:00
reset-ath79.c reset: ath79: Make reset_control_ops const 2016-02-10 10:53:34 +01:00
reset-berlin.c reset: berlin: Make reset_control_ops const 2016-02-08 16:11:25 +01:00
reset-lpc18xx.c reset: lpc18xx: Make reset_control_ops const 2016-02-08 17:19:57 +01:00
reset-pistachio.c reset: img: Make reset_control_ops const 2016-02-08 17:03:40 +01:00
reset-socfpga.c reset: socfpga: Make reset_control_ops const 2016-02-10 10:53:36 +01:00
reset-sunxi.c reset: sunxi: Make reset_control_ops const 2016-02-08 17:03:48 +01:00
reset-zynq.c reset: zynq: Make reset_control_ops const 2016-02-10 10:53:37 +01:00