Merge branches 'acpica-fixes', 'acpi-pci-fixes' and 'acpi-debug-fixes'
[deliverable/linux.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 18#include <linux/err.h>
adae28c5 19#include <linux/errno.h>
3d237990 20
5fb1c2dd
SN
21struct device_node;
22
df73de9b 23#ifdef CONFIG_MFD_SYSCON
87d68730
DA
24extern struct regmap *syscon_node_to_regmap(struct device_node *np);
25extern struct regmap *syscon_regmap_lookup_by_compatible(const char *s);
5ab3a89a 26extern struct regmap *syscon_regmap_lookup_by_pdevname(const char *s);
87d68730
DA
27extern struct regmap *syscon_regmap_lookup_by_phandle(
28 struct device_node *np,
29 const char *property);
df73de9b
PC
30#else
31static inline struct regmap *syscon_node_to_regmap(struct device_node *np)
32{
8c037e0c 33 return ERR_PTR(-ENOTSUPP);
df73de9b
PC
34}
35
36static inline struct regmap *syscon_regmap_lookup_by_compatible(const char *s)
37{
8c037e0c 38 return ERR_PTR(-ENOTSUPP);
df73de9b
PC
39}
40
41static inline struct regmap *syscon_regmap_lookup_by_pdevname(const char *s)
42{
8c037e0c 43 return ERR_PTR(-ENOTSUPP);
df73de9b
PC
44}
45
46static inline struct regmap *syscon_regmap_lookup_by_phandle(
47 struct device_node *np,
48 const char *property)
49{
8c037e0c 50 return ERR_PTR(-ENOTSUPP);
df73de9b
PC
51}
52#endif
53
87d68730 54#endif /* __LINUX_MFD_SYSCON_H__ */
This page took 0.301547 seconds and 5 git commands to generate.