diff options
author | Charles Keepax | 2016-05-13 16:45:18 +0100 |
---|---|---|
committer | Mark Brown | 2016-05-30 16:14:36 +0100 |
commit | 2230c49f09b552454eac51b81e9e4e41060b5e70 (patch) | |
tree | 3bc1af20fcf6cb5b3fc8c98f28cce333a6dc6dc5 /include | |
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')
-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 @@ #define _WM_ARIZONA_CORE_H #include <linux/interrupt.h> +#include <linux/notifier.h> #include <linux/regmap.h> #include <linux/regulator/consumer.h> #include <linux/mfd/arizona/pdata.h> @@ -148,8 +149,17 @@ struct arizona { uint16_t dac_comp_coeff; uint8_t dac_comp_enabled; struct mutex dac_comp_lock; + + struct blocking_notifier_head notifier; }; +static inline int arizona_call_notifiers(struct arizona *arizona, + unsigned long event, + void *data) +{ + return blocking_notifier_call_chain(&arizona->notifier, event, data); +} + int arizona_clk32k_enable(struct arizona *arizona); int arizona_clk32k_disable(struct arizona *arizona); |