Skip to contentSkip to conversation

ASoC: Add platform data for WM1250 EV1 GPIOs

PATCH New Mark Brown 1 participant 2 messages Sep 22, 2011

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/2 ASoC: Add platform data for WM1250 EV1 GPIOs

The WM1250 EV1 has some GPIOs which can be used to control the behaviour at runtime. Request them all if supplied and add a set_bias_level() function to start and stop the clocks.

---
 include/sound/wm1250-ev1.h    |   27 +++++++++
 sound/soc/codecs/wm1250-ev1.c |  121 ++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 145 insertions(+), 3 deletions(-)
 create mode 100644 include/sound/wm1250-ev1.h
include/sound/wm1250-ev1.h new file +27 -0
new file mode 100644
index 0000000..7dff828
@@ -0,0 +1,27 @@
+/*
+ * linux/sound/wm1250-ev1.h - Platform data for WM1250-EV1
+ *
+ * Copyright 2011 Wolfson Microelectronics. PLC.
+ *
+ * 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 __LINUX_SND_WM1250_EV1_H
+#define __LINUX_SND_WM1250_EV1_H
+
+#define WM1250_EV1_NUM_GPIOS 5
+
+#define WM1250_EV1_GPIO_CLK_ENA  0
+#define WM1250_EV1_GPIO_CLK_SEL0 1
+#define WM1250_EV1_GPIO_CLK_SEL1 2
+#define WM1250_EV1_GPIO_OSR      3
+#define WM1250_EV1_GPIO_MASTER   4
+
+
+struct wm1250_ev1_pdata {
+	int gpios[WM1250_EV1_NUM_GPIOS];
+};
+
+#endif
sound/soc/codecs/wm1250-ev1.c +118 -3

153 lines not on this page · raw message

Signature · 1 line
1.7.6.3
author
#1 lore raw

PATCH 2/2 ASoC: Set idle_bias_off for WM1250 EV1

The WM1250 EV1 is functionally digital in a system (the analogue I/O is either ground referenced or always powered) so flag it as idle_bias_off.

---
 sound/soc/codecs/wm1250-ev1.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
sound/soc/codecs/wm1250-ev1.c +1 -0
index 0554b88..cd0ec0f 100644
@@ -104,6 +104,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm1250_ev1 = {
 	.num_dapm_routes = ARRAY_SIZE(wm1250_ev1_dapm_routes),
 
 	.set_bias_level = wm1250_ev1_set_bias_level,
+	.idle_bias_off = true,
 };
 
 static int __devinit wm1250_ev1_pdata(struct i2c_client *i2c)
Signature · 1 line
1.7.6.3