* [PATCH v2 1/2] mfd: wm5110: Add registers for headphone short circuit control
@ 2014-01-09 14:29 Charles Keepax
2014-01-09 14:29 ` [PATCH v2 2/2] ASoC: wm5110: Add controls for headphone short circuit protection Charles Keepax
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Charles Keepax @ 2014-01-09 14:29 UTC (permalink / raw)
To: lee.jones; +Cc: sameo, broonie, lgirdwood, alsa-devel, linux-kernel, patches
Add the registers necessary to enable/disable the headphone short
circuit protection.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
drivers/mfd/wm5110-tables.c | 6 ++++++
include/linux/mfd/arizona/registers.h | 27 +++++++++++++++++++++++++++
2 files changed, 33 insertions(+), 0 deletions(-)
Changes since v1:
- Add switch to the control names in the second patch in the series.
Thanks,
Charles
diff --git a/drivers/mfd/wm5110-tables.c b/drivers/mfd/wm5110-tables.c
index 24ec464..30f8163 100644
--- a/drivers/mfd/wm5110-tables.c
+++ b/drivers/mfd/wm5110-tables.c
@@ -637,6 +637,9 @@ static const struct reg_default wm5110_reg_default[] = {
{ 0x00000491, 0x0000 }, /* R1169 - PDM SPK1 CTRL 2 */
{ 0x00000492, 0x0069 }, /* R1170 - PDM SPK2 CTRL 1 */
{ 0x00000493, 0x0000 }, /* R1171 - PDM SPK2 CTRL 2 */
+ { 0x000004A0, 0x3480 }, /* R1184 - HP1 Short Circuit Ctrl */
+ { 0x000004A1, 0x3480 }, /* R1185 - HP2 Short Circuit Ctrl */
+ { 0x000004A2, 0x3480 }, /* R1186 - HP3 Short Circuit Ctrl */
{ 0x00000500, 0x000C }, /* R1280 - AIF1 BCLK Ctrl */
{ 0x00000501, 0x0008 }, /* R1281 - AIF1 Tx Pin Ctrl */
{ 0x00000502, 0x0000 }, /* R1282 - AIF1 Rx Pin Ctrl */
@@ -1633,6 +1636,9 @@ static bool wm5110_readable_register(struct device *dev, unsigned int reg)
case ARIZONA_PDM_SPK1_CTRL_2:
case ARIZONA_PDM_SPK2_CTRL_1:
case ARIZONA_PDM_SPK2_CTRL_2:
+ case ARIZONA_HP1_SHORT_CIRCUIT_CTRL:
+ case ARIZONA_HP2_SHORT_CIRCUIT_CTRL:
+ case ARIZONA_HP3_SHORT_CIRCUIT_CTRL:
case ARIZONA_AIF1_BCLK_CTRL:
case ARIZONA_AIF1_TX_PIN_CTRL:
case ARIZONA_AIF1_RX_PIN_CTRL:
diff --git a/include/linux/mfd/arizona/registers.h b/include/linux/mfd/arizona/registers.h
index b40960d..2d3ac50 100644
--- a/include/linux/mfd/arizona/registers.h
+++ b/include/linux/mfd/arizona/registers.h
@@ -226,6 +226,9 @@
#define ARIZONA_PDM_SPK1_CTRL_2 0x491
#define ARIZONA_PDM_SPK2_CTRL_1 0x492
#define ARIZONA_PDM_SPK2_CTRL_2 0x493
+#define ARIZONA_HP1_SHORT_CIRCUIT_CTRL 0x4A0
+#define ARIZONA_HP2_SHORT_CIRCUIT_CTRL 0x4A1
+#define ARIZONA_HP3_SHORT_CIRCUIT_CTRL 0x4A2
#define ARIZONA_SPK_CTRL_2 0x4B5
#define ARIZONA_SPK_CTRL_3 0x4B6
#define ARIZONA_DAC_COMP_1 0x4DC
@@ -3297,6 +3300,30 @@
#define ARIZONA_SPK2_FMT_WIDTH 1 /* SPK2_FMT */
/*
+ * R1184 (0x4A0) - HP1 Short Circuit Ctrl
+ */
+#define ARIZONA_HP1_SC_ENA 0x1000 /* HP1_SC_ENA */
+#define ARIZONA_HP1_SC_ENA_MASK 0x1000 /* HP1_SC_ENA */
+#define ARIZONA_HP1_SC_ENA_SHIFT 12 /* HP1_SC_ENA */
+#define ARIZONA_HP1_SC_ENA_WIDTH 1 /* HP1_SC_ENA */
+
+/*
+ * R1185 (0x4A1) - HP2 Short Circuit Ctrl
+ */
+#define ARIZONA_HP2_SC_ENA 0x1000 /* HP2_SC_ENA */
+#define ARIZONA_HP2_SC_ENA_MASK 0x1000 /* HP2_SC_ENA */
+#define ARIZONA_HP2_SC_ENA_SHIFT 12 /* HP2_SC_ENA */
+#define ARIZONA_HP2_SC_ENA_WIDTH 1 /* HP2_SC_ENA */
+
+/*
+ * R1186 (0x4A2) - HP3 Short Circuit Ctrl
+ */
+#define ARIZONA_HP3_SC_ENA 0x1000 /* HP3_SC_ENA */
+#define ARIZONA_HP3_SC_ENA_MASK 0x1000 /* HP3_SC_ENA */
+#define ARIZONA_HP3_SC_ENA_SHIFT 12 /* HP3_SC_ENA */
+#define ARIZONA_HP3_SC_ENA_WIDTH 1 /* HP3_SC_ENA */
+
+/*
* R1244 (0x4DC) - DAC comp 1
*/
#define ARIZONA_OUT_COMP_COEFF_MASK 0xFFFF /* OUT_COMP_COEFF - [15:0] */
--
1.7.2.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] ASoC: wm5110: Add controls for headphone short circuit protection
2014-01-09 14:29 [PATCH v2 1/2] mfd: wm5110: Add registers for headphone short circuit control Charles Keepax
@ 2014-01-09 14:29 ` Charles Keepax
2014-01-10 10:06 ` [PATCH v2 1/2] mfd: wm5110: Add registers for headphone short circuit control Lee Jones
2014-01-10 11:52 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Charles Keepax @ 2014-01-09 14:29 UTC (permalink / raw)
To: lee.jones; +Cc: sameo, broonie, lgirdwood, alsa-devel, linux-kernel, patches
Add controls to enable/disable the headphone short circuit protection of
the headphone outputs.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
sound/soc/codecs/wm5110.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index 9add6c7..eb526e3 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -267,6 +267,13 @@ ARIZONA_MIXER_CONTROLS("SPKDAT1R", ARIZONA_OUT5RMIX_INPUT_1_SOURCE),
ARIZONA_MIXER_CONTROLS("SPKDAT2L", ARIZONA_OUT6LMIX_INPUT_1_SOURCE),
ARIZONA_MIXER_CONTROLS("SPKDAT2R", ARIZONA_OUT6RMIX_INPUT_1_SOURCE),
+SOC_SINGLE("HPOUT1 SC Protect Switch", ARIZONA_HP1_SHORT_CIRCUIT_CTRL,
+ ARIZONA_HP1_SC_ENA_SHIFT, 1, 0),
+SOC_SINGLE("HPOUT2 SC Protect Switch", ARIZONA_HP2_SHORT_CIRCUIT_CTRL,
+ ARIZONA_HP2_SC_ENA_SHIFT, 1, 0),
+SOC_SINGLE("HPOUT3 SC Protect Switch", ARIZONA_HP3_SHORT_CIRCUIT_CTRL,
+ ARIZONA_HP3_SC_ENA_SHIFT, 1, 0),
+
SOC_DOUBLE_R("HPOUT1 Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_1L,
ARIZONA_DAC_DIGITAL_VOLUME_1R, ARIZONA_OUT1L_MUTE_SHIFT, 1, 1),
SOC_DOUBLE_R("HPOUT2 Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_2L,
--
1.7.2.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/2] mfd: wm5110: Add registers for headphone short circuit control
2014-01-09 14:29 [PATCH v2 1/2] mfd: wm5110: Add registers for headphone short circuit control Charles Keepax
2014-01-09 14:29 ` [PATCH v2 2/2] ASoC: wm5110: Add controls for headphone short circuit protection Charles Keepax
@ 2014-01-10 10:06 ` Lee Jones
2014-01-10 11:52 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Lee Jones @ 2014-01-10 10:06 UTC (permalink / raw)
To: Charles Keepax
Cc: sameo, broonie, lgirdwood, alsa-devel, linux-kernel, patches
On Thu, 09 Jan 2014, Charles Keepax wrote:
> Add the registers necessary to enable/disable the headphone short
> circuit protection.
>
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
> ---
> drivers/mfd/wm5110-tables.c | 6 ++++++
> include/linux/mfd/arizona/registers.h | 27 +++++++++++++++++++++++++++
> 2 files changed, 33 insertions(+), 0 deletions(-)
I'm assuming the ASoC commit depends on this one?
Acked-by: Lee Jones <lee.jones@linaro.org>
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/2] mfd: wm5110: Add registers for headphone short circuit control
2014-01-09 14:29 [PATCH v2 1/2] mfd: wm5110: Add registers for headphone short circuit control Charles Keepax
2014-01-09 14:29 ` [PATCH v2 2/2] ASoC: wm5110: Add controls for headphone short circuit protection Charles Keepax
2014-01-10 10:06 ` [PATCH v2 1/2] mfd: wm5110: Add registers for headphone short circuit control Lee Jones
@ 2014-01-10 11:52 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2014-01-10 11:52 UTC (permalink / raw)
To: Charles Keepax
Cc: lee.jones, sameo, lgirdwood, alsa-devel, linux-kernel, patches
[-- Attachment #1: Type: text/plain, Size: 177 bytes --]
On Thu, Jan 09, 2014 at 02:29:24PM +0000, Charles Keepax wrote:
> Add the registers necessary to enable/disable the headphone short
> circuit protection.
Applied both, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-10 11:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-09 14:29 [PATCH v2 1/2] mfd: wm5110: Add registers for headphone short circuit control Charles Keepax
2014-01-09 14:29 ` [PATCH v2 2/2] ASoC: wm5110: Add controls for headphone short circuit protection Charles Keepax
2014-01-10 10:06 ` [PATCH v2 1/2] mfd: wm5110: Add registers for headphone short circuit control Lee Jones
2014-01-10 11:52 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox