diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-10-06 10:33:52 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-10-06 10:33:52 -0400 |
commit | 0fd0ba5f9e8ebae66afded580f5f34936f740ac7 (patch) | |
tree | f232be1bf350b2aec4e860e7156f5292344b0c62 /include | |
parent | b7ef37d0e382298bcf7ba399ce67b044d9add23a (diff) | |
parent | 9911f7f7562a25381eff93fdc660a4a3b4c0f6e0 (diff) |
Merge tag 'asoc-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Additional updates for v3.7
A couple more updates for 3.7, enhancements to the ux500 and wm2000
drivers, a new driver for DA9055 and the support for regulator bypass
mode. With the exception of the DA9055 this has all had a chance to
soak in -next (the driver was added on Friday so should be in -next
today).
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mfd/abx500/ab8500-codec.h | 6 | ||||
-rw-r--r-- | include/linux/regulator/consumer.h | 8 | ||||
-rw-r--r-- | include/linux/regulator/driver.h | 14 | ||||
-rw-r--r-- | include/linux/regulator/machine.h | 2 | ||||
-rw-r--r-- | include/sound/da9055.h | 33 | ||||
-rw-r--r-- | include/sound/soc-dapm.h | 3 |
6 files changed, 64 insertions, 2 deletions
diff --git a/include/linux/mfd/abx500/ab8500-codec.h b/include/linux/mfd/abx500/ab8500-codec.h index dc6529202cdd..d7079413def0 100644 --- a/include/linux/mfd/abx500/ab8500-codec.h +++ b/include/linux/mfd/abx500/ab8500-codec.h | |||
@@ -23,7 +23,8 @@ enum amic_type { | |||
23 | /* Mic-biases */ | 23 | /* Mic-biases */ |
24 | enum amic_micbias { | 24 | enum amic_micbias { |
25 | AMIC_MICBIAS_VAMIC1, | 25 | AMIC_MICBIAS_VAMIC1, |
26 | AMIC_MICBIAS_VAMIC2 | 26 | AMIC_MICBIAS_VAMIC2, |
27 | AMIC_MICBIAS_UNKNOWN | ||
27 | }; | 28 | }; |
28 | 29 | ||
29 | /* Bias-voltage */ | 30 | /* Bias-voltage */ |
@@ -31,7 +32,8 @@ enum ear_cm_voltage { | |||
31 | EAR_CMV_0_95V, | 32 | EAR_CMV_0_95V, |
32 | EAR_CMV_1_10V, | 33 | EAR_CMV_1_10V, |
33 | EAR_CMV_1_27V, | 34 | EAR_CMV_1_27V, |
34 | EAR_CMV_1_58V | 35 | EAR_CMV_1_58V, |
36 | EAR_CMV_UNKNOWN | ||
35 | }; | 37 | }; |
36 | 38 | ||
37 | /* Analog microphone settings */ | 39 | /* Analog microphone settings */ |
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index da339fd8c755..ea3e35816621 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
@@ -177,6 +177,8 @@ int regulator_set_mode(struct regulator *regulator, unsigned int mode); | |||
177 | unsigned int regulator_get_mode(struct regulator *regulator); | 177 | unsigned int regulator_get_mode(struct regulator *regulator); |
178 | int regulator_set_optimum_mode(struct regulator *regulator, int load_uA); | 178 | int regulator_set_optimum_mode(struct regulator *regulator, int load_uA); |
179 | 179 | ||
180 | int regulator_allow_bypass(struct regulator *regulator, bool allow); | ||
181 | |||
180 | /* regulator notifier block */ | 182 | /* regulator notifier block */ |
181 | int regulator_register_notifier(struct regulator *regulator, | 183 | int regulator_register_notifier(struct regulator *regulator, |
182 | struct notifier_block *nb); | 184 | struct notifier_block *nb); |
@@ -328,6 +330,12 @@ static inline int regulator_set_optimum_mode(struct regulator *regulator, | |||
328 | return REGULATOR_MODE_NORMAL; | 330 | return REGULATOR_MODE_NORMAL; |
329 | } | 331 | } |
330 | 332 | ||
333 | static inline int regulator_allow_bypass(struct regulator *regulator, | ||
334 | bool allow) | ||
335 | { | ||
336 | return 0; | ||
337 | } | ||
338 | |||
331 | static inline int regulator_register_notifier(struct regulator *regulator, | 339 | static inline int regulator_register_notifier(struct regulator *regulator, |
332 | struct notifier_block *nb) | 340 | struct notifier_block *nb) |
333 | { | 341 | { |
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index bac4c871f3bd..7274a469e8d9 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
@@ -32,6 +32,8 @@ enum regulator_status { | |||
32 | REGULATOR_STATUS_NORMAL, | 32 | REGULATOR_STATUS_NORMAL, |
33 | REGULATOR_STATUS_IDLE, | 33 | REGULATOR_STATUS_IDLE, |
34 | REGULATOR_STATUS_STANDBY, | 34 | REGULATOR_STATUS_STANDBY, |
35 | /* The regulator is enabled but not regulating */ | ||
36 | REGULATOR_STATUS_BYPASS, | ||
35 | /* in case that any other status doesn't apply */ | 37 | /* in case that any other status doesn't apply */ |
36 | REGULATOR_STATUS_UNDEFINED, | 38 | REGULATOR_STATUS_UNDEFINED, |
37 | }; | 39 | }; |
@@ -67,6 +69,9 @@ enum regulator_status { | |||
67 | * @get_optimum_mode: Get the most efficient operating mode for the regulator | 69 | * @get_optimum_mode: Get the most efficient operating mode for the regulator |
68 | * when running with the specified parameters. | 70 | * when running with the specified parameters. |
69 | * | 71 | * |
72 | * @set_bypass: Set the regulator in bypass mode. | ||
73 | * @get_bypass: Get the regulator bypass mode state. | ||
74 | * | ||
70 | * @enable_time: Time taken for the regulator voltage output voltage to | 75 | * @enable_time: Time taken for the regulator voltage output voltage to |
71 | * stabilise after being enabled, in microseconds. | 76 | * stabilise after being enabled, in microseconds. |
72 | * @set_ramp_delay: Set the ramp delay for the regulator. The driver should | 77 | * @set_ramp_delay: Set the ramp delay for the regulator. The driver should |
@@ -133,6 +138,10 @@ struct regulator_ops { | |||
133 | unsigned int (*get_optimum_mode) (struct regulator_dev *, int input_uV, | 138 | unsigned int (*get_optimum_mode) (struct regulator_dev *, int input_uV, |
134 | int output_uV, int load_uA); | 139 | int output_uV, int load_uA); |
135 | 140 | ||
141 | /* control and report on bypass mode */ | ||
142 | int (*set_bypass)(struct regulator_dev *dev, bool enable); | ||
143 | int (*get_bypass)(struct regulator_dev *dev, bool *enable); | ||
144 | |||
136 | /* the operations below are for configuration of regulator state when | 145 | /* the operations below are for configuration of regulator state when |
137 | * its parent PMIC enters a global STANDBY/HIBERNATE state */ | 146 | * its parent PMIC enters a global STANDBY/HIBERNATE state */ |
138 | 147 | ||
@@ -205,6 +214,8 @@ struct regulator_desc { | |||
205 | unsigned int vsel_mask; | 214 | unsigned int vsel_mask; |
206 | unsigned int enable_reg; | 215 | unsigned int enable_reg; |
207 | unsigned int enable_mask; | 216 | unsigned int enable_mask; |
217 | unsigned int bypass_reg; | ||
218 | unsigned int bypass_mask; | ||
208 | 219 | ||
209 | unsigned int enable_time; | 220 | unsigned int enable_time; |
210 | }; | 221 | }; |
@@ -253,6 +264,7 @@ struct regulator_dev { | |||
253 | int exclusive; | 264 | int exclusive; |
254 | u32 use_count; | 265 | u32 use_count; |
255 | u32 open_count; | 266 | u32 open_count; |
267 | u32 bypass_count; | ||
256 | 268 | ||
257 | /* lists we belong to */ | 269 | /* lists we belong to */ |
258 | struct list_head list; /* list of all regulators */ | 270 | struct list_head list; /* list of all regulators */ |
@@ -310,6 +322,8 @@ int regulator_disable_regmap(struct regulator_dev *rdev); | |||
310 | int regulator_set_voltage_time_sel(struct regulator_dev *rdev, | 322 | int regulator_set_voltage_time_sel(struct regulator_dev *rdev, |
311 | unsigned int old_selector, | 323 | unsigned int old_selector, |
312 | unsigned int new_selector); | 324 | unsigned int new_selector); |
325 | int regulator_set_bypass_regmap(struct regulator_dev *rdev, bool enable); | ||
326 | int regulator_get_bypass_regmap(struct regulator_dev *rdev, bool *enable); | ||
313 | 327 | ||
314 | void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data); | 328 | void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data); |
315 | 329 | ||
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h index 40dd0a394cfa..36adbc82de6a 100644 --- a/include/linux/regulator/machine.h +++ b/include/linux/regulator/machine.h | |||
@@ -32,6 +32,7 @@ struct regulator; | |||
32 | * board/machine. | 32 | * board/machine. |
33 | * STATUS: Regulator can be enabled and disabled. | 33 | * STATUS: Regulator can be enabled and disabled. |
34 | * DRMS: Dynamic Regulator Mode Switching is enabled for this regulator. | 34 | * DRMS: Dynamic Regulator Mode Switching is enabled for this regulator. |
35 | * BYPASS: Regulator can be put into bypass mode | ||
35 | */ | 36 | */ |
36 | 37 | ||
37 | #define REGULATOR_CHANGE_VOLTAGE 0x1 | 38 | #define REGULATOR_CHANGE_VOLTAGE 0x1 |
@@ -39,6 +40,7 @@ struct regulator; | |||
39 | #define REGULATOR_CHANGE_MODE 0x4 | 40 | #define REGULATOR_CHANGE_MODE 0x4 |
40 | #define REGULATOR_CHANGE_STATUS 0x8 | 41 | #define REGULATOR_CHANGE_STATUS 0x8 |
41 | #define REGULATOR_CHANGE_DRMS 0x10 | 42 | #define REGULATOR_CHANGE_DRMS 0x10 |
43 | #define REGULATOR_CHANGE_BYPASS 0x20 | ||
42 | 44 | ||
43 | /** | 45 | /** |
44 | * struct regulator_state - regulator state during low power system states | 46 | * struct regulator_state - regulator state during low power system states |
diff --git a/include/sound/da9055.h b/include/sound/da9055.h new file mode 100644 index 000000000000..cf1241b64d89 --- /dev/null +++ b/include/sound/da9055.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | * DA9055 ALSA Soc codec driver | ||
3 | * | ||
4 | * Copyright (c) 2012 Dialog Semiconductor | ||
5 | * | ||
6 | * Tested on (Samsung SMDK6410 board + DA9055 EVB) using I2S and I2C | ||
7 | * Written by David Chen <david.chen@diasemi.com> and | ||
8 | * Ashish Chavan <ashish.chavan@kpitcummins.com> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifndef __SOUND_DA9055_H__ | ||
17 | #define __SOUND_DA9055_H__ | ||
18 | |||
19 | enum da9055_micbias_voltage { | ||
20 | DA9055_MICBIAS_1_6V = 0, | ||
21 | DA9055_MICBIAS_1_8V = 1, | ||
22 | DA9055_MICBIAS_2_1V = 2, | ||
23 | DA9055_MICBIAS_2_2V = 3, | ||
24 | }; | ||
25 | |||
26 | struct da9055_platform_data { | ||
27 | /* Selects which of the two MicBias pins acts as the bias source */ | ||
28 | bool micbias_source; | ||
29 | /* Selects the micbias voltage */ | ||
30 | enum da9055_micbias_voltage micbias; | ||
31 | }; | ||
32 | |||
33 | #endif | ||
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index c96bf5ae80a6..e1ef63d4a5c4 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -320,6 +320,9 @@ struct device; | |||
320 | #define SND_SOC_DAPM_EVENT_OFF(e) \ | 320 | #define SND_SOC_DAPM_EVENT_OFF(e) \ |
321 | (e & (SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD)) | 321 | (e & (SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD)) |
322 | 322 | ||
323 | /* regulator widget flags */ | ||
324 | #define SND_SOC_DAPM_REGULATOR_BYPASS 0x1 /* bypass when disabled */ | ||
325 | |||
323 | struct snd_soc_dapm_widget; | 326 | struct snd_soc_dapm_widget; |
324 | enum snd_soc_dapm_type; | 327 | enum snd_soc_dapm_type; |
325 | struct snd_soc_dapm_path; | 328 | struct snd_soc_dapm_path; |