linux/drivers/mfd/syscon.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * System Control Driver
 *
 * Copyright (C) 2012 Freescale Semiconductor, Inc.
 * Copyright (C) 2012 Linaro Ltd.
 *
 * Author: Dong Aisheng <[email protected]>
 */

#include <linux/clk.h>
#include <linux/err.h>
#include <linux/hwspinlock.h>
#include <linux/io.h>
#include <linux/init.h>
#include <linux/list.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/platform_data/syscon.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/reset.h>
#include <linux/mfd/syscon.h>
#include <linux/slab.h>

static struct platform_driver syscon_driver;

static DEFINE_SPINLOCK(syscon_list_slock);
static LIST_HEAD(syscon_list);

struct syscon {};

static const struct regmap_config syscon_regmap_config =;

static struct syscon *of_syscon_register(struct device_node *np, bool check_res)
{}

static struct regmap *device_node_get_regmap(struct device_node *np,
					     bool check_res)
{}

/**
 * of_syscon_register_regmap() - Register regmap for specified device node
 * @np: Device tree node
 * @regmap: Pointer to regmap object
 *
 * Register an externally created regmap object with syscon for the specified
 * device tree node. This regmap will then be returned to client drivers using
 * the syscon_regmap_lookup_by_phandle() API.
 *
 * Return: 0 on success, negative error code on failure.
 */
int of_syscon_register_regmap(struct device_node *np, struct regmap *regmap)
{}
EXPORT_SYMBOL_GPL();

struct regmap *device_node_to_regmap(struct device_node *np)
{}
EXPORT_SYMBOL_GPL();

struct regmap *syscon_node_to_regmap(struct device_node *np)
{}
EXPORT_SYMBOL_GPL();

struct regmap *syscon_regmap_lookup_by_compatible(const char *s)
{}
EXPORT_SYMBOL_GPL();

struct regmap *syscon_regmap_lookup_by_phandle(struct device_node *np,
					const char *property)
{}
EXPORT_SYMBOL_GPL();

struct regmap *syscon_regmap_lookup_by_phandle_args(struct device_node *np,
					const char *property,
					int arg_count,
					unsigned int *out_args)
{}
EXPORT_SYMBOL_GPL();

/*
 * It behaves the same as syscon_regmap_lookup_by_phandle() except where
 * there is no regmap phandle. In this case, instead of returning -ENODEV,
 * the function returns NULL.
 */
struct regmap *syscon_regmap_lookup_by_phandle_optional(struct device_node *np,
					const char *property)
{}
EXPORT_SYMBOL_GPL();

static int syscon_probe(struct platform_device *pdev)
{}

static const struct platform_device_id syscon_ids[] =;

static struct platform_driver syscon_driver =;

static int __init syscon_init(void)
{}
postcore_initcall(syscon_init);