aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPhilippe Langlais <philippe.langlais@linaro.org>2011-05-04 14:47:35 +0200
committerPhilippe Langlais <philippe.langlais@linaro.org>2011-07-22 15:41:34 +0200
commitc64feddb3a5c0bdbc99b104c766c167517e94d32 (patch)
tree693753e8c561aebb9699e50ed9f0213adfd40023 /include
parent02d1f618c6a2bf0390e15452d170dab834fac5be (diff)
Input: Add AB8500 AV Acc. Detection as platform drv
Adds AV Accessory detection driver functionality as a platform driver. Driver allows detection of basic AV-Accessory connected to 3.5mm AV-Connector. Supported accessories include headphone, headset, video and carkit. Driver controls the audio-in/video-out switch based on the detected accessory type and notifies about button presses from basic headsets (No ECI Support). Accessory status and button presses are reported as standard input events, if AB8500 ASoC Machine driver is configured. For accessory properties reporting, ALSA JACK definitions (SND_JACK_*) are used to report the features supported by the attached accessory. Button presses are reported with KEY_MEDIA keycode. Depends on: http://gerrit.lud.stericsson.com/gerrit/16910 for GPIO framework update. ST-Ericsson ID: ER 275366 Signed-off-by: Rahul Venkatram <rahul.venkatram@stericsson.com> Change-Id: Ie1c68120fc718710ecac2d3dafe4f3e7b1a53ac1 Signed-off-by: Rahul Venkatram <rahul.venkatram@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/16256 Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com> Conflicts: arch/arm/mach-ux500/board-mop500-regulators.c arch/arm/mach-ux500/board-mop500.c sound/soc/ux500/ux500_ab8500.c
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/ab8500.h3
-rw-r--r--include/sound/ux500_ab8500.h28
2 files changed, 31 insertions, 0 deletions
diff --git a/include/linux/mfd/ab8500.h b/include/linux/mfd/ab8500.h
index fb287fcbf50..1e2dd01d685 100644
--- a/include/linux/mfd/ab8500.h
+++ b/include/linux/mfd/ab8500.h
@@ -178,6 +178,7 @@ struct ab8500 {
struct regulator_reg_init;
struct regulator_init_data;
+struct ab8500_accdet_platform_data;
struct ab8500_denc_platform_data;
struct ab8500_audio_platform_data;
struct ab8500_gpio_platform_data;
@@ -190,6 +191,7 @@ struct ab8500_gpio_platform_data;
* @regulator_reg_init: regulator init registers
* @num_regulator: number of regulators
* @regulator: machine-specific constraints for regulators
+ * @accdet: machine-specific Accessory detection data
* @battery: machine-specific battery management data
* @charger: machine-specific charger data
* @btemp: machine-specific battery temp data
@@ -202,6 +204,7 @@ struct ab8500_platform_data {
struct ab8500_regulator_reg_init *regulator_reg_init;
int num_regulator;
struct regulator_init_data *regulator;
+ struct ab8500_accdet_platform_data *accdet;
struct ab8500_bm_data *battery;
struct ab8500_denc_platform_data *denc;
struct ab8500_audio_platform_data *audio;
diff --git a/include/sound/ux500_ab8500.h b/include/sound/ux500_ab8500.h
new file mode 100644
index 00000000000..ff114d82d9e
--- /dev/null
+++ b/include/sound/ux500_ab8500.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) ST-Ericsson SA 2010
+ *
+ * Author: Jarmo K. Kuronen <jarmo.kuronen@symbio.com>
+ * for ST-Ericsson.
+ *
+ * License terms:
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ */
+
+#ifndef UX500_AB8500_H
+#define UX500_AB8500_H
+
+extern struct snd_soc_ops ux500_ab8500_ops[];
+
+int ux500_ab8500_machine_codec_init(struct snd_soc_pcm_runtime *runtime);
+
+void ux500_ab8500_soc_machine_drv_cleanup(void);
+
+int enable_regulator(const char *name);
+void disable_regulator(const char *name);
+
+extern void ux500_ab8500_jack_report(int);
+
+#endif