From patchwork Wed Jun 19 05:57:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "J, KEERTHY" X-Patchwork-Id: 2747181 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A1D59C0AB1 for ; Wed, 19 Jun 2013 05:59:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E4E6D2020C for ; Wed, 19 Jun 2013 05:59:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 02CBA20203 for ; Wed, 19 Jun 2013 05:59:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756488Ab3FSF6q (ORCPT ); Wed, 19 Jun 2013 01:58:46 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:59515 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756484Ab3FSF6o (ORCPT ); Wed, 19 Jun 2013 01:58:44 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id r5J5wRSv007258; Wed, 19 Jun 2013 00:58:27 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r5J5wR0q008250; Wed, 19 Jun 2013 00:58:27 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.2.342.3; Wed, 19 Jun 2013 00:58:27 -0500 Received: from localhost.localdomain (a0393675-desktop.apr.dhcp.ti.com [172.24.145.247]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r5J5wDCg029300; Wed, 19 Jun 2013 00:58:24 -0500 From: Keerthy To: CC: , , , , , , , , , Subject: [PATCH v3 1/4] MFD: Palmas: Check if irq is valid Date: Wed, 19 Jun 2013 11:27:47 +0530 Message-ID: <1371621470-22279-2-git-send-email-j-keerthy@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1371621470-22279-1-git-send-email-j-keerthy@ti.com> References: <1371621470-22279-1-git-send-email-j-keerthy@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: J Keerthy 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 Reviewed-by: Mark Brown Reviewed-by: Stephen Warren --- 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);