Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182903
b: refs/heads/master
c: d62abe5
h: refs/heads/master
i:
  182901: 2b9e52b
  182899: 73ca98a
  182895: 6bca1d1
v: v3
  • Loading branch information
Misael Lopez Cruz authored and Mark Brown committed Feb 24, 2010
1 parent 9160c00 commit 4e2c4bc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 47fc9a0a808f23b7b305f6c018e4882118b88d92
refs/heads/master: d62abe563fa4718e7f85f3e871655434db92366d
18 changes: 15 additions & 3 deletions trunk/drivers/mfd/twl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@
#define twl_has_watchdog() false
#endif

#if defined(CONFIG_TWL4030_CODEC) || defined(CONFIG_TWL4030_CODEC_MODULE)
#if defined(CONFIG_TWL4030_CODEC) || defined(CONFIG_TWL4030_CODEC_MODULE) ||\
defined(CONFIG_SND_SOC_TWL6030) || defined(CONFIG_SND_SOC_TWL6030_MODULE)
#define twl_has_codec() true
#else
#define twl_has_codec() false
Expand Down Expand Up @@ -711,8 +712,19 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
return PTR_ERR(child);
}

if (twl_has_codec() && pdata->codec) {
child = add_child(1, "twl4030_codec",
if (twl_has_codec() && pdata->codec && twl_class_is_4030()) {
sub_chip_id = twl_map[TWL_MODULE_AUDIO_VOICE].sid;
child = add_child(sub_chip_id, "twl4030_codec",
pdata->codec, sizeof(*pdata->codec),
false, 0, 0);
if (IS_ERR(child))
return PTR_ERR(child);
}

/* Phoenix*/
if (twl_has_codec() && pdata->codec && twl_class_is_6030()) {
sub_chip_id = twl_map[TWL_MODULE_AUDIO_VOICE].sid;
child = add_child(sub_chip_id, "twl6030_codec",
pdata->codec, sizeof(*pdata->codec),
false, 0, 0);
if (IS_ERR(child))
Expand Down
4 changes: 4 additions & 0 deletions trunk/include/linux/i2c/twl.h
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,10 @@ struct twl4030_codec_data {
unsigned int audio_mclk;
struct twl4030_codec_audio_data *audio;
struct twl4030_codec_vibra_data *vibra;

/* twl6030 */
int audpwron_gpio; /* audio power-on gpio */
int naudint_irq; /* audio interrupt */
};

struct twl4030_platform_data {
Expand Down

0 comments on commit 4e2c4bc

Please sign in to comment.