Merge branches 'amba', 'fixes', 'misc' and 'tauros2' into for-next
[linux-2.6-block.git] / include / linux / mfd / syscon.h
CommitLineData
87d68730
DA
1/*
2 * System Control Driver
3 *
4 * Copyright (C) 2012 Freescale Semiconductor, Inc.
5 * Copyright (C) 2012 Linaro Ltd.
6 *
7 * 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.
13 */
14
15#ifndef __LINUX_MFD_SYSCON_H__
16#define __LINUX_MFD_SYSCON_H__
17
3d237990
TB
18#include <linux/err.h>
19
5fb1c2dd
SN
20struct device_node;
21
df73de9b 22#ifdef CONFIG_MFD_SYSCON
87d68730
DA
23extern struct regmap *syscon_node_to_regmap(struct device_node *np);
24extern struct regmap *syscon_regmap_lookup_by_compatible(const char *s);
5ab3a89a 25extern struct regmap *syscon_regmap_lookup_by_pdevname(const char *s);
87d68730
DA
26extern struct regmap *syscon_regmap_lookup_by_phandle(
27 struct device_node *np,
28 const char *property);
df73de9b
PC
29#else
30static inline struct regmap *syscon_node_to_regmap(struct device_node *np)
31{
32 return ERR_PTR(-ENOSYS);
33}
34
35static inline struct regmap *syscon_regmap_lookup_by_compatible(const char *s)
36{
37 return ERR_PTR(-ENOSYS);
38}
39
40static inline struct regmap *syscon_regmap_lookup_by_pdevname(const char *s)
41{
42 return ERR_PTR(-ENOSYS);
43}
44
45static inline struct regmap *syscon_regmap_lookup_by_phandle(
46 struct device_node *np,
47 const char *property)
48{
49 return ERR_PTR(-ENOSYS);
50}
51#endif
52
87d68730 53#endif /* __LINUX_MFD_SYSCON_H__ */