aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regulator
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/regulator')
-rw-r--r--include/linux/regulator/ab8500.h14
-rw-r--r--include/linux/regulator/act8865.h23
-rw-r--r--include/linux/regulator/consumer.h26
-rw-r--r--include/linux/regulator/da9211.h32
4 files changed, 80 insertions, 15 deletions
diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h
index 75307447cef9..d8ecefaf63ca 100644
--- a/include/linux/regulator/ab8500.h
+++ b/include/linux/regulator/ab8500.h
@@ -322,18 +322,4 @@ struct ab8500_regulator_platform_data {
322 struct regulator_init_data *ext_regulator; 322 struct regulator_init_data *ext_regulator;
323}; 323};
324 324
325#ifdef CONFIG_REGULATOR_AB8500_DEBUG
326int ab8500_regulator_debug_init(struct platform_device *pdev);
327int ab8500_regulator_debug_exit(struct platform_device *pdev);
328#else
329static inline int ab8500_regulator_debug_init(struct platform_device *pdev)
330{
331 return 0;
332}
333static inline int ab8500_regulator_debug_exit(struct platform_device *pdev)
334{
335 return 0;
336}
337#endif
338
339#endif 325#endif
diff --git a/include/linux/regulator/act8865.h b/include/linux/regulator/act8865.h
index 49206c1b4905..b6c4909b33af 100644
--- a/include/linux/regulator/act8865.h
+++ b/include/linux/regulator/act8865.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * act8865.h -- Voltage regulation for the active-semi act8865 2 * act8865.h -- Voltage regulation for active-semi act88xx PMUs
3 * 3 *
4 * Copyright (C) 2013 Atmel Corporation. 4 * Copyright (C) 2013 Atmel Corporation.
5 * 5 *
@@ -29,6 +29,27 @@ enum {
29 ACT8865_REG_NUM, 29 ACT8865_REG_NUM,
30}; 30};
31 31
32enum {
33 ACT8846_ID_REG1,
34 ACT8846_ID_REG2,
35 ACT8846_ID_REG3,
36 ACT8846_ID_REG4,
37 ACT8846_ID_REG5,
38 ACT8846_ID_REG6,
39 ACT8846_ID_REG7,
40 ACT8846_ID_REG8,
41 ACT8846_ID_REG9,
42 ACT8846_ID_REG10,
43 ACT8846_ID_REG11,
44 ACT8846_ID_REG12,
45 ACT8846_REG_NUM,
46};
47
48enum {
49 ACT8865,
50 ACT8846,
51};
52
32/** 53/**
33 * act8865_regulator_data - regulator data 54 * act8865_regulator_data - regulator data
34 * @id: regulator id 55 * @id: regulator id
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 14ec18d5e18b..f8a8733068a7 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -37,6 +37,7 @@
37 37
38struct device; 38struct device;
39struct notifier_block; 39struct notifier_block;
40struct regmap;
40 41
41/* 42/*
42 * Regulator operating modes. 43 * Regulator operating modes.
@@ -215,6 +216,13 @@ int regulator_set_optimum_mode(struct regulator *regulator, int load_uA);
215 216
216int regulator_allow_bypass(struct regulator *regulator, bool allow); 217int regulator_allow_bypass(struct regulator *regulator, bool allow);
217 218
219struct regmap *regulator_get_regmap(struct regulator *regulator);
220int regulator_get_hardware_vsel_register(struct regulator *regulator,
221 unsigned *vsel_reg,
222 unsigned *vsel_mask);
223int regulator_list_hardware_vsel(struct regulator *regulator,
224 unsigned selector);
225
218/* regulator notifier block */ 226/* regulator notifier block */
219int regulator_register_notifier(struct regulator *regulator, 227int regulator_register_notifier(struct regulator *regulator,
220 struct notifier_block *nb); 228 struct notifier_block *nb);
@@ -457,6 +465,24 @@ static inline int regulator_allow_bypass(struct regulator *regulator,
457 return 0; 465 return 0;
458} 466}
459 467
468static inline struct regmap *regulator_get_regmap(struct regulator *regulator)
469{
470 return ERR_PTR(-EOPNOTSUPP);
471}
472
473static inline int regulator_get_hardware_vsel_register(struct regulator *regulator,
474 unsigned *vsel_reg,
475 unsigned *vsel_mask)
476{
477 return -EOPNOTSUPP;
478}
479
480static inline int regulator_list_hardware_vsel(struct regulator *regulator,
481 unsigned selector)
482{
483 return -EOPNOTSUPP;
484}
485
460static inline int regulator_register_notifier(struct regulator *regulator, 486static inline int regulator_register_notifier(struct regulator *regulator,
461 struct notifier_block *nb) 487 struct notifier_block *nb)
462{ 488{
diff --git a/include/linux/regulator/da9211.h b/include/linux/regulator/da9211.h
new file mode 100644
index 000000000000..0981ce0e72cc
--- /dev/null
+++ b/include/linux/regulator/da9211.h
@@ -0,0 +1,32 @@
1/*
2 * da9211.h - Regulator device driver for DA9211
3 * Copyright (C) 2014 Dialog Semiconductor Ltd.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 */
15
16#ifndef __LINUX_REGULATOR_DA9211_H
17#define __LINUX_REGULATOR_DA9211_H
18
19#include <linux/regulator/machine.h>
20
21#define DA9211_MAX_REGULATORS 2
22
23struct da9211_pdata {
24 /*
25 * Number of buck
26 * 1 : 4 phase 1 buck
27 * 2 : 2 phase 2 buck
28 */
29 int num_buck;
30 struct regulator_init_data *init_data;
31};
32#endif