From patchwork Thu Sep 16 11:19:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 512922 Delivered-To: patch@linaro.org Received: by 2002:a17:906:f46:0:0:0:0 with SMTP id h6csp1057082ejj; Thu, 16 Sep 2021 04:19:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUWzofU02gVdczhVZo6sGHp1+PGapqsWNtjcqcFn222bnyWhO2sVZcJPO+1dSGw61e0esP X-Received: by 2002:a5e:8349:: with SMTP id y9mr3834514iom.34.1631791189962; Thu, 16 Sep 2021 04:19:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631791189; cv=none; d=google.com; s=arc-20160816; b=Kt+G8x7rXGaCqI31u6jDTKH9yNPm04shUKplNuyzAUZpBlX/SS1PYtdGgOCkX3nfVF qPdJjGCkpJYnSJzsSDW3600a7sj8wObATwQROkK8W2VvgXXy6yfJPcz7k5kKLDtsdCl1 KTolLMhZU2X7/2dYASQMmMw4QXLglbVWn+xLbPaWtJIOl5ziZ0Q2S38T0x/HCkbyPgsQ HE+uKE4y8lXXE4auiO42a9vnneDcLCX9Zlr/K5EuxYOtzTP6YpRb5kOQ8AcrPvg3fhD9 M/6EejnxB1RjXyU9cuACu7CvWF1mn7I/Epfgmts/QE8jfyC74pXDXW7xwc6TivQJe5UM zcZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=yeeNQyPhdhgxT+fMbmZ7/ysufjKkJyN6F37GnY1eL10=; b=E5LBwgFADid4L/C1SGzkmj8WL1UJ/Sxb6HfcTg8C2LAwVuV5Edmyz02hqPosipadYi qOf0krvLd42N12tXGTZ/kVcCVC7mYvz2oMLkeBOF8RHHk97FM+3jYzhr9qEutvGxsJ5m tnpZxmVsZxymINkx9NbQOQjgVq7c5B4Kq65lJsUDLddpwVVBCz5wDnIHDKE4Di9g5oN5 88ogDbHRjyYF1h9rk9l727mZ6hLA27pGc2dFjqa4xSe8Yd4iZ/a340mHM79xErAt1qIf BEiL/z8iI1UgWSpjG9QiI6vp1dE/jyDPuyBw7phm7cLzSVS5Q406TjH5HL4HVnUXPc9D 0zrw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h17si2498741ilq.30.2021.09.16.04.19.49; Thu, 16 Sep 2021 04:19:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237588AbhIPLVJ (ORCPT + 3 others); Thu, 16 Sep 2021 07:21:09 -0400 Received: from mx.socionext.com ([202.248.49.38]:27922 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237064AbhIPLVI (ORCPT ); Thu, 16 Sep 2021 07:21:08 -0400 Received: from unknown (HELO kinkan2-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 16 Sep 2021 20:19:47 +0900 Received: from mail.mfilter.local (m-filter-1 [10.213.24.61]) by kinkan2-ex.css.socionext.com (Postfix) with ESMTP id C24852059034; Thu, 16 Sep 2021 20:19:47 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Thu, 16 Sep 2021 20:19:47 +0900 Received: from plum.e01.socionext.com (unknown [10.212.243.119]) by kinkan2.css.socionext.com (Postfix) with ESMTP id 847F0AB192; Thu, 16 Sep 2021 20:19:47 +0900 (JST) From: Kunihiko Hayashi To: Linus Walleij , Bartosz Golaszewski , Masami Hiramatsu Cc: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Kunihiko Hayashi Subject: [PATCH 1/3] gpio: uniphier: Fix void functions to remove return value Date: Thu, 16 Sep 2021 20:19:35 +0900 Message-Id: <1631791177-27229-2-git-send-email-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1631791177-27229-1-git-send-email-hayashi.kunihiko@socionext.com> References: <1631791177-27229-1-git-send-email-hayashi.kunihiko@socionext.com> Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The return type of irq_chip.irq_mask() and irq_chip.irq_unmask() should be void. Fixes: dbe776c2ca54 ("gpio: uniphier: add UniPhier GPIO controller driver") Signed-off-by: Kunihiko Hayashi --- drivers/gpio/gpio-uniphier.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/gpio/gpio-uniphier.c b/drivers/gpio/gpio-uniphier.c index f99f3c1..39dca14 100644 --- a/drivers/gpio/gpio-uniphier.c +++ b/drivers/gpio/gpio-uniphier.c @@ -184,7 +184,7 @@ static void uniphier_gpio_irq_mask(struct irq_data *data) uniphier_gpio_reg_update(priv, UNIPHIER_GPIO_IRQ_EN, mask, 0); - return irq_chip_mask_parent(data); + irq_chip_mask_parent(data); } static void uniphier_gpio_irq_unmask(struct irq_data *data) @@ -194,7 +194,7 @@ static void uniphier_gpio_irq_unmask(struct irq_data *data) uniphier_gpio_reg_update(priv, UNIPHIER_GPIO_IRQ_EN, mask, mask); - return irq_chip_unmask_parent(data); + irq_chip_unmask_parent(data); } static int uniphier_gpio_irq_set_type(struct irq_data *data, unsigned int type) From patchwork Thu Sep 16 11:19:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 512924 Delivered-To: patch@linaro.org Received: by 2002:a17:906:f46:0:0:0:0 with SMTP id h6csp1057112ejj; Thu, 16 Sep 2021 04:19:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHR90m2tjSueCiTrf4W/MUKe8vYV9PLhIxibW6f19311NcxvJZyTYsTcg6UnfjWqIT/Ptt X-Received: by 2002:a5e:dc0b:: with SMTP id b11mr3782037iok.91.1631791192147; Thu, 16 Sep 2021 04:19:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631791192; cv=none; d=google.com; s=arc-20160816; b=e1r0zszHE0pkrNyGhRmNh0/17hs/QXigPX0GlSHYlsAqwseXNTMaTzwJSXNOg08C+t MUSCLRUbqD8yedMgs0lO6SF/BMpvnyw5Pn/nW12wzbBc4EPsk/1Jd9fJNViwW/vIsGpj OWnHEMJeOiTE6wcBG1SgMvJ93kK3rBbr1g1T1LdiQtR4CXNsPjSwq/wWzumkHeGvMTgj zgiCuoF2HerHbCdWVkpablgYMuS1s8kDHU1j4lSa9F06p+2kXTduck7y6dke78TmGcXE cv9of0BjuzbxuIzQk9HrlVFg+4nLjrvhpfy8hYu1oARgnEN6L8lhsrqazK+3pS9CpL6g fijQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=yldtNHRoa38tfSo9tXxrB/Z/QAlN2Fe93YGjWq8menE=; b=lhF2jNHU9U2On4Ti33YnNdGfqjOWDTJMJXI+T48IguWLfLLqhKyMk9fglf5SOWkyfU aomQmAn2k6QCIPlgcFhl4OQgdUgqJeCbccwwDy2XoBkadGi9siKIXZyW21mUD6llS8er kAL1VLFORycmeWIa+PeBA8hDNfNEDwWKP7jrdZMBchz5+J2Y0Y/7ZeQAPGstaYf+Zigz iOrBKSE80qAUy8hY8FFMoL3Zq/S+Wb5oF2blK6yIBUxqI3hpO481FyxuUbKmc/mtn+cU M8LiTt68+VJOYYM+FaHxq8cqFDo7HpIsnxhdX91vGr4EXdO85P/81eplK0zlgB8NfdIg 8zUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q6si2325950ilv.123.2021.09.16.04.19.51; Thu, 16 Sep 2021 04:19:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237706AbhIPLVK (ORCPT + 3 others); Thu, 16 Sep 2021 07:21:10 -0400 Received: from mx.socionext.com ([202.248.49.38]:27922 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235686AbhIPLVJ (ORCPT ); Thu, 16 Sep 2021 07:21:09 -0400 Received: from unknown (HELO iyokan2-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 16 Sep 2021 20:19:48 +0900 Received: from mail.mfilter.local (m-filter-1 [10.213.24.61]) by iyokan2-ex.css.socionext.com (Postfix) with ESMTP id C9F6D2021820; Thu, 16 Sep 2021 20:19:48 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Thu, 16 Sep 2021 20:19:48 +0900 Received: from plum.e01.socionext.com (unknown [10.212.243.119]) by kinkan2.css.socionext.com (Postfix) with ESMTP id 70B4EAB192; Thu, 16 Sep 2021 20:19:48 +0900 (JST) From: Kunihiko Hayashi To: Linus Walleij , Bartosz Golaszewski , Masami Hiramatsu Cc: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Kunihiko Hayashi Subject: [PATCH 2/3] gpio: uniphier: Use helper function to get IRQ hardware number Date: Thu, 16 Sep 2021 20:19:36 +0900 Message-Id: <1631791177-27229-3-git-send-email-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1631791177-27229-1-git-send-email-hayashi.kunihiko@socionext.com> References: <1631791177-27229-1-git-send-email-hayashi.kunihiko@socionext.com> Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Use helper function to get IRQ hardware number instead of direct access. No functional changes intended. Signed-off-by: Kunihiko Hayashi --- drivers/gpio/gpio-uniphier.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) -- 2.7.4 diff --git a/drivers/gpio/gpio-uniphier.c b/drivers/gpio/gpio-uniphier.c index 39dca14..dca96f5 100644 --- a/drivers/gpio/gpio-uniphier.c +++ b/drivers/gpio/gpio-uniphier.c @@ -180,7 +180,7 @@ static int uniphier_gpio_to_irq(struct gpio_chip *chip, unsigned int offset) static void uniphier_gpio_irq_mask(struct irq_data *data) { struct uniphier_gpio_priv *priv = data->chip_data; - u32 mask = BIT(data->hwirq); + u32 mask = BIT(irqd_to_hwirq(data)); uniphier_gpio_reg_update(priv, UNIPHIER_GPIO_IRQ_EN, mask, 0); @@ -190,7 +190,7 @@ static void uniphier_gpio_irq_mask(struct irq_data *data) static void uniphier_gpio_irq_unmask(struct irq_data *data) { struct uniphier_gpio_priv *priv = data->chip_data; - u32 mask = BIT(data->hwirq); + u32 mask = BIT(irqd_to_hwirq(data)); uniphier_gpio_reg_update(priv, UNIPHIER_GPIO_IRQ_EN, mask, mask); @@ -200,7 +200,7 @@ static void uniphier_gpio_irq_unmask(struct irq_data *data) static int uniphier_gpio_irq_set_type(struct irq_data *data, unsigned int type) { struct uniphier_gpio_priv *priv = data->chip_data; - u32 mask = BIT(data->hwirq); + u32 mask = BIT(irqd_to_hwirq(data)); u32 val = 0; if (type == IRQ_TYPE_EDGE_BOTH) { @@ -297,7 +297,8 @@ static int uniphier_gpio_irq_domain_activate(struct irq_domain *domain, struct uniphier_gpio_priv *priv = domain->host_data; struct gpio_chip *chip = &priv->chip; - return gpiochip_lock_as_irq(chip, data->hwirq + UNIPHIER_GPIO_IRQ_OFFSET); + return gpiochip_lock_as_irq(chip, + irqd_to_hwirq(data) + UNIPHIER_GPIO_IRQ_OFFSET); } static void uniphier_gpio_irq_domain_deactivate(struct irq_domain *domain, @@ -306,7 +307,8 @@ static void uniphier_gpio_irq_domain_deactivate(struct irq_domain *domain, struct uniphier_gpio_priv *priv = domain->host_data; struct gpio_chip *chip = &priv->chip; - gpiochip_unlock_as_irq(chip, data->hwirq + UNIPHIER_GPIO_IRQ_OFFSET); + gpiochip_unlock_as_irq(chip, + irqd_to_hwirq(data) + UNIPHIER_GPIO_IRQ_OFFSET); } static const struct irq_domain_ops uniphier_gpio_irq_domain_ops = { From patchwork Thu Sep 16 11:19:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 512925 Delivered-To: patch@linaro.org Received: by 2002:a17:906:f46:0:0:0:0 with SMTP id h6csp1057130ejj; Thu, 16 Sep 2021 04:19:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJ7zy3bwJg3/FjQkSNNN3h2umVwl8QfbucObtkX2oFWnTufrcYixBFb6sfGXtm+kPvA5DI X-Received: by 2002:a05:6e02:1a6b:: with SMTP id w11mr3591857ilv.21.1631791192960; Thu, 16 Sep 2021 04:19:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631791192; cv=none; d=google.com; s=arc-20160816; b=CIruLGmv7z2vPGSsphgv9EyMbia12UmiYEjVYlMpBRZF2gVtAsBKiFCb6dzeSE843a cohbj6QrbYUnJAvgFKEIeIIrLdjZ5LsFtHbBHyciQVsBtn8KSjwnE3n0wY10G4djW4yN KVGMJ32Cq8OuklG5rHVwvky4ZU+QHHlf6rcGXQeQ+Jm493x5Q/g1bEb8qiEGwz22gbY1 bve+RfSkceDC+zoEsnIE7xOuU/ugIwAGh7Ns1SCRK814rtJNx5OX00l6hnRAc2OYRrgV Kkq3C9lN8rD65yskDQjnc6MbOH8ZZaQ+o/SLAiP9pejXTY7VUbFsJmAG7v/PPdZ3Vazt jipA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=53LFSns4UAh2KxNV8EBIFO5iaKQafPpigh44hqrJrs0=; b=lHElDbr1QEOgXhFuYpPXEH2VYd9KLX8CfzIX0MTKQuNOFmEZcHPuSXcR1Tld3Oy37X RnZVZCdkw4klhUTvJUoYoEBY/JjxbcBfDjzGMt/VWushUkzCOpHTjay7PZrj94AHo4wy t3ATqqwebElVWUt8Y4eItij9E+rXlEqkVvZVO5JiQUV0Q3r0vyCw9RZd3ch0UbYyhye3 zLpXp5KoU2+l3XHtiPXQvK3wwrZ4rNca6TEEp1ykgtY5pqaywsuWX2ui7M6r3BewLTi9 KIkwvm3W5KlIpt0/vUVgCPTCIXvjz0MmoknSPx+kzrbzhV1K9rU4h6QP/7NSjobPu8nY 1Ydg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q6si2325950ilv.123.2021.09.16.04.19.52; Thu, 16 Sep 2021 04:19:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237805AbhIPLVL (ORCPT + 3 others); Thu, 16 Sep 2021 07:21:11 -0400 Received: from mx.socionext.com ([202.248.49.38]:62131 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237585AbhIPLVK (ORCPT ); Thu, 16 Sep 2021 07:21:10 -0400 Received: from unknown (HELO kinkan2-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 16 Sep 2021 20:19:49 +0900 Received: from mail.mfilter.local (m-filter-2 [10.213.24.62]) by kinkan2-ex.css.socionext.com (Postfix) with ESMTP id A6B6A2059034; Thu, 16 Sep 2021 20:19:49 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Thu, 16 Sep 2021 20:19:49 +0900 Received: from plum.e01.socionext.com (unknown [10.212.243.119]) by kinkan2.css.socionext.com (Postfix) with ESMTP id 39F52AB192; Thu, 16 Sep 2021 20:19:49 +0900 (JST) From: Kunihiko Hayashi To: Linus Walleij , Bartosz Golaszewski , Masami Hiramatsu Cc: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Kunihiko Hayashi Subject: [PATCH 3/3] gpio: uniphier: Use helper functions to get private data from IRQ data Date: Thu, 16 Sep 2021 20:19:37 +0900 Message-Id: <1631791177-27229-4-git-send-email-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1631791177-27229-1-git-send-email-hayashi.kunihiko@socionext.com> References: <1631791177-27229-1-git-send-email-hayashi.kunihiko@socionext.com> Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Use helper functions to get private data from IRQ data instead of direct access. No functional changes intended. Signed-off-by: Kunihiko Hayashi --- drivers/gpio/gpio-uniphier.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/drivers/gpio/gpio-uniphier.c b/drivers/gpio/gpio-uniphier.c index dca96f5..19ce667 100644 --- a/drivers/gpio/gpio-uniphier.c +++ b/drivers/gpio/gpio-uniphier.c @@ -179,7 +179,7 @@ static int uniphier_gpio_to_irq(struct gpio_chip *chip, unsigned int offset) static void uniphier_gpio_irq_mask(struct irq_data *data) { - struct uniphier_gpio_priv *priv = data->chip_data; + struct uniphier_gpio_priv *priv = irq_data_get_irq_chip_data(data); u32 mask = BIT(irqd_to_hwirq(data)); uniphier_gpio_reg_update(priv, UNIPHIER_GPIO_IRQ_EN, mask, 0); @@ -189,7 +189,7 @@ static void uniphier_gpio_irq_mask(struct irq_data *data) static void uniphier_gpio_irq_unmask(struct irq_data *data) { - struct uniphier_gpio_priv *priv = data->chip_data; + struct uniphier_gpio_priv *priv = irq_data_get_irq_chip_data(data); u32 mask = BIT(irqd_to_hwirq(data)); uniphier_gpio_reg_update(priv, UNIPHIER_GPIO_IRQ_EN, mask, mask); @@ -199,7 +199,7 @@ static void uniphier_gpio_irq_unmask(struct irq_data *data) static int uniphier_gpio_irq_set_type(struct irq_data *data, unsigned int type) { - struct uniphier_gpio_priv *priv = data->chip_data; + struct uniphier_gpio_priv *priv = irq_data_get_irq_chip_data(data); u32 mask = BIT(irqd_to_hwirq(data)); u32 val = 0;