aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2016-09-02 11:52:46 -0400
committerLee Jones <lee.jones@linaro.org>2016-10-04 10:46:07 -0400
commitcdd8da8cc66b3d205120560649e530978ccbc567 (patch)
treed6a40397419b95800af04c7d768d02f2c1a6fc81 /include/linux/mfd
parent29b4817d4018df78086157ea3a55c1d9424a7cfc (diff)
mfd: arizona: Add gating of external MCLKn clocks
This patch adds requesting of the clocks supplied on MCLK1, MCLK2 pins, gating of the 32k clock is added to the arizona_clk32k_enable(), arizona_clk32k_disable() helpers. It's a temporary change until the CODEC's clock controller gets exposed through the clk API and is helpful for board configurations where the MCLK clocks are not provided by always on oscillators. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux/mfd')
-rw-r--r--include/linux/mfd/arizona/core.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/mfd/arizona/core.h b/include/linux/mfd/arizona/core.h
index 58ab4c0fe761..b9909bb0642b 100644
--- a/include/linux/mfd/arizona/core.h
+++ b/include/linux/mfd/arizona/core.h
@@ -13,6 +13,7 @@
13#ifndef _WM_ARIZONA_CORE_H 13#ifndef _WM_ARIZONA_CORE_H
14#define _WM_ARIZONA_CORE_H 14#define _WM_ARIZONA_CORE_H
15 15
16#include <linux/clk.h>
16#include <linux/interrupt.h> 17#include <linux/interrupt.h>
17#include <linux/notifier.h> 18#include <linux/notifier.h>
18#include <linux/regmap.h> 19#include <linux/regmap.h>
@@ -21,6 +22,12 @@
21 22
22#define ARIZONA_MAX_CORE_SUPPLIES 2 23#define ARIZONA_MAX_CORE_SUPPLIES 2
23 24
25enum {
26 ARIZONA_MCLK1,
27 ARIZONA_MCLK2,
28 ARIZONA_NUM_MCLK
29};
30
24enum arizona_type { 31enum arizona_type {
25 WM5102 = 1, 32 WM5102 = 1,
26 WM5110 = 2, 33 WM5110 = 2,
@@ -139,6 +146,8 @@ struct arizona {
139 struct mutex clk_lock; 146 struct mutex clk_lock;
140 int clk32k_ref; 147 int clk32k_ref;
141 148
149 struct clk *mclk[ARIZONA_NUM_MCLK];
150
142 bool ctrlif_error; 151 bool ctrlif_error;
143 152
144 struct snd_soc_dapm_context *dapm; 153 struct snd_soc_dapm_context *dapm;