From patchwork Thu Oct 29 19:39:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 7520421 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B3AD59F36A for ; Thu, 29 Oct 2015 19:40:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D6F9320900 for ; Thu, 29 Oct 2015 19:40:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 54B4120852 for ; Thu, 29 Oct 2015 19:40:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752703AbbJ2TkC (ORCPT ); Thu, 29 Oct 2015 15:40:02 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:49374 "EHLO albert.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751055AbbJ2TkB (ORCPT ); Thu, 29 Oct 2015 15:40:01 -0400 Received: from ayla.of.borg ([84.195.106.123]) by albert.telenet-ops.be with bizsmtp id b7fz1r0012fm56U067fzLM; Thu, 29 Oct 2015 20:39:59 +0100 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1Zrt3G-0003vx-Rn; Thu, 29 Oct 2015 20:39:58 +0100 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1Zrt3N-0005Gf-5k; Thu, 29 Oct 2015 20:40:05 +0100 From: Geert Uytterhoeven To: Laurent Pinchart , Linus Walleij , Kuninori Morimoto Cc: linux-sh@vger.kernel.org, linux-gpio@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] pinctrl: sh-pfc: r8a7795: Make PORT_GP_x() macros consistent Date: Thu, 29 Oct 2015 20:39:47 +0100 Message-Id: <1446147587-20216-1-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 On r8a7795, PORT_GP_x() is a macro for defining GPIOs 0..x. In all other sh-pfc code, PORT_GP_x() is a macro for defining GPIOs 0..(x-1). Make the r8a7795 macro definitions consistent with the rest of the sh-pfc codebase. Signed-off-by: Geert Uytterhoeven Acked-by: Linus Walleij Acked-by: Laurent Pinchart --- drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c index 7ddb2adfc5a53d7b..29d001b8a727e154 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c @@ -13,12 +13,12 @@ #include "core.h" #include "sh_pfc.h" -#define PORT_GP_3(bank, fn, sfx) \ +#define PORT_GP_4(bank, fn, sfx) \ PORT_GP_1(bank, 0, fn, sfx), PORT_GP_1(bank, 1, fn, sfx), \ PORT_GP_1(bank, 2, fn, sfx), PORT_GP_1(bank, 3, fn, sfx) -#define PORT_GP_14(bank, fn, sfx) \ - PORT_GP_3(bank, fn, sfx), \ +#define PORT_GP_15(bank, fn, sfx) \ + PORT_GP_4(bank, fn, sfx), \ PORT_GP_1(bank, 4, fn, sfx), PORT_GP_1(bank, 5, fn, sfx), \ PORT_GP_1(bank, 6, fn, sfx), PORT_GP_1(bank, 7, fn, sfx), \ PORT_GP_1(bank, 8, fn, sfx), PORT_GP_1(bank, 9, fn, sfx), \ @@ -26,33 +26,33 @@ PORT_GP_1(bank, 12, fn, sfx), PORT_GP_1(bank, 13, fn, sfx), \ PORT_GP_1(bank, 14, fn, sfx) -#define PORT_GP_15(bank, fn, sfx) \ - PORT_GP_14(bank, fn, sfx), PORT_GP_1(bank, 15, fn, sfx) +#define PORT_GP_16(bank, fn, sfx) \ + PORT_GP_15(bank, fn, sfx), PORT_GP_1(bank, 15, fn, sfx) -#define PORT_GP_17(bank, fn, sfx) \ - PORT_GP_15(bank, fn, sfx), \ +#define PORT_GP_18(bank, fn, sfx) \ + PORT_GP_16(bank, fn, sfx), \ PORT_GP_1(bank, 16, fn, sfx), PORT_GP_1(bank, 17, fn, sfx) -#define PORT_GP_25(bank, fn, sfx) \ - PORT_GP_17(bank, fn, sfx), \ +#define PORT_GP_26(bank, fn, sfx) \ + PORT_GP_18(bank, fn, sfx), \ PORT_GP_1(bank, 18, fn, sfx), PORT_GP_1(bank, 19, fn, sfx), \ PORT_GP_1(bank, 20, fn, sfx), PORT_GP_1(bank, 21, fn, sfx), \ PORT_GP_1(bank, 22, fn, sfx), PORT_GP_1(bank, 23, fn, sfx), \ PORT_GP_1(bank, 24, fn, sfx), PORT_GP_1(bank, 25, fn, sfx) -#define PORT_GP_27(bank, fn, sfx) \ - PORT_GP_25(bank, fn, sfx), \ +#define PORT_GP_28(bank, fn, sfx) \ + PORT_GP_26(bank, fn, sfx), \ PORT_GP_1(bank, 26, fn, sfx), PORT_GP_1(bank, 27, fn, sfx) #define CPU_ALL_PORT(fn, sfx) \ - PORT_GP_15(0, fn, sfx), \ - PORT_GP_27(1, fn, sfx), \ - PORT_GP_14(2, fn, sfx), \ - PORT_GP_15(3, fn, sfx), \ - PORT_GP_17(4, fn, sfx), \ - PORT_GP_25(5, fn, sfx), \ + PORT_GP_16(0, fn, sfx), \ + PORT_GP_28(1, fn, sfx), \ + PORT_GP_15(2, fn, sfx), \ + PORT_GP_16(3, fn, sfx), \ + PORT_GP_18(4, fn, sfx), \ + PORT_GP_26(5, fn, sfx), \ PORT_GP_32(6, fn, sfx), \ - PORT_GP_3(7, fn, sfx) + PORT_GP_4(7, fn, sfx) /* * F_() : just information * FM() : macro for FN_xxx / xxx_MARK