#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/reset-controller.h>
#include <linux/delay.h>
#include <linux/mfd/syscon.h>
#include <linux/regmap.h>
#include <soc/canaan/k210-sysctl.h>
#include <dt-bindings/reset/k210-rst.h>
#define K210_RST_MASK …
struct k210_rst { … };
static inline struct k210_rst *
to_k210_rst(struct reset_controller_dev *rcdev)
{ … }
static inline int k210_rst_assert(struct reset_controller_dev *rcdev,
unsigned long id)
{ … }
static inline int k210_rst_deassert(struct reset_controller_dev *rcdev,
unsigned long id)
{ … }
static int k210_rst_reset(struct reset_controller_dev *rcdev,
unsigned long id)
{ … }
static int k210_rst_status(struct reset_controller_dev *rcdev,
unsigned long id)
{ … }
static int k210_rst_xlate(struct reset_controller_dev *rcdev,
const struct of_phandle_args *reset_spec)
{ … }
static const struct reset_control_ops k210_rst_ops = …;
static int k210_rst_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id k210_rst_dt_ids[] = …;
static struct platform_driver k210_rst_driver = …;
builtin_platform_driver(…) …;