mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com>
To: <support.opensource@diasemi.com>, <sameo@linux.intel.com>,
	<lee.jones@linaro.org>, <lgirdwood@gmail.com>,
	<broonie@kernel.org>, <linux-kernel@vger.kernel.org>
Cc: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com>
Subject: [PATCH v2 2/2] regulator: da9063: Do not transform local IRQ to virtual
Date: Fri, 21 Nov 2014 18:29:08 +0300	[thread overview]
Message-ID: <1416583748-6622-3-git-send-email-d.lavnikevich@sam-solutions.com> (raw)
In-Reply-To: <1416583748-6622-1-git-send-email-d.lavnikevich@sam-solutions.com>

Call platform_get_irq_byname() already returns VIRQ instead of local
IRQ. Passing this value to regmap_irq_get_virq() causes error which
results in IRQ registration failure. This patch fixes such behaviour.

Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com>
---
 drivers/regulator/da9063-regulator.c | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/drivers/regulator/da9063-regulator.c b/drivers/regulator/da9063-regulator.c
index 7c9461d..37dd427 100644
--- a/drivers/regulator/da9063-regulator.c
+++ b/drivers/regulator/da9063-regulator.c
@@ -867,17 +867,14 @@ static int da9063_regulator_probe(struct platform_device *pdev)
 		return irq;
 	}
 
-	regulators->irq_ldo_lim = regmap_irq_get_virq(da9063->regmap_irq, irq);
-	if (regulators->irq_ldo_lim >= 0) {
-		ret = request_threaded_irq(regulators->irq_ldo_lim,
-					   NULL, da9063_ldo_lim_event,
-					   IRQF_TRIGGER_LOW | IRQF_ONESHOT,
-					   "LDO_LIM", regulators);
-		if (ret) {
-			dev_err(&pdev->dev,
-					"Failed to request LDO_LIM IRQ.\n");
-			regulators->irq_ldo_lim = -ENXIO;
-		}
+	ret = request_threaded_irq(irq,
+				NULL, da9063_ldo_lim_event,
+				IRQF_TRIGGER_LOW | IRQF_ONESHOT,
+				"LDO_LIM", regulators);
+	if (ret) {
+		dev_err(&pdev->dev,
+				"Failed to request LDO_LIM IRQ.\n");
+		regulators->irq_ldo_lim = -ENXIO;
 	}
 
 	return 0;
-- 
2.1.3


  parent reply	other threads:[~2014-11-21 15:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-21 15:29 [PATCH v2 0/2] mfd: da9063: Register device with proper irq_base Dmitry Lavnikevich
2014-11-21 15:29 ` [PATCH v2 1/2] mfd: da9063: Get irq base dynamically before registering device Dmitry Lavnikevich
2014-11-24 10:07   ` Lee Jones
2014-11-21 15:29 ` Dmitry Lavnikevich [this message]
2014-11-21 18:14   ` [PATCH v2 2/2] regulator: da9063: Do not transform local IRQ to virtual Mark Brown
2014-11-24  8:45     ` Opensource [Steve Twiss]

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=1416583748-6622-3-git-send-email-d.lavnikevich@sam-solutions.com \
    --to=d.lavnikevich@sam-solutions.com \
    --cc=broonie@kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=support.opensource@diasemi.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

all inboxes | Powered by JetHome®