hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/linux/mfd/syscon.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * System Control Driver
34 *
....@@ -5,11 +6,6 @@
56 * Copyright (C) 2012 Linaro Ltd.
67 *
78 * Author: Dong Aisheng <dong.aisheng@linaro.org>
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation; either version 2 of the License, or
12
- * (at your option) any later version.
139 */
1410
1511 #ifndef __LINUX_MFD_SYSCON_H__
....@@ -21,13 +17,23 @@
2117 struct device_node;
2218
2319 #ifdef CONFIG_MFD_SYSCON
20
+extern struct regmap *device_node_to_regmap(struct device_node *np);
2421 extern struct regmap *syscon_node_to_regmap(struct device_node *np);
2522 extern struct regmap *syscon_regmap_lookup_by_compatible(const char *s);
26
-extern struct regmap *syscon_regmap_lookup_by_pdevname(const char *s);
2723 extern struct regmap *syscon_regmap_lookup_by_phandle(
2824 struct device_node *np,
2925 const char *property);
26
+extern struct regmap *syscon_regmap_lookup_by_phandle_args(
27
+ struct device_node *np,
28
+ const char *property,
29
+ int arg_count,
30
+ unsigned int *out_args);
3031 #else
32
+static inline struct regmap *device_node_to_regmap(struct device_node *np)
33
+{
34
+ return ERR_PTR(-ENOTSUPP);
35
+}
36
+
3137 static inline struct regmap *syscon_node_to_regmap(struct device_node *np)
3238 {
3339 return ERR_PTR(-ENOTSUPP);
....@@ -38,14 +44,18 @@
3844 return ERR_PTR(-ENOTSUPP);
3945 }
4046
41
-static inline struct regmap *syscon_regmap_lookup_by_pdevname(const char *s)
47
+static inline struct regmap *syscon_regmap_lookup_by_phandle(
48
+ struct device_node *np,
49
+ const char *property)
4250 {
4351 return ERR_PTR(-ENOTSUPP);
4452 }
4553
46
-static inline struct regmap *syscon_regmap_lookup_by_phandle(
54
+static inline struct regmap *syscon_regmap_lookup_by_phandle_args(
4755 struct device_node *np,
48
- const char *property)
56
+ const char *property,
57
+ int arg_count,
58
+ unsigned int *out_args)
4959 {
5060 return ERR_PTR(-ENOTSUPP);
5161 }