diff options
| author | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> | 2016-05-13 11:45:18 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2016-05-30 11:14:36 -0400 |
| commit | 2230c49f09b552454eac51b81e9e4e41060b5e70 (patch) | |
| tree | 3bc1af20fcf6cb5b3fc8c98f28cce333a6dc6dc5 /include/linux/mfd/arizona | |
| parent | 1a695a905c18548062509178b98bc91e67510864 (diff) | |
ASoC: arizona: Add a notifier chain for CODEC events
Add a notifier chain that can be used from the machine driver to catch
events generated by the CODEC.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/mfd/arizona')
| -rw-r--r-- | include/linux/mfd/arizona/core.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/mfd/arizona/core.h b/include/linux/mfd/arizona/core.h index d55a42297d49..58ab4c0fe761 100644 --- a/include/linux/mfd/arizona/core.h +++ b/include/linux/mfd/arizona/core.h | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #define _WM_ARIZONA_CORE_H | 14 | #define _WM_ARIZONA_CORE_H |
| 15 | 15 | ||
| 16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
| 17 | #include <linux/notifier.h> | ||
| 17 | #include <linux/regmap.h> | 18 | #include <linux/regmap.h> |
| 18 | #include <linux/regulator/consumer.h> | 19 | #include <linux/regulator/consumer.h> |
| 19 | #include <linux/mfd/arizona/pdata.h> | 20 | #include <linux/mfd/arizona/pdata.h> |
| @@ -148,8 +149,17 @@ struct arizona { | |||
| 148 | uint16_t dac_comp_coeff; | 149 | uint16_t dac_comp_coeff; |
| 149 | uint8_t dac_comp_enabled; | 150 | uint8_t dac_comp_enabled; |
| 150 | struct mutex dac_comp_lock; | 151 | struct mutex dac_comp_lock; |
| 152 | |||
| 153 | struct blocking_notifier_head notifier; | ||
| 151 | }; | 154 | }; |
| 152 | 155 | ||
| 156 | static inline int arizona_call_notifiers(struct arizona *arizona, | ||
| 157 | unsigned long event, | ||
| 158 | void *data) | ||
| 159 | { | ||
| 160 | return blocking_notifier_call_chain(&arizona->notifier, event, data); | ||
| 161 | } | ||
| 162 | |||
| 153 | int arizona_clk32k_enable(struct arizona *arizona); | 163 | int arizona_clk32k_enable(struct arizona *arizona); |
| 154 | int arizona_clk32k_disable(struct arizona *arizona); | 164 | int arizona_clk32k_disable(struct arizona *arizona); |
| 155 | 165 | ||
