Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752427AbdFOJTt (ORCPT ); Thu, 15 Jun 2017 05:19:49 -0400 Received: from mail-qt0-f196.google.com ([209.85.216.196]:34394 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750830AbdFOJTr (ORCPT ); Thu, 15 Jun 2017 05:19:47 -0400 MIME-Version: 1.0 In-Reply-To: <5fabde8f9366fce42b5f361f3472bc91754ca7db.1497482431.git.sathyanarayanan.kuppuswamy@linux.intel.com> References: <5fabde8f9366fce42b5f361f3472bc91754ca7db.1497482431.git.sathyanarayanan.kuppuswamy@linux.intel.com> From: Andy Shevchenko Date: Thu, 15 Jun 2017 12:19:46 +0300 Message-ID: Subject: Re: [PATCH v1 1/1] gpio: gpio-crystalcove: Skip IRQ CTRL register update for virtual GPIOs To: Kuppuswamy Sathyanarayanan Cc: Linus Walleij , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Sathyanarayanan Kuppuswamy Natarajan Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 836 Lines: 24 On Thu, Jun 15, 2017 at 2:21 AM, wrote: > 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. > @@ -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); > } Shouldn't it have been done using irq_valid_mask flag in the first place? -- With Best Regards, Andy Shevchenko