Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752704AbdFNXVT (ORCPT ); Wed, 14 Jun 2017 19:21:19 -0400 Received: from mga09.intel.com ([134.134.136.24]:24245 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752121AbdFNXVR (ORCPT ); Wed, 14 Jun 2017 19:21:17 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,341,1493708400"; d="scan'208";a="980974652" From: sathyanarayanan.kuppuswamy@linux.intel.com To: linus.walleij@linaro.org Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, sathyaosid@gmail.com, Kuppuswamy Sathyanarayanan Subject: [PATCH v1 1/1] gpio: gpio-crystalcove: Skip IRQ CTRL register update for virtual GPIOs Date: Wed, 14 Jun 2017 16:21:14 -0700 Message-Id: <5fabde8f9366fce42b5f361f3472bc91754ca7db.1497482431.git.sathyanarayanan.kuppuswamy@linux.intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 941 Lines: 28 From: Kuppuswamy Sathyanarayanan Commit 9a752b4c9ab9 ("gpio: crystalcove: Do not write regular gpio registers for virtual GPIOs") added support to skip GPIO register update for virtual GPIOs, but it missed to add skip logic in crystalcove_update_irq_ctrl() function. This patch fixes it. Signed-off-by: Kuppuswamy Sathyanarayanan --- drivers/gpio/gpio-crystalcove.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpio/gpio-crystalcove.c b/drivers/gpio/gpio-crystalcove.c index e60156e..edc9aa8 100644 --- a/drivers/gpio/gpio-crystalcove.c +++ b/drivers/gpio/gpio-crystalcove.c @@ -134,6 +134,9 @@ static void crystalcove_update_irq_ctrl(struct crystalcove_gpio *cg, int gpio) { int reg = to_reg(gpio, CTRL_IN); + if (reg < 0) + return; + regmap_update_bits(cg->regmap, reg, CTLI_INTCNT_BE, cg->intcnt_value); } -- 2.7.4