blob: 1155d82ba27bf2cdc6fead908d8d115258470f64 [file] [log] [blame]
David Collins8839df22012-10-15 12:04:18 -07001/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
Michael Bohan9b7ac512012-02-24 14:42:44 -08002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef __STUB_REGULATOR_H__
14#define __STUB_REGULATOR_H__
15
16#include <linux/regulator/machine.h>
17
18#define STUB_REGULATOR_DRIVER_NAME "stub-regulator"
19
20/**
21 * struct stub_regulator_pdata - stub regulator device data
22 * @init_data: regulator constraints
23 * @hpm_min_load: minimum load in uA that will result in the regulator
24 * being set to high power mode
25 * @system_uA: current drawn from regulator not accounted for by any
26 * regulator framework consumer
27 */
28struct stub_regulator_pdata {
29 struct regulator_init_data init_data;
30 int hpm_min_load;
31 int system_uA;
32};
Michael Bohan83b00652012-03-30 14:19:38 -070033
David Collins8839df22012-10-15 12:04:18 -070034#ifdef CONFIG_REGULATOR_STUB
35
36/**
37 * regulator_stub_init() - register platform driver for stub-regulator
38 *
39 * This initialization function should be called in systems in which driver
40 * registration ordering must be controlled precisely.
41 */
42
Michael Bohan83b00652012-03-30 14:19:38 -070043int __init regulator_stub_init(void);
David Collins8839df22012-10-15 12:04:18 -070044
45#else
46
47static inline int __init regulator_stub_init(void)
48{
49 return -ENODEV;
50}
51
52#endif /* CONFIG_REGULATOR_STUB */
53
Michael Bohan9b7ac512012-02-24 14:42:44 -080054#endif