mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-30 00:21:06 +00:00
83d290c56f
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
81 lines
2.4 KiB
C
81 lines
2.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (c) 2016, NVIDIA CORPORATION.
|
|
*/
|
|
|
|
#ifndef _RESET_UCLASS_H
|
|
#define _RESET_UCLASS_H
|
|
|
|
/* See reset.h for background documentation. */
|
|
|
|
#include <reset.h>
|
|
|
|
struct ofnode_phandle_args;
|
|
struct udevice;
|
|
|
|
/**
|
|
* struct reset_ops - The functions that a reset controller driver must
|
|
* implement.
|
|
*/
|
|
struct reset_ops {
|
|
/**
|
|
* of_xlate - Translate a client's device-tree (OF) reset specifier.
|
|
*
|
|
* The reset core calls this function as the first step in implementing
|
|
* a client's reset_get_by_*() call.
|
|
*
|
|
* If this function pointer is set to NULL, the reset core will use a
|
|
* default implementation, which assumes #reset-cells = <1>, and that
|
|
* the DT cell contains a simple integer reset signal ID.
|
|
*
|
|
* At present, the reset API solely supports device-tree. If this
|
|
* changes, other xxx_xlate() functions may be added to support those
|
|
* other mechanisms.
|
|
*
|
|
* @reset_ctl: The reset control struct to hold the translation result.
|
|
* @args: The reset specifier values from device tree.
|
|
* @return 0 if OK, or a negative error code.
|
|
*/
|
|
int (*of_xlate)(struct reset_ctl *reset_ctl,
|
|
struct ofnode_phandle_args *args);
|
|
/**
|
|
* request - Request a translated reset control.
|
|
*
|
|
* The reset core calls this function as the second step in
|
|
* implementing a client's reset_get_by_*() call, following a
|
|
* successful xxx_xlate() call.
|
|
*
|
|
* @reset_ctl: The reset control struct to request; this has been
|
|
* filled in by a previoux xxx_xlate() function call.
|
|
* @return 0 if OK, or a negative error code.
|
|
*/
|
|
int (*request)(struct reset_ctl *reset_ctl);
|
|
/**
|
|
* free - Free a previously requested reset control.
|
|
*
|
|
* This is the implementation of the client reset_free() API.
|
|
*
|
|
* @reset_ctl: The reset control to free.
|
|
* @return 0 if OK, or a negative error code.
|
|
*/
|
|
int (*free)(struct reset_ctl *reset_ctl);
|
|
/**
|
|
* rst_assert - Assert a reset signal.
|
|
*
|
|
* Note: This function is named rst_assert not assert to avoid
|
|
* conflicting with global macro assert().
|
|
*
|
|
* @reset_ctl: The reset signal to assert.
|
|
* @return 0 if OK, or a negative error code.
|
|
*/
|
|
int (*rst_assert)(struct reset_ctl *reset_ctl);
|
|
/**
|
|
* rst_deassert - Deassert a reset signal.
|
|
*
|
|
* @reset_ctl: The reset signal to deassert.
|
|
* @return 0 if OK, or a negative error code.
|
|
*/
|
|
int (*rst_deassert)(struct reset_ctl *reset_ctl);
|
|
};
|
|
|
|
#endif
|