1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * System Control Driver
5 * Copyright (C) 2012 Freescale Semiconductor, Inc.
6 * Copyright (C) 2012 Linaro Ltd.
11 #ifndef __LINUX_MFD_SYSCON_H__
12 #define __LINUX_MFD_SYSCON_H__
14 #include <linux/err.h>
15 #include <linux/errno.h>
19 #ifdef CONFIG_MFD_SYSCON
20 extern struct regmap *device_node_to_regmap(struct device_node *np);
21 extern struct regmap *syscon_node_to_regmap(struct device_node *np);
22 extern struct regmap *syscon_regmap_lookup_by_compatible(const char *s);
23 extern struct regmap *syscon_regmap_lookup_by_phandle(
24 struct device_node *np,
25 const char *property);
26 extern struct regmap *syscon_regmap_lookup_by_phandle_args(
27 struct device_node *np,
30 unsigned int *out_args);
32 static inline struct regmap *device_node_to_regmap(struct device_node *np)
34 return ERR_PTR(-ENOTSUPP);
37 static inline struct regmap *syscon_node_to_regmap(struct device_node *np)
39 return ERR_PTR(-ENOTSUPP);
42 static inline struct regmap *syscon_regmap_lookup_by_compatible(const char *s)
44 return ERR_PTR(-ENOTSUPP);
47 static inline struct regmap *syscon_regmap_lookup_by_phandle(
48 struct device_node *np,
51 return ERR_PTR(-ENOTSUPP);
54 static inline struct regmap *syscon_regmap_lookup_by_phandle_args(
55 struct device_node *np,
58 unsigned int *out_args)
60 return ERR_PTR(-ENOTSUPP);
64 #endif /* __LINUX_MFD_SYSCON_H__ */