reset: add reset_request()
This is needed in error path to assert previously deasserted reset by using a saved reset_ctl reference. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
f56db163ad
commit
9bd5cdf6b6
@ -97,6 +97,15 @@ int reset_get_by_name(struct udevice *dev, const char *name,
|
||||
return reset_get_by_index(dev, index, reset_ctl);
|
||||
}
|
||||
|
||||
int reset_request(struct reset_ctl *reset_ctl)
|
||||
{
|
||||
struct reset_ops *ops = reset_dev_ops(reset_ctl->dev);
|
||||
|
||||
debug("%s(reset_ctl=%p)\n", __func__, reset_ctl);
|
||||
|
||||
return ops->request(reset_ctl);
|
||||
}
|
||||
|
||||
int reset_free(struct reset_ctl *reset_ctl)
|
||||
{
|
||||
struct reset_ops *ops = reset_dev_ops(reset_ctl->dev);
|
||||
|
@ -99,6 +99,15 @@ int reset_get_by_index(struct udevice *dev, int index,
|
||||
int reset_get_by_name(struct udevice *dev, const char *name,
|
||||
struct reset_ctl *reset_ctl);
|
||||
|
||||
/**
|
||||
* reset_request - Request a reset signal.
|
||||
*
|
||||
* @reset_ctl: A reset control struct.
|
||||
*
|
||||
* @return 0 if OK, or a negative error code.
|
||||
*/
|
||||
int reset_request(struct reset_ctl *reset_ctl);
|
||||
|
||||
/**
|
||||
* reset_free - Free a previously requested reset signal.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user