aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>2015-07-07 10:28:12 -0400
committerMark Brown <broonie@kernel.org>2015-07-08 15:22:47 -0400
commitf089d4d20fcbcf16a62ef3b4b57f41ecf59a5d83 (patch)
treed8df38d246065b3ff5a57ca2b6d80ee6e1e42ac6
parentd770e558e21961ad6cfdf0ff7df0eb5d7d4f0754 (diff)
mfd: wm5110: Add registers for custom write sequence triggers
This register will be needed as part of some additional support for the headphone path on wm5110, so this patch adds the register and sets up its regmap config. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/mfd/wm5110-tables.c2
-rw-r--r--include/linux/mfd/arizona/registers.h37
2 files changed, 39 insertions, 0 deletions
diff --git a/drivers/mfd/wm5110-tables.c b/drivers/mfd/wm5110-tables.c
index 12cad94b4035..62a4aa13cb98 100644
--- a/drivers/mfd/wm5110-tables.c
+++ b/drivers/mfd/wm5110-tables.c
@@ -676,6 +676,7 @@ static const struct reg_default wm5110_reg_default[] = {
676 { 0x00000032, 0x0100 }, /* R50 - PWM Drive 3 */ 676 { 0x00000032, 0x0100 }, /* R50 - PWM Drive 3 */
677 { 0x00000040, 0x0000 }, /* R64 - Wake control */ 677 { 0x00000040, 0x0000 }, /* R64 - Wake control */
678 { 0x00000041, 0x0000 }, /* R65 - Sequence control */ 678 { 0x00000041, 0x0000 }, /* R65 - Sequence control */
679 { 0x00000042, 0x0000 }, /* R66 - Spare Triggers */
679 { 0x00000061, 0x01FF }, /* R97 - Sample Rate Sequence Select 1 */ 680 { 0x00000061, 0x01FF }, /* R97 - Sample Rate Sequence Select 1 */
680 { 0x00000062, 0x01FF }, /* R98 - Sample Rate Sequence Select 2 */ 681 { 0x00000062, 0x01FF }, /* R98 - Sample Rate Sequence Select 2 */
681 { 0x00000063, 0x01FF }, /* R99 - Sample Rate Sequence Select 3 */ 682 { 0x00000063, 0x01FF }, /* R99 - Sample Rate Sequence Select 3 */
@@ -1716,6 +1717,7 @@ static bool wm5110_readable_register(struct device *dev, unsigned int reg)
1716 case ARIZONA_PWM_DRIVE_3: 1717 case ARIZONA_PWM_DRIVE_3:
1717 case ARIZONA_WAKE_CONTROL: 1718 case ARIZONA_WAKE_CONTROL:
1718 case ARIZONA_SEQUENCE_CONTROL: 1719 case ARIZONA_SEQUENCE_CONTROL:
1720 case ARIZONA_SPARE_TRIGGERS:
1719 case ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_1: 1721 case ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_1:
1720 case ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_2: 1722 case ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_2:
1721 case ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_3: 1723 case ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_3:
diff --git a/include/linux/mfd/arizona/registers.h b/include/linux/mfd/arizona/registers.h
index 3499d36e6067..11affb3c2768 100644
--- a/include/linux/mfd/arizona/registers.h
+++ b/include/linux/mfd/arizona/registers.h
@@ -39,6 +39,7 @@
39#define ARIZONA_PWM_DRIVE_3 0x32 39#define ARIZONA_PWM_DRIVE_3 0x32
40#define ARIZONA_WAKE_CONTROL 0x40 40#define ARIZONA_WAKE_CONTROL 0x40
41#define ARIZONA_SEQUENCE_CONTROL 0x41 41#define ARIZONA_SEQUENCE_CONTROL 0x41
42#define ARIZONA_SPARE_TRIGGERS 0x42
42#define ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_1 0x61 43#define ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_1 0x61
43#define ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_2 0x62 44#define ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_2 0x62
44#define ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_3 0x63 45#define ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_3 0x63
@@ -1431,6 +1432,42 @@
1431#define ARIZONA_WSEQ_ENA_JD2_RISE_WIDTH 1 /* WSEQ_ENA_JD2_RISE */ 1432#define ARIZONA_WSEQ_ENA_JD2_RISE_WIDTH 1 /* WSEQ_ENA_JD2_RISE */
1432 1433
1433/* 1434/*
1435 * R66 (0x42) - Spare Triggers
1436 */
1437#define ARIZONA_WS_TRG8 0x0080 /* WS_TRG8 */
1438#define ARIZONA_WS_TRG8_MASK 0x0080 /* WS_TRG8 */
1439#define ARIZONA_WS_TRG8_SHIFT 7 /* WS_TRG8 */
1440#define ARIZONA_WS_TRG8_WIDTH 1 /* WS_TRG8 */
1441#define ARIZONA_WS_TRG7 0x0040 /* WS_TRG7 */
1442#define ARIZONA_WS_TRG7_MASK 0x0040 /* WS_TRG7 */
1443#define ARIZONA_WS_TRG7_SHIFT 6 /* WS_TRG7 */
1444#define ARIZONA_WS_TRG7_WIDTH 1 /* WS_TRG7 */
1445#define ARIZONA_WS_TRG6 0x0020 /* WS_TRG6 */
1446#define ARIZONA_WS_TRG6_MASK 0x0020 /* WS_TRG6 */
1447#define ARIZONA_WS_TRG6_SHIFT 5 /* WS_TRG6 */
1448#define ARIZONA_WS_TRG6_WIDTH 1 /* WS_TRG6 */
1449#define ARIZONA_WS_TRG5 0x0010 /* WS_TRG5 */
1450#define ARIZONA_WS_TRG5_MASK 0x0010 /* WS_TRG5 */
1451#define ARIZONA_WS_TRG5_SHIFT 4 /* WS_TRG5 */
1452#define ARIZONA_WS_TRG5_WIDTH 1 /* WS_TRG5 */
1453#define ARIZONA_WS_TRG4 0x0008 /* WS_TRG4 */
1454#define ARIZONA_WS_TRG4_MASK 0x0008 /* WS_TRG4 */
1455#define ARIZONA_WS_TRG4_SHIFT 3 /* WS_TRG4 */
1456#define ARIZONA_WS_TRG4_WIDTH 1 /* WS_TRG4 */
1457#define ARIZONA_WS_TRG3 0x0004 /* WS_TRG3 */
1458#define ARIZONA_WS_TRG3_MASK 0x0004 /* WS_TRG3 */
1459#define ARIZONA_WS_TRG3_SHIFT 2 /* WS_TRG3 */
1460#define ARIZONA_WS_TRG3_WIDTH 1 /* WS_TRG3 */
1461#define ARIZONA_WS_TRG2 0x0002 /* WS_TRG2 */
1462#define ARIZONA_WS_TRG2_MASK 0x0002 /* WS_TRG2 */
1463#define ARIZONA_WS_TRG2_SHIFT 1 /* WS_TRG2 */
1464#define ARIZONA_WS_TRG2_WIDTH 1 /* WS_TRG2 */
1465#define ARIZONA_WS_TRG1 0x0001 /* WS_TRG1 */
1466#define ARIZONA_WS_TRG1_MASK 0x0001 /* WS_TRG1 */
1467#define ARIZONA_WS_TRG1_SHIFT 0 /* WS_TRG1 */
1468#define ARIZONA_WS_TRG1_WIDTH 1 /* WS_TRG1 */
1469
1470/*
1434 * R97 (0x61) - Sample Rate Sequence Select 1 1471 * R97 (0x61) - Sample Rate Sequence Select 1
1435 */ 1472 */
1436#define ARIZONA_WSEQ_SAMPLE_RATE_DETECT_A_SEQ_ADDR_MASK 0x01FF /* WSEQ_SAMPLE_RATE_DETECT_A_SEQ_ADDR - [8:0] */ 1473#define ARIZONA_WSEQ_SAMPLE_RATE_DETECT_A_SEQ_ADDR_MASK 0x01FF /* WSEQ_SAMPLE_RATE_DETECT_A_SEQ_ADDR - [8:0] */