From: Fabio Estevam <festevam@gmail.com>
To: sameo@linux.intel.com
Cc: broonie@opensource.wolfsonmicro.com, marex@denx.de,
ashish.jangam@kpitcummins.com, dchen@diasemi.com,
linux-kernel@vger.kernel.org,
Fabio Estevam <fabio.estevam@freescale.com>
Subject: [PATCH] mfd: da9052-core: Fix request_threaded_irq() parameter
Date: Thu, 27 Sep 2012 00:55:35 -0300 [thread overview]
Message-ID: <1348718135-10300-1-git-send-email-festevam@gmail.com> (raw)
From: Fabio Estevam <fabio.estevam@freescale.com>
On a mx53qsb dt-kernel the da9052-core driver fails to probe:
da9052 1-0048: DA9052 ADC IRQ failed ret=-22
In request_threaded_irq() the first parameter is missing the da9052->irq_base.
Fix it and avoid the error.
Also define 'DA9052_IRQF' for improving readability.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/mfd/da9052-core.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/mfd/da9052-core.c b/drivers/mfd/da9052-core.c
index a0a62b2..a3450d2 100644
--- a/drivers/mfd/da9052-core.c
+++ b/drivers/mfd/da9052-core.c
@@ -33,6 +33,7 @@
#define DA9052_IRQ_MASK_POS_6 0x20
#define DA9052_IRQ_MASK_POS_7 0x40
#define DA9052_IRQ_MASK_POS_8 0x80
+#define DA9052_IRQF (IRQF_TRIGGER_LOW | IRQF_ONESHOT)
static bool da9052_reg_readable(struct device *dev, unsigned int reg)
{
@@ -788,16 +789,15 @@ int __devinit da9052_device_init(struct da9052 *da9052, u8 chip_id)
da9052->irq_base = pdata->irq_base;
ret = regmap_add_irq_chip(da9052->regmap, da9052->chip_irq,
- IRQF_TRIGGER_LOW | IRQF_ONESHOT,
- da9052->irq_base, &da9052_regmap_irq_chip,
- &da9052->irq_data);
+ DA9052_IRQF, da9052->irq_base,
+ &da9052_regmap_irq_chip, &da9052->irq_data);
if (ret < 0)
goto regmap_err;
da9052->irq_base = regmap_irq_chip_get_base(da9052->irq_data);
- ret = request_threaded_irq(DA9052_IRQ_ADC_EOM, NULL, da9052_auxadc_irq,
- IRQF_TRIGGER_LOW | IRQF_ONESHOT,
+ ret = request_threaded_irq(da9052->irq_base + DA9052_IRQ_ADC_EOM, NULL,
+ da9052_auxadc_irq, DA9052_IRQF,
"adc irq", da9052);
if (ret != 0)
dev_err(da9052->dev, "DA9052 ADC IRQ failed ret=%d\n", ret);
--
1.7.9.5
next reply other threads:[~2012-09-27 3:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-27 3:55 Fabio Estevam [this message]
2012-09-27 13:21 ` [PATCH] mfd: da9052-core: Fix request_threaded_irq() parameter Marek Vasut
2012-09-27 14:08 ` Mark Brown
2012-09-27 14:34 ` Arnd Bergmann
2012-09-27 16:13 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1348718135-10300-1-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=ashish.jangam@kpitcummins.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dchen@diasemi.com \
--cc=fabio.estevam@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marex@denx.de \
--cc=sameo@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox