summaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorRichard Fitzgerald <rf@opensource.cirrus.com>2018-11-12 15:28:37 +0000
committerLee Jones <lee.jones@linaro.org>2019-01-03 08:32:42 +0000
commit7f9472134a5af31bad191f074a5d416146da26f7 (patch)
tree0679bd7a187a97ca78c23a80e5f9895f8eac9f3e /drivers/mfd
parent628f3dfe4c7b35bbe63ec194ca6da857b00b0083 (diff)
downloadblackbird-obmc-linux-7f9472134a5af31bad191f074a5d416146da26f7.tar.gz
blackbird-obmc-linux-7f9472134a5af31bad191f074a5d416146da26f7.zip
mfd: madera: Add shared data for accessory detection
Add variables to struct madera that will be shared by the extcon and audio codec drivers to synchronize output state during accessory detection. Also add a mutex to protect the DAPM pointer. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/madera-core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mfd/madera-core.c b/drivers/mfd/madera-core.c
index 440030cecbbd..5b58a8aea902 100644
--- a/drivers/mfd/madera-core.c
+++ b/drivers/mfd/madera-core.c
@@ -15,6 +15,7 @@
#include <linux/gpio.h>
#include <linux/mfd/core.h>
#include <linux/module.h>
+#include <linux/mutex.h>
#include <linux/notifier.h>
#include <linux/of.h>
#include <linux/of_gpio.h>
@@ -357,6 +358,8 @@ int madera_dev_init(struct madera *madera)
dev_set_drvdata(madera->dev, madera);
BLOCKING_INIT_NOTIFIER_HEAD(&madera->notifier);
+ mutex_init(&madera->dapm_ptr_lock);
+
madera_set_micbias_info(madera);
/*
OpenPOWER on IntegriCloud