]>
Commit | Line | Data |
---|---|---|
2874c5fd | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
87d68730 DA |
2 | /* |
3 | * System Control Driver | |
4 | * | |
5 | * Copyright (C) 2012 Freescale Semiconductor, Inc. | |
6 | * Copyright (C) 2012 Linaro Ltd. | |
7 | * | |
8 | * Author: Dong Aisheng <dong.aisheng@linaro.org> | |
87d68730 DA |
9 | */ |
10 | ||
11 | #ifndef __LINUX_MFD_SYSCON_H__ | |
12 | #define __LINUX_MFD_SYSCON_H__ | |
13 | ||
3d237990 | 14 | #include <linux/err.h> |
adae28c5 | 15 | #include <linux/errno.h> |
3d237990 | 16 | |
5fb1c2dd SN |
17 | struct device_node; |
18 | ||
df73de9b | 19 | #ifdef CONFIG_MFD_SYSCON |
87d68730 DA |
20 | extern struct regmap *syscon_node_to_regmap(struct device_node *np); |
21 | extern struct regmap *syscon_regmap_lookup_by_compatible(const char *s); | |
5ab3a89a | 22 | extern struct regmap *syscon_regmap_lookup_by_pdevname(const char *s); |
87d68730 DA |
23 | extern struct regmap *syscon_regmap_lookup_by_phandle( |
24 | struct device_node *np, | |
25 | const char *property); | |
df73de9b PC |
26 | #else |
27 | static inline struct regmap *syscon_node_to_regmap(struct device_node *np) | |
28 | { | |
8c037e0c | 29 | return ERR_PTR(-ENOTSUPP); |
df73de9b PC |
30 | } |
31 | ||
32 | static inline struct regmap *syscon_regmap_lookup_by_compatible(const char *s) | |
33 | { | |
8c037e0c | 34 | return ERR_PTR(-ENOTSUPP); |
df73de9b PC |
35 | } |
36 | ||
37 | static inline struct regmap *syscon_regmap_lookup_by_pdevname(const char *s) | |
38 | { | |
8c037e0c | 39 | return ERR_PTR(-ENOTSUPP); |
df73de9b PC |
40 | } |
41 | ||
42 | static inline struct regmap *syscon_regmap_lookup_by_phandle( | |
43 | struct device_node *np, | |
44 | const char *property) | |
45 | { | |
8c037e0c | 46 | return ERR_PTR(-ENOTSUPP); |
df73de9b PC |
47 | } |
48 | #endif | |
49 | ||
87d68730 | 50 | #endif /* __LINUX_MFD_SYSCON_H__ */ |