diff options
author | Margarita Olaya <magi@slimlogic.co.uk> | 2011-06-09 14:50:13 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-07-31 23:28:22 +0200 |
commit | d49a0f3f14a763242b71244019d7881ee06e0658 (patch) | |
tree | fb268d0961fb012c480b8a7557b067a1f40a6753 /drivers/mfd/tps65912-core.c | |
parent | 36e52873c6393b569f2befcdd1847929211892b8 (diff) |
tps65912: irq: add interrupt controller
This module controls the interrupt handling for the tps65912.
The interrupt sources can be the following:
- GPIO
- PWRON signal
- PWRHOLD signal
- Temperature detection
Signed-off-by: Margarita Olaya Cabrera <magi@slimlogic.co.uk>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/tps65912-core.c')
-rw-r--r-- | drivers/mfd/tps65912-core.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/mfd/tps65912-core.c b/drivers/mfd/tps65912-core.c index 10baf765554..955bc00e4b2 100644 --- a/drivers/mfd/tps65912-core.c +++ b/drivers/mfd/tps65912-core.c @@ -124,8 +124,16 @@ EXPORT_SYMBOL_GPL(tps65912_reg_write); int tps65912_device_init(struct tps65912 *tps65912) { struct tps65912_board *pmic_plat_data = tps65912->dev->platform_data; + struct tps65912_platform_data *init_data; int ret, dcdc_avs, value; + init_data = kzalloc(sizeof(struct tps65912_platform_data), GFP_KERNEL); + if (init_data == NULL) + return -ENOMEM; + + init_data->irq = pmic_plat_data->irq; + init_data->irq_base = pmic_plat_data->irq; + mutex_init(&tps65912->io_mutex); dev_set_drvdata(tps65912->dev, tps65912); @@ -145,9 +153,14 @@ int tps65912_device_init(struct tps65912 *tps65912) if (ret < 0) goto err; + ret = tps65912_irq_init(tps65912, init_data->irq, init_data); + if (ret < 0) + goto err; + return ret; err: + kfree(init_data); mfd_remove_devices(tps65912->dev); kfree(tps65912); return ret; |