devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Keerthy <j-keerthy@ti.com>
To: linux-omap@vger.kernel.org
Cc: broonie@kernel.org, j-keerthy@ti.com, ldewangan@nvidia.com,
	sameo@linux.intel.com, grant.likely@secretlab.ca,
	swarren@nvidia.com, linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
	gg@slimlogic.co.uk
Subject: [PATCH v3 1/4] MFD: Palmas: Check if irq is valid
Date: Wed, 19 Jun 2013 11:27:47 +0530	[thread overview]
Message-ID: <1371621470-22279-2-git-send-email-j-keerthy@ti.com> (raw)
In-Reply-To: <1371621470-22279-1-git-send-email-j-keerthy@ti.com>

From: J Keerthy <j-keerthy@ti.com>

Check if irq value obtained is valid. If it is not valid
then skip the irq request step and go ahead with the probe.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
---
 drivers/mfd/palmas.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
index 62fa728..b24bee3 100644
--- a/drivers/mfd/palmas.c
+++ b/drivers/mfd/palmas.c
@@ -290,6 +290,11 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
 		}
 	}
 
+	if (!palmas->irq) {
+		dev_warn(palmas->dev, "IRQ missing: skipping irq request\n");
+		goto no_irq;
+	}
+
 	/* Change interrupt line output polarity */
 	if (pdata->irq_flags & IRQ_TYPE_LEVEL_HIGH)
 		reg = PALMAS_POLARITY_CTRL_INT_POLARITY;
@@ -316,6 +321,7 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
 	if (ret < 0)
 		goto err;
 
+no_irq:
 	slave = PALMAS_BASE_TO_SLAVE(PALMAS_PU_PD_OD_BASE);
 	addr = PALMAS_BASE_TO_REG(PALMAS_PU_PD_OD_BASE,
 			PALMAS_PRIMARY_SECONDARY_PAD1);
-- 
1.7.5.4

  reply	other threads:[~2013-06-19  5:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19  5:57 [PATCH v3 0/4] MFD: Palmas: Add TPS659038 PMIC support on Palmas Keerthy
2013-06-19  5:57 ` Keerthy [this message]
     [not found]   ` <1371621470-22279-2-git-send-email-j-keerthy-l0cyMroinI0@public.gmane.org>
2013-06-19 16:42     ` [PATCH v3 1/4] MFD: Palmas: Check if irq is valid Mark Brown
2013-06-20  4:16       ` J, KEERTHY
2013-06-19 17:08   ` Stephen Warren
2013-06-20  4:19     ` J, KEERTHY
2013-06-20  4:25     ` J, KEERTHY
2013-07-11 11:25   ` Lee Jones
2013-07-11 11:27     ` Lee Jones
2013-06-19  5:57 ` [PATCH v3 2/4] MFD: Palmas: Add SMPS10_BOOST feature Keerthy
2013-06-20  4:34   ` J, KEERTHY
2013-06-20  9:07     ` Samuel Ortiz
2013-06-20  9:13       ` J, KEERTHY
     [not found]         ` <DC88CAD03C0052499C1907B327FC63229ECDCE-yXqyApvAXouIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2013-06-20  9:27           ` Samuel Ortiz
2013-06-20  9:28             ` J, KEERTHY
2013-06-19  5:57 ` [PATCH v3 3/4] mfd: Palmas: Add TPS659038 PMIC support Keerthy
2013-06-20  8:41   ` Samuel Ortiz
2013-06-19  5:57 ` [PATCH v3 4/4] regulator: Palmas: Add TPS659038 support Keerthy
     [not found]   ` <1371621470-22279-5-git-send-email-j-keerthy-l0cyMroinI0@public.gmane.org>
2013-06-19 16:42     ` Mark Brown
2013-06-20  4:19       ` J, KEERTHY
2013-06-20  8:39 ` [PATCH v3 0/4] MFD: Palmas: Add TPS659038 PMIC support on Palmas Samuel Ortiz
2013-06-20  8:41   ` J, KEERTHY

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=1371621470-22279-2-git-send-email-j-keerthy@ti.com \
    --to=j-keerthy@ti.com \
    --cc=broonie@kernel.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=gg@slimlogic.co.uk \
    --cc=grant.likely@secretlab.ca \
    --cc=ldewangan@nvidia.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=swarren@nvidia.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;
as well as URLs for NNTP newsgroup(s).