Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260694
b: refs/heads/master
c: 0f962ae
h: refs/heads/master
v: v3
  • Loading branch information
Peter Ujfalusi committed Jul 7, 2011
1 parent 7e67f04 commit dbf85d4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1a4cdecec7d639ba2891195dc3f5917fb70653db
refs/heads/master: 0f962ae2dd8655f0800ff3c4b02d5f5a2ff3899e
25 changes: 25 additions & 0 deletions trunk/drivers/mfd/twl6040-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,18 @@ unsigned int twl6040_get_sysclk(struct twl6040 *twl6040)
}
EXPORT_SYMBOL(twl6040_get_sysclk);

static struct resource twl6040_vibra_rsrc[] = {
{
.flags = IORESOURCE_IRQ,
},
};

static struct resource twl6040_codec_rsrc[] = {
{
.flags = IORESOURCE_IRQ,
},
};

static int __devinit twl6040_probe(struct platform_device *pdev)
{
struct twl4030_audio_data *pdata = pdev->dev.platform_data;
Expand Down Expand Up @@ -499,16 +511,29 @@ static int __devinit twl6040_probe(struct platform_device *pdev)
twl6040_set_bits(twl6040, TWL6040_REG_ACCCTL, TWL6040_I2CSEL);

if (pdata->codec) {
int irq = twl6040->irq_base + TWL6040_IRQ_PLUG;

cell = &twl6040->cells[children];
cell->name = "twl6040-codec";
twl6040_codec_rsrc[0].start = irq;
twl6040_codec_rsrc[0].end = irq;
cell->resources = twl6040_codec_rsrc;
cell->num_resources = ARRAY_SIZE(twl6040_codec_rsrc);
cell->platform_data = pdata->codec;
cell->pdata_size = sizeof(*pdata->codec);
children++;
}

if (pdata->vibra) {
int irq = twl6040->irq_base + TWL6040_IRQ_VIB;

cell = &twl6040->cells[children];
cell->name = "twl6040-vibra";
twl6040_vibra_rsrc[0].start = irq;
twl6040_vibra_rsrc[0].end = irq;
cell->resources = twl6040_vibra_rsrc;
cell->num_resources = ARRAY_SIZE(twl6040_vibra_rsrc);

cell->platform_data = pdata->vibra;
cell->pdata_size = sizeof(*pdata->vibra);
children++;
Expand Down

0 comments on commit dbf85d4

Please sign in to comment.