From patchwork Wed Sep 2 07:44:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 7108961 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A079FBEEC1 for ; Wed, 2 Sep 2015 07:45:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A59F020643 for ; Wed, 2 Sep 2015 07:45:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9C43820631 for ; Wed, 2 Sep 2015 07:45:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752323AbbIBHpC (ORCPT ); Wed, 2 Sep 2015 03:45:02 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:29650 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750806AbbIBHpA (ORCPT ); Wed, 2 Sep 2015 03:45:00 -0400 Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie1.idc.renesas.com with ESMTP; 02 Sep 2015 16:44:58 +0900 Received: from relmlac1.idc.renesas.com (relmlac1.idc.renesas.com [10.200.69.21]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 3CA2547FBD; Wed, 2 Sep 2015 16:44:58 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id 25F478002E; Wed, 2 Sep 2015 16:44:58 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id 203768002D; Wed, 2 Sep 2015 16:44:58 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac1.idc.renesas.com with ESMTP id SAK15894; Wed, 2 Sep 2015 16:44:58 +0900 X-IronPort-AV: E=Sophos;i="5.17,451,1437404400"; d="scan'";a="193575376" Received: from mail-pu1apc01lp0017.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.17]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 02 Sep 2015 16:44:57 +0900 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.144) by SIXPR06MB0605.apcprd06.prod.outlook.com (10.160.237.147) with Microsoft SMTP Server (TLS) id 15.1.256.15; Wed, 2 Sep 2015 07:44:55 +0000 Message-ID: <87io7tjmk6.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Linus Walleij , Laurent Pinchart CC: Simon , Magnus , "linux-gpio@vger.kernel.org" , "linux-sh@vger.kernel.org" Subject: [PATCH 1/9] sh-pfc: modify PINMUX_IPSR_MSEL() macro order In-Reply-To: <87wpw9jn3i.wl%kuninori.morimoto.gx@renesas.com> References: <87wpw9jn3i.wl%kuninori.morimoto.gx@renesas.com> User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Wed, 2 Sep 2015 07:44:55 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR01CA0034.jpnprd01.prod.outlook.com (25.164.162.144) To SIXPR06MB0605.apcprd06.prod.outlook.com (25.160.237.147) X-Microsoft-Exchange-Diagnostics: 1; SIXPR06MB0605; 2:MBGtXIqg2Qhh8mzCYuG1MpQ+Oq2bbLEb9LhWt7eMd1jFIu2SjSA3vFsmVmMJrgHZ3auxs/Z27pKgyRDRldDwp9QbpSLvQLwviqm6j5J2suEylGL3y1dh+TNf8k5O6f6rxoHnjoscgBi+tALFR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Cuz8fZPmM+B4pHnR2Ygsr6NXFBAlfQq3nsl61G11WcacO37ihGP7x3YjECDIdtUEPsQxlF+MlluoI6pwtXBtq/NAjllxUYRxBycF5ejy+OqKlmw7yg2dfJ+MiWqFDqHGkOsp1WTBHi+9d7GvVV8DZp77qZTLAI4KXS/9vmjIWySs2qlNNqwu38EVxDa9+t5fK1TImlFJPAyaBX/xwcnwSw/7nc2tzVs32TAKtuzxzrbezxWGL0G4f+9X+kWsE3vC4DOa3ewxT278S2HcVYkvyXBQ2pz/1f1cYe3ewdqtqYv86eKEggK5xxPD3mBkFXbivFOU7J2DfJiVdSA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(8121501046)(3002001); SRVR:SIXPR06MB0605; BCL:0; PCL:0; RULEID:; SRVR:SIXPR06MB0605; X-Forefront-PRVS: 0687389FB0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(69596002)(5001830100001)(92566002)(62966003)(40100003)(46102003)(122386002)(83506001)(77156002)(87976001)(5004730100002)(19580405001)(50466002)(2950100001)(86362001)(19580395003)(5007970100001)(46406003)(106356001)(229853001)(105586002)(101416001)(81156007)(64706001)(66066001)(5001770100001)(189998001)(5001960100002)(77096005)(4001350100001)(54356999)(36756003)(68736005)(47776003)(50986999)(23726002)(42186005)(33646002)(53416004)(5001860100001)(97736004)(76176999)(4001540100001)(21314002); DIR:OUT; SFP:1102; SCL:1; SRVR:SIXPR06MB0605; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SIXPR06MB0605; 23:+Hw0n80zpNK0zzUtaTrYLQKiiVzFysuF9bTAnAGwR?= =?us-ascii?Q?LwOMbiLBNdNm4xNC2uzVPummarB5XoBfEJuug0lIEHG+9c7hwTBDtPOfwKd/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+liKwXr7/HfhCmfMFF5g1yyFrS5L8FD4k?= =?us-ascii?Q?0uwgE8TiQ3XN5ADveMSg8SHT1FoXZieRVIkfyU0U3Jk0DtFa2xic/QPmP9nd?= =?us-ascii?Q?4a2+7wrv8D0TqR6RUxj7RC3MJBFZcBv6f6IT6URwescKjCbpmzpun1AlUGQF?= =?us-ascii?Q?MsBoyIwwlRf9JqYf6xbDNejtTbbJXh3a/MJRP5uRuXDcPutfuAedYkmKzOl3?= =?us-ascii?Q?sBBvEWbcuy55r5oDgJNIvH0GVJB/iPJyKQyGxJeTt0orSBd0wW6wvRVSoD0E?= =?us-ascii?Q?8JkwPjfsAleCYMeTOwj9bYe9HgaLTH0MkTTifWd?= X-Microsoft-Exchange-Diagnostics: 1; SIXPR06MB0605; 5:Q/74HgPRnXztHyCyOhojL+VWzkUz6uUm1wmZdyF8dWpGOs9ySp/pzMlmJwKevaTNeCLz5q7UBUGm0RoWWmWaMuazQtcgSG7DN2NiYYBEa2p1Xo5jsuGx5rq3vJYkcjNpA865Mb6/1tBG5ODJdQFJlg==; 24:oFFte5MGAdjb74ReqDK7QX0KtNoA9824Nn6/Dd3wK4fnmEERo/r82ODGb8+TpFvEqKAeQSQyPKcaI9Kmp1jFVFQIfDAa/bKv8z5ZTpeqyGs=; 20:TC/fqKmFno7P7IezfTi2RSiznzp1qBT5Y+GhjFDQui+rgSouDMNHp80dp6WxVLKUzQIpXa1zTwl3lHfMrO8YlnIITUOxV/maXAhF92KodAs7zT9Ch7YUyuQt0LoMMsju9bAPwNH9fJclT7OlY7B5VcTL4fFdLtbe58ASgwxcX8U= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Sep 2015 07:44:55.2955 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SIXPR06MB0605 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, T_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 From: Kuninori Morimoto The difference between PINMUX_IPSR_MSEL() and PINMUX_IPSR_MODSEL_DATA() are FN_xxx order, and PINMUX_IPSR_MSEL() is used only from r8a7778. Now it r8a7778 works correctly with PINMUX_IPSR_MODSEL_DATA() order. This means we can merge PINMUX_IPSR_MSEL() and PINMUX_IPSR_MODSEL_DATA(). Current PFC driver is very difficult to read, because macro names are using different lenth. Especially PINMUX_IPSR_MODSEL_DATA() is well used macro PINMUX_IPSR_NOGP(ispr, ...) PINMUX_IPSR_DATA(ipsr, ...) PINMUX_IPSR_NOGM(ispr, ...) PINMUX_IPSR_NOFN(ipsr, ...) PINMUX_IPSR_MSEL(ipsr, ...) PINMUX_IPSR_MODSEL_DATA(ipsr, ...) It can be readable if we can merge PINMUX_IPSR_MSEL() and PINMUX_IPSR_MODSEL_DATA() PINMUX_IPSR_NOGP(ispr, ...) PINMUX_IPSR_DATA(ipsr, ...) PINMUX_IPSR_NOGM(ispr, ...) PINMUX_IPSR_NOFN(ipsr, ...) PINMUX_IPSR_MSEL(ipsr, ...) Signed-off-by: Kuninori Morimoto Acked-by: Simon Horman Acked-by: Linus Walleij --- drivers/pinctrl/sh-pfc/sh_pfc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/sh-pfc/sh_pfc.h b/drivers/pinctrl/sh-pfc/sh_pfc.h index 7cb1ed6..c8c1d49 100644 --- a/drivers/pinctrl/sh-pfc/sh_pfc.h +++ b/drivers/pinctrl/sh-pfc/sh_pfc.h @@ -179,7 +179,7 @@ struct sh_pfc_soc_info { #define PINMUX_IPSR_NOFN(ipsr, fn, ms) \ PINMUX_DATA(fn##_MARK, FN_##ipsr, FN_##ms) #define PINMUX_IPSR_MSEL(ipsr, fn, ms) \ - PINMUX_DATA(fn##_MARK, FN_##fn, FN_##ipsr, FN_##ms) + PINMUX_DATA(fn##_MARK, FN_##ms, FN_##ipsr, FN_##fn) #define PINMUX_IPSR_MODSEL_DATA(ipsr, fn, ms) \ PINMUX_DATA(fn##_MARK, FN_##ms, FN_##ipsr, FN_##fn)