diff mbox

[v3,1/4] MFD: Palmas: Check if irq is valid

Message ID 1371621470-22279-2-git-send-email-j-keerthy@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

J, KEERTHY June 19, 2013, 5:57 a.m. UTC
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(-)

Comments

Mark Brown June 19, 2013, 4:42 p.m. UTC | #1
On Wed, Jun 19, 2013 at 11:27:47AM +0530, Keerthy wrote:
> 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>

Reviewed-by: Mark Brown <broonie@linaro.org>
Stephen Warren June 19, 2013, 5:08 p.m. UTC | #2
On 06/18/2013 11:57 PM, Keerthy wrote:
> 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.

Reviewed-by: Stephen Warren <swarren@nvidia.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
J, KEERTHY June 20, 2013, 4:16 a.m. UTC | #3
> -----Original Message-----
> From: Mark Brown [mailto:broonie@kernel.org]
> Sent: Wednesday, June 19, 2013 10:13 PM
> To: J, KEERTHY
> Cc: linux-omap@vger.kernel.org; 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: Re: [PATCH v3 1/4] MFD: Palmas: Check if irq is valid
> 
> On Wed, Jun 19, 2013 at 11:27:47AM +0530, Keerthy wrote:
> > 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>
> 
> Reviewed-by: Mark Brown <broonie@linaro.org>

Thanks Mark.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
J, KEERTHY June 20, 2013, 4:19 a.m. UTC | #4
> -----Original Message-----
> From: Stephen Warren [mailto:swarren@wwwdotorg.org]
> Sent: Wednesday, June 19, 2013 10:39 PM
> To: J, KEERTHY
> Cc: linux-omap@vger.kernel.org; broonie@kernel.org;
> 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: Re: [PATCH v3 1/4] MFD: Palmas: Check if irq is valid
> 
> On 06/18/2013 11:57 PM, Keerthy wrote:
> > 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.
> 
> Reviewed-by: Stephen Warren <swarren@nvidia.com>

Thanks Stephen.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
J, KEERTHY June 20, 2013, 4:25 a.m. UTC | #5
Hi Samuel,

> -----Original Message-----
> From: Stephen Warren [mailto:swarren@wwwdotorg.org]
> Sent: Wednesday, June 19, 2013 10:39 PM
> To: J, KEERTHY
> Cc: linux-omap@vger.kernel.org; broonie@kernel.org;
> 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: Re: [PATCH v3 1/4] MFD: Palmas: Check if irq is valid
> 
> On 06/18/2013 11:57 PM, Keerthy wrote:
> > 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.
> 
> Reviewed-by: Stephen Warren <swarren@nvidia.com>

Could you please pull this?

Kind Regards,
Keerthy
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Lee Jones July 11, 2013, 11:25 a.m. UTC | #6
On Wed, 19 Jun 2013, Keerthy wrote:

> 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(-)

Applied with Stephen and Mark's RB.
Lee Jones July 11, 2013, 11:27 a.m. UTC | #7
On Thu, 11 Jul 2013, Lee Jones wrote:

> On Wed, 19 Jun 2013, Keerthy wrote:
> 
> > 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(-)
> 
> Applied with Stephen and Mark's RB.

Scrap that, it appears to be applied already.
diff mbox

Patch

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);