[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1309857266-3663-2-git-send-email-peter.ujfalusi@ti.com>
Date: Tue, 5 Jul 2011 12:14:22 +0300
From: Peter Ujfalusi <peter.ujfalusi@...com>
To: Liam Girdwood <lrg@...com>, Tony Lindgren <tony@...mide.com>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
Samuel Ortiz <sameo@...ux.intel.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>
CC: linux-kernel@...r.kernel.org, alsa-devel@...a-project.org,
Misael Lopez Cruz <misael.lopez@...com>,
Felipe Balbi <balbi@...com>
Subject: [PATCH 1/5] MFD: twl6040: Add irq variable for slave devices
Add new variable to pass the irq number for the slaves
devices of twl6040.
The irq number configuration is done in the twl6040-core
at probe time, so machine drivers do not need to be
modified.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@...com>
---
drivers/mfd/twl6040-core.c | 2 ++
include/linux/i2c/twl.h | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/mfd/twl6040-core.c b/drivers/mfd/twl6040-core.c
index cfaedb5..8607793 100644
--- a/drivers/mfd/twl6040-core.c
+++ b/drivers/mfd/twl6040-core.c
@@ -501,6 +501,7 @@ static int __devinit twl6040_probe(struct platform_device *pdev)
if (pdata->codec) {
cell = &twl6040->cells[children];
cell->name = "twl6040-codec";
+ pdata->codec->plug_irq = twl6040->irq_base + TWL6040_IRQ_PLUG;
cell->platform_data = pdata->codec;
cell->pdata_size = sizeof(*pdata->codec);
children++;
@@ -509,6 +510,7 @@ static int __devinit twl6040_probe(struct platform_device *pdev)
if (pdata->vibra) {
cell = &twl6040->cells[children];
cell->name = "twl6040-vibra";
+ pdata->vibra->irq = twl6040->irq_base + TWL6040_IRQ_VIB;
cell->platform_data = pdata->vibra;
cell->pdata_size = sizeof(*pdata->vibra);
children++;
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index 114c0f6..b28963b 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -668,6 +668,7 @@ struct twl4030_codec_data {
u16 hs_right_step;
u16 hf_left_step;
u16 hf_right_step;
+ int plug_irq; /* Plug detect irq for twl6040 */
void (*set_hs_extmute)(int mute);
};
@@ -675,6 +676,7 @@ struct twl4030_vibra_data {
unsigned int coexist;
/* twl6040 */
+ int irq; /* Vibra irq */
unsigned int vibldrv_res; /* left driver resistance */
unsigned int vibrdrv_res; /* right driver resistance */
unsigned int viblmotor_res; /* left motor resistance */
--
1.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists