Skip to content

Commit

Permalink
Merge remote-tracking branches 'asoc/topic/wm0010', 'asoc/topic/wm510…
Browse files Browse the repository at this point in the history
…0', 'asoc/topic/wm5110', 'asoc/topic/wm8004' and 'asoc/topic/wm8731' into asoc-next
  • Loading branch information
Mark Brown committed Aug 30, 2015
6 parents c009d37 + 030e6ee + efc04ca + dc606e0 + c8a6b92 + f611cdd commit 384ea79
Show file tree
Hide file tree
Showing 7 changed files with 379 additions and 57 deletions.
16 changes: 15 additions & 1 deletion drivers/mfd/wm5110-tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,16 @@ static const struct reg_sequence wm5110_revd_patch[] = {
{ 0x80, 0x0 },
};

/* Add extra headphone write sequence locations */
static const struct reg_default wm5110_reve_patch[] = {
{ 0x80, 0x3 },
{ 0x80, 0x3 },
{ 0x4b, 0x138 },
{ 0x4c, 0x13d },
{ 0x80, 0x0 },
{ 0x80, 0x0 },
};

/* We use a function so we can use ARRAY_SIZE() */
int wm5110_patch(struct arizona *arizona)
{
Expand All @@ -266,7 +276,9 @@ int wm5110_patch(struct arizona *arizona)
wm5110_revd_patch,
ARRAY_SIZE(wm5110_revd_patch));
default:
return 0;
return regmap_register_patch(arizona->regmap,
wm5110_reve_patch,
ARRAY_SIZE(wm5110_reve_patch));
}
}
EXPORT_SYMBOL_GPL(wm5110_patch);
Expand Down Expand Up @@ -676,6 +688,7 @@ static const struct reg_default wm5110_reg_default[] = {
{ 0x00000032, 0x0100 }, /* R50 - PWM Drive 3 */
{ 0x00000040, 0x0000 }, /* R64 - Wake control */
{ 0x00000041, 0x0000 }, /* R65 - Sequence control */
{ 0x00000042, 0x0000 }, /* R66 - Spare Triggers */
{ 0x00000061, 0x01FF }, /* R97 - Sample Rate Sequence Select 1 */
{ 0x00000062, 0x01FF }, /* R98 - Sample Rate Sequence Select 2 */
{ 0x00000063, 0x01FF }, /* R99 - Sample Rate Sequence Select 3 */
Expand Down Expand Up @@ -1716,6 +1729,7 @@ static bool wm5110_readable_register(struct device *dev, unsigned int reg)
case ARIZONA_PWM_DRIVE_3:
case ARIZONA_WAKE_CONTROL:
case ARIZONA_SEQUENCE_CONTROL:
case ARIZONA_SPARE_TRIGGERS:
case ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_1:
case ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_2:
case ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_3:
Expand Down
37 changes: 37 additions & 0 deletions include/linux/mfd/arizona/registers.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#define ARIZONA_PWM_DRIVE_3 0x32
#define ARIZONA_WAKE_CONTROL 0x40
#define ARIZONA_SEQUENCE_CONTROL 0x41
#define ARIZONA_SPARE_TRIGGERS 0x42
#define ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_1 0x61
#define ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_2 0x62
#define ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_3 0x63
Expand Down Expand Up @@ -1430,6 +1431,42 @@
#define ARIZONA_WSEQ_ENA_JD2_RISE_SHIFT 0 /* WSEQ_ENA_JD2_RISE */
#define ARIZONA_WSEQ_ENA_JD2_RISE_WIDTH 1 /* WSEQ_ENA_JD2_RISE */

/*
* R66 (0x42) - Spare Triggers
*/
#define ARIZONA_WS_TRG8 0x0080 /* WS_TRG8 */
#define ARIZONA_WS_TRG8_MASK 0x0080 /* WS_TRG8 */
#define ARIZONA_WS_TRG8_SHIFT 7 /* WS_TRG8 */
#define ARIZONA_WS_TRG8_WIDTH 1 /* WS_TRG8 */
#define ARIZONA_WS_TRG7 0x0040 /* WS_TRG7 */
#define ARIZONA_WS_TRG7_MASK 0x0040 /* WS_TRG7 */
#define ARIZONA_WS_TRG7_SHIFT 6 /* WS_TRG7 */
#define ARIZONA_WS_TRG7_WIDTH 1 /* WS_TRG7 */
#define ARIZONA_WS_TRG6 0x0020 /* WS_TRG6 */
#define ARIZONA_WS_TRG6_MASK 0x0020 /* WS_TRG6 */
#define ARIZONA_WS_TRG6_SHIFT 5 /* WS_TRG6 */
#define ARIZONA_WS_TRG6_WIDTH 1 /* WS_TRG6 */
#define ARIZONA_WS_TRG5 0x0010 /* WS_TRG5 */
#define ARIZONA_WS_TRG5_MASK 0x0010 /* WS_TRG5 */
#define ARIZONA_WS_TRG5_SHIFT 4 /* WS_TRG5 */
#define ARIZONA_WS_TRG5_WIDTH 1 /* WS_TRG5 */
#define ARIZONA_WS_TRG4 0x0008 /* WS_TRG4 */
#define ARIZONA_WS_TRG4_MASK 0x0008 /* WS_TRG4 */
#define ARIZONA_WS_TRG4_SHIFT 3 /* WS_TRG4 */
#define ARIZONA_WS_TRG4_WIDTH 1 /* WS_TRG4 */
#define ARIZONA_WS_TRG3 0x0004 /* WS_TRG3 */
#define ARIZONA_WS_TRG3_MASK 0x0004 /* WS_TRG3 */
#define ARIZONA_WS_TRG3_SHIFT 2 /* WS_TRG3 */
#define ARIZONA_WS_TRG3_WIDTH 1 /* WS_TRG3 */
#define ARIZONA_WS_TRG2 0x0002 /* WS_TRG2 */
#define ARIZONA_WS_TRG2_MASK 0x0002 /* WS_TRG2 */
#define ARIZONA_WS_TRG2_SHIFT 1 /* WS_TRG2 */
#define ARIZONA_WS_TRG2_WIDTH 1 /* WS_TRG2 */
#define ARIZONA_WS_TRG1 0x0001 /* WS_TRG1 */
#define ARIZONA_WS_TRG1_MASK 0x0001 /* WS_TRG1 */
#define ARIZONA_WS_TRG1_SHIFT 0 /* WS_TRG1 */
#define ARIZONA_WS_TRG1_WIDTH 1 /* WS_TRG1 */

/*
* R97 (0x61) - Sample Rate Sequence Select 1
*/
Expand Down
3 changes: 1 addition & 2 deletions sound/soc/codecs/wm0010.c
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ static int wm0010_spi_probe(struct spi_device *spi)
trigger = IRQF_TRIGGER_FALLING;
trigger |= IRQF_ONESHOT;

ret = request_threaded_irq(irq, NULL, wm0010_irq, trigger | IRQF_ONESHOT,
ret = request_threaded_irq(irq, NULL, wm0010_irq, trigger,
"wm0010", wm0010);
if (ret) {
dev_err(wm0010->dev, "Failed to request IRQ %d: %d\n",
Expand Down Expand Up @@ -1003,7 +1003,6 @@ static int wm0010_spi_remove(struct spi_device *spi)
static struct spi_driver wm0010_spi_driver = {
.driver = {
.name = "wm0010",
.bus = &spi_bus_type,
.owner = THIS_MODULE,
},
.probe = wm0010_spi_probe,
Expand Down
6 changes: 2 additions & 4 deletions sound/soc/codecs/wm5100.c
Original file line number Diff line number Diff line change
Expand Up @@ -2570,13 +2570,11 @@ static int wm5100_i2c_probe(struct i2c_client *i2c,

if (irq_flags & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING))
ret = request_threaded_irq(i2c->irq, NULL,
wm5100_edge_irq,
irq_flags | IRQF_ONESHOT,
wm5100_edge_irq, irq_flags,
"wm5100", wm5100);
else
ret = request_threaded_irq(i2c->irq, NULL, wm5100_irq,
irq_flags | IRQF_ONESHOT,
"wm5100",
irq_flags, "wm5100",
wm5100);

if (ret != 0) {
Expand Down
Loading

0 comments on commit 384ea79

Please sign in to comment.