Blame view

include/linux/mfd/syscon.h 1.41 KB
87d687301   Dong Aisheng   mfd: Add syscon d...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  /*
   * System Control Driver
   *
   * Copyright (C) 2012 Freescale Semiconductor, Inc.
   * Copyright (C) 2012 Linaro Ltd.
   *
   * Author: Dong Aisheng <dong.aisheng@linaro.org>
   *
   * This program is free software; you can redistribute it and/or modify
   * it under the terms of the GNU General Public License as published by
   * the Free Software Foundation; either version 2 of the License, or
   * (at your option) any later version.
   */
  
  #ifndef __LINUX_MFD_SYSCON_H__
  #define __LINUX_MFD_SYSCON_H__
3d2379909   Tushar Behera   mfd: syscon: Incl...
17
  #include <linux/err.h>
adae28c59   Arnd Bergmann   mfd: syscon: Incl...
18
  #include <linux/errno.h>
3d2379909   Tushar Behera   mfd: syscon: Incl...
19

5fb1c2dd8   Sylwester Nawrocki   mfd: syscon: Add ...
20
  struct device_node;
df73de9b0   Peter Chen   mfd: syscon: Retu...
21
  #ifdef CONFIG_MFD_SYSCON
87d687301   Dong Aisheng   mfd: Add syscon d...
22
23
  extern struct regmap *syscon_node_to_regmap(struct device_node *np);
  extern struct regmap *syscon_regmap_lookup_by_compatible(const char *s);
5ab3a89a7   Alexander Shiyan   mfd: syscon: Add ...
24
  extern struct regmap *syscon_regmap_lookup_by_pdevname(const char *s);
87d687301   Dong Aisheng   mfd: Add syscon d...
25
26
27
  extern struct regmap *syscon_regmap_lookup_by_phandle(
  					struct device_node *np,
  					const char *property);
df73de9b0   Peter Chen   mfd: syscon: Retu...
28
29
30
  #else
  static inline struct regmap *syscon_node_to_regmap(struct device_node *np)
  {
8c037e0c8   Philipp Zabel   mfd: syscon: Retu...
31
  	return ERR_PTR(-ENOTSUPP);
df73de9b0   Peter Chen   mfd: syscon: Retu...
32
33
34
35
  }
  
  static inline struct regmap *syscon_regmap_lookup_by_compatible(const char *s)
  {
8c037e0c8   Philipp Zabel   mfd: syscon: Retu...
36
  	return ERR_PTR(-ENOTSUPP);
df73de9b0   Peter Chen   mfd: syscon: Retu...
37
38
39
40
  }
  
  static inline struct regmap *syscon_regmap_lookup_by_pdevname(const char *s)
  {
8c037e0c8   Philipp Zabel   mfd: syscon: Retu...
41
  	return ERR_PTR(-ENOTSUPP);
df73de9b0   Peter Chen   mfd: syscon: Retu...
42
43
44
45
46
47
  }
  
  static inline struct regmap *syscon_regmap_lookup_by_phandle(
  					struct device_node *np,
  					const char *property)
  {
8c037e0c8   Philipp Zabel   mfd: syscon: Retu...
48
  	return ERR_PTR(-ENOTSUPP);
df73de9b0   Peter Chen   mfd: syscon: Retu...
49
50
  }
  #endif
87d687301   Dong Aisheng   mfd: Add syscon d...
51
  #endif /* __LINUX_MFD_SYSCON_H__ */