Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
fixed.h
Go to the documentation of this file.
1 /*
2  * fixed.h
3  *
4  * Copyright 2008 Wolfson Microelectronics PLC.
5  *
6  * Author: Mark Brown <[email protected]>
7  *
8  * Copyright (c) 2009 Nokia Corporation
9  * Roger Quadros <[email protected]>
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License as
13  * published by the Free Software Foundation; either version 2 of the
14  * License, or (at your option) any later version.
15  */
16 
17 #ifndef __REGULATOR_FIXED_H
18 #define __REGULATOR_FIXED_H
19 
20 struct regulator_init_data;
21 
49  const char *supply_name;
50  const char *input_supply;
52  int gpio;
53  unsigned startup_delay;
54  unsigned gpio_is_open_drain:1;
55  unsigned enable_high:1;
56  unsigned enabled_at_boot:1;
58 };
59 
61 
62 #if IS_ENABLED(CONFIG_REGULATOR)
63 struct platform_device *regulator_register_always_on(int id, const char *name,
64  struct regulator_consumer_supply *supplies, int num_supplies, int uv);
65 #else
66 static inline struct platform_device *regulator_register_always_on(int id, const char *name,
67  struct regulator_consumer_supply *supplies, int num_supplies, int uv)
68 {
69  return NULL;
70 }
71 #endif
72 
73 #define regulator_register_fixed(id, s, ns) regulator_register_always_on(id, \
74  "fixed-dummy", s, ns, 0)
75 
76 #endif