aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorRichard Fitzgerald <rf@opensource.wolfsonmicro.com>2017-04-18 06:43:52 -0400
committerMark Brown <broonie@kernel.org>2017-04-25 11:36:32 -0400
commitaaa84e6a0399df374634c42590e644a698fcc3ff (patch)
tree300eee63ca122e6e9770f938f2830d7d8a102403 /include/linux
parent7d8d14b51921cbfe082a796e55c22d0c1dd8fc26 (diff)
regulator: arizona-ldo1: Move pdata into a separate structure
In preparation for sharing this driver with Madera, move the pdata for the LDO1 regulator out of struct arizona_pdata into a dedicated pdata struct for this driver. As a result the code in arizona_ldo1_of_get_pdata() can be made independent of struct arizona. This patch also updates the definition of struct arizona_pdata and the use of this pdata in mach-crag6410-module.c Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mfd/arizona/pdata.h4
-rw-r--r--include/linux/regulator/arizona-ldo1.h24
2 files changed, 26 insertions, 2 deletions
diff --git a/include/linux/mfd/arizona/pdata.h b/include/linux/mfd/arizona/pdata.h
index 43e875f9850c..bfeecf179895 100644
--- a/include/linux/mfd/arizona/pdata.h
+++ b/include/linux/mfd/arizona/pdata.h
@@ -12,6 +12,7 @@
12#define _ARIZONA_PDATA_H 12#define _ARIZONA_PDATA_H
13 13
14#include <dt-bindings/mfd/arizona.h> 14#include <dt-bindings/mfd/arizona.h>
15#include <linux/regulator/arizona-ldo1.h>
15#include <linux/regulator/arizona-micsupp.h> 16#include <linux/regulator/arizona-micsupp.h>
16 17
17#define ARIZONA_GPN_DIR_MASK 0x8000 /* GPN_DIR */ 18#define ARIZONA_GPN_DIR_MASK 0x8000 /* GPN_DIR */
@@ -77,13 +78,12 @@ struct arizona_micd_range {
77 78
78struct arizona_pdata { 79struct arizona_pdata {
79 int reset; /** GPIO controlling /RESET, if any */ 80 int reset; /** GPIO controlling /RESET, if any */
80 int ldoena; /** GPIO controlling LODENA, if any */
81 81
82 /** Regulator configuration for MICVDD */ 82 /** Regulator configuration for MICVDD */
83 struct arizona_micsupp_pdata micvdd; 83 struct arizona_micsupp_pdata micvdd;
84 84
85 /** Regulator configuration for LDO1 */ 85 /** Regulator configuration for LDO1 */
86 struct regulator_init_data *ldo1; 86 struct arizona_ldo1_pdata ldo1;
87 87
88 /** If a direct 32kHz clock is provided on an MCLK specify it here */ 88 /** If a direct 32kHz clock is provided on an MCLK specify it here */
89 int clk32k_src; 89 int clk32k_src;
diff --git a/include/linux/regulator/arizona-ldo1.h b/include/linux/regulator/arizona-ldo1.h
new file mode 100644
index 000000000000..c685f1277c63
--- /dev/null
+++ b/include/linux/regulator/arizona-ldo1.h
@@ -0,0 +1,24 @@
1/*
2 * Platform data for Arizona LDO1 regulator
3 *
4 * Copyright 2017 Cirrus Logic
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef ARIZONA_LDO1_H
12#define ARIZONA_LDO1_H
13
14struct regulator_init_data;
15
16struct arizona_ldo1_pdata {
17 /** GPIO controlling LDOENA, if any */
18 int ldoena;
19
20 /** Regulator configuration for LDO1 */
21 const struct regulator_init_data *init_data;
22};
23
24#endif