From patchwork Wed Aug 22 20:41:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 144856 Delivered-To: patch@linaro.org Received: by 2002:a2e:164a:0:0:0:0:0 with SMTP id 10-v6csp401583ljw; Wed, 22 Aug 2018 13:41:34 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzVc7mhw32VEWC7EP8C96NtXCfOgBlGJh79PXJGVaLw0ShADS+zp4AWdR+MEHUYJFmgPdkt X-Received: by 2002:a65:5307:: with SMTP id m7-v6mr50759100pgq.431.1534970494172; Wed, 22 Aug 2018 13:41:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534970494; cv=none; d=google.com; s=arc-20160816; b=wnkvOPGdpJhulJUSTkvZYBGX9lkB9TpJLTj8sFWpfJ366dqEkW/hn/nL6RkWuetjZD qe/Jg2q9ToM1GkZzXjIuzLTq41/4QDidmXC1hfKuXPR6R86Q1dKIbOzxUGrtSnCpbie3 zWF0/ao1bZXgZlbB7Am3X8664AhSdKzlno+dilu/qiVLTrDczCf5bdH4fD8qZsQYI3n3 K3G4OXxusRLhkKOyWos1GxVyabudWsUh/fj3L2wpPirKhnJgkf51UGg2W/nSVxyfJXHC F9XujPPFPZSuClxyFOh8O1jQbzTRTrn9FGF8DquqyN+UI9VwWpr7yf8xTFkNsQQOk5Sg PaFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=KhRH1Uj6E5YD9xU+yQMHc2pspnoZe4NMLGmDDUJ+OXs=; b=gL2KSsuVFKitmRg/p49Cmu8tXHyOIED6SKM7mpn4IFMQv4LNDzVneTnQNuOsJTkwzu YzPog+b93CWdQtQ6DJSbes2a+hdP+cIdJb496z8tTW7ACFwSLc2g9SnHtRX+lC1LWweh kvwxGrRRuEudNMRjZBLV/xcdIGAralujaKaBm2ivbXg9+lClWY+pzegpZq3mcVnJhtc8 BriW1uW27qOWSizcJhRwhcU43paC/NH56wjSKO1Z0HX9wC2fX5cHHPZT7McPOIHAbfOk HHvTehARd6S9WTbmcZfUHc9YPFaN34iwDrsPO2Dnao7Hc3kgghc9DfdtK8i1oYs6Bzgl wq6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MiSkPQaA; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t23-v6si2559068pgi.301.2018.08.22.13.41.33; Wed, 22 Aug 2018 13:41:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MiSkPQaA; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727331AbeHWAH4 (ORCPT + 5 others); Wed, 22 Aug 2018 20:07:56 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:34232 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727395AbeHWAH4 (ORCPT ); Wed, 22 Aug 2018 20:07:56 -0400 Received: by mail-lf1-f68.google.com with SMTP id g9-v6so2411650lfh.1 for ; Wed, 22 Aug 2018 13:41:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KhRH1Uj6E5YD9xU+yQMHc2pspnoZe4NMLGmDDUJ+OXs=; b=MiSkPQaA+atC4Mru5wddwetAqLpTOK2b1KErUlne2CbAQXVqoA0Q1naKuDFUpbcbB1 feVMj6P8Vz1rW1jBcSCLdNNHrSOK6PqXNkmVvLK3kr6EMne4f1Nhsg5P9uySAzrV7rSM OcLo8856LXJgZE0b+xlXLUySExAsb9vBQ+BVs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KhRH1Uj6E5YD9xU+yQMHc2pspnoZe4NMLGmDDUJ+OXs=; b=nrQ/3MaNm3QbuC72y89Ppsfh1L7j9pA+miMzBUnjm+3JpGlcBCHz5PerMDoszmjrCM 8DcCoulrlEeJ2M7bK5Awv0xq79HUh2fkvouH4L3yFB2oZvyxV7C7c+TcU3GMOFJzAXzP 5gtuDixrvO5DuwVLOZCrmoM6Q6DLZr0ZSC898lpsU2vlosckC7uEzhF3KJPfA/4GWVcX EHAgDUPikX4SRXtdxU4vfh0JUaw+9W/3EZmOqkDkJcg45D56eTltpncIZjoR5+Dd2Ofp jGHPhMl33g/VKDz0h3H8/G6bHxUaSmP2PjnFTWh72EZpd8j87730U3npApQWY2DW9QZH MIvQ== X-Gm-Message-State: APzg51B/GRBEh88Ox6RhFtokcpfKYjRhyi/bWb+pBUoD6YxG2L/iVPrK dVtrhqU8HufpFFGSj8bSjUYPdFXcPy/yWQ== X-Received: by 2002:a19:96c3:: with SMTP id y186-v6mr5208479lfd.91.1534970491538; Wed, 22 Aug 2018 13:41:31 -0700 (PDT) Received: from localhost.bredbandsbolaget (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id q128-v6sm431515ljq.72.2018.08.22.13.41.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Aug 2018 13:41:30 -0700 (PDT) From: Linus Walleij To: H Hartley Sweeten , Alexander Sverdlin Cc: linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, Linus Walleij Subject: [PATCH 05/11] gpio: ep93xx: Rename has_debounce to has_irq Date: Wed, 22 Aug 2018 22:41:05 +0200 Message-Id: <20180822204111.9581-6-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180822204111.9581-1-linus.walleij@linaro.org> References: <20180822204111.9581-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This is closer to what the variable (per bank) actually means. We have the .gpio_to_irq() hook registered only when this is true. Signed-off-by: Linus Walleij --- drivers/gpio/gpio-ep93xx.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) -- 2.17.1 diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c index 379f2573f794..a81d1e796912 100644 --- a/drivers/gpio/gpio-ep93xx.c +++ b/drivers/gpio/gpio-ep93xx.c @@ -297,25 +297,25 @@ struct ep93xx_gpio_bank { int data; int dir; int base; - bool has_debounce; + bool has_irq; }; -#define EP93XX_GPIO_BANK(_label, _data, _dir, _base, _debounce) \ +#define EP93XX_GPIO_BANK(_label, _data, _dir, _base, _has_irq) \ { \ .label = _label, \ .data = _data, \ .dir = _dir, \ .base = _base, \ - .has_debounce = _debounce, \ + .has_irq = _has_irq, \ } static struct ep93xx_gpio_bank ep93xx_gpio_banks[] = { - EP93XX_GPIO_BANK("A", 0x00, 0x10, 0, true), - EP93XX_GPIO_BANK("B", 0x04, 0x14, 8, true), + EP93XX_GPIO_BANK("A", 0x00, 0x10, 0, true), /* Bank A has 8 IRQs */ + EP93XX_GPIO_BANK("B", 0x04, 0x14, 8, true), /* Bank B has 8 IRQs */ EP93XX_GPIO_BANK("C", 0x08, 0x18, 40, false), EP93XX_GPIO_BANK("D", 0x0c, 0x1c, 24, false), EP93XX_GPIO_BANK("E", 0x20, 0x24, 32, false), - EP93XX_GPIO_BANK("F", 0x30, 0x34, 16, true), + EP93XX_GPIO_BANK("F", 0x30, 0x34, 16, true), /* Bank F has 8 IRQs */ EP93XX_GPIO_BANK("G", 0x38, 0x3c, 48, false), EP93XX_GPIO_BANK("H", 0x40, 0x44, 56, false), }; @@ -370,7 +370,7 @@ static int ep93xx_gpio_add_bank(struct gpio_chip *gc, struct device *dev, gc->label = bank->label; gc->base = bank->base; - if (bank->has_debounce) { + if (bank->has_irq) { gc->set_config = ep93xx_gpio_set_config; gc->to_irq = ep93xx_gpio_to_irq; }