From patchwork Wed Dec 18 21:31:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 3372701 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 086659F314 for ; Wed, 18 Dec 2013 21:32:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C05012024D for ; Wed, 18 Dec 2013 21:32:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A07DD205DF for ; Wed, 18 Dec 2013 21:32:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752693Ab3LRVcu (ORCPT ); Wed, 18 Dec 2013 16:32:50 -0500 Received: from sauhun.de ([89.238.76.85]:56908 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754670Ab3LRVcs (ORCPT ); Wed, 18 Dec 2013 16:32:48 -0500 Received: from p4fe2514a.dip0.t-ipconnect.de ([79.226.81.74]:50746 helo=localhost) by pokefinder.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1VtOjX-0002CW-NZ; Wed, 18 Dec 2013 22:32:47 +0100 From: Wolfram Sang To: linux-sh@vger.kernel.org Cc: linux-i2c@vger.kernel.org, Magnus Damm , Laurent Pinchart , Simon Horman , linux-arm-kernel@lists.infradead.org, Wolfram Sang Subject: [PATCH V2 1/5] pinctrl: r7s72100: add riic groups Date: Wed, 18 Dec 2013 22:31:57 +0100 Message-Id: <1387402321-21866-2-git-send-email-wsa@the-dreams.de> X-Mailer: git-send-email 1.8.4.2 In-Reply-To: <1387402321-21866-1-git-send-email-wsa@the-dreams.de> References: <1387402321-21866-1-git-send-email-wsa@the-dreams.de> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.4 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 From: Wolfram Sang Tested RIIC2 on a genmai board. Other riic groups are untested but seem trivial enough to be added. Signed-off-by: Wolfram Sang Acked-by: Magnus Damm --- V2: keep sorting alphabetical Note: With the current PFC driver as posted by Magnus, it needs another patch to work. Yet, I think this is a seperate PFC issue which needs to be sorted out seperately and shouldn't affect these declarations. I'll add the needed patch as a response to this mail. drivers/pinctrl/sh-pfc/pfc-r7s72100.c | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/drivers/pinctrl/sh-pfc/pfc-r7s72100.c b/drivers/pinctrl/sh-pfc/pfc-r7s72100.c index a662876..7ee0442 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r7s72100.c +++ b/drivers/pinctrl/sh-pfc/pfc-r7s72100.c @@ -117,6 +117,27 @@ static const unsigned int __RZ_STR(pfx, hw, bank, pin, _mux)[] = { \ #define RZ_GROUPS(pfx, hw, bank, pin, fn) \ __RZ_GROUPS(pfx##_##hw##_p##bank##_##pin), +#define RIIC0(fn) \ + fn(riic0, scl, 1, 0, 1) \ + fn(riic0, sda, 1, 1, 1) + +#define RIIC1(fn) \ + fn(riic1, scl, 1, 2, 1) \ + fn(riic1, sda, 1, 3, 1) + +#define RIIC2(fn) \ + fn(riic2, scl, 1, 4, 1) \ + fn(riic2, sda, 1, 5, 1) + +#define RIIC3(fn) \ + fn(riic3, scl, 1, 6, 1) \ + fn(riic3, sda, 1, 7, 1) + +RIIC0(RZ_PIN_AND_MUX) +RIIC1(RZ_PIN_AND_MUX) +RIIC2(RZ_PIN_AND_MUX) +RIIC3(RZ_PIN_AND_MUX) + #define SCIF0(fn) \ fn(scif0, clk, 2, 13, 6) \ fn(scif0, txd, 2, 14, 6) \ @@ -230,6 +251,10 @@ SCIF6(RZ_PIN_AND_MUX) SCIF7(RZ_PIN_AND_MUX) static const struct sh_pfc_pin_group pinmux_groups[] = { + RIIC0(RZ_PMX_GROUP) + RIIC1(RZ_PMX_GROUP) + RIIC2(RZ_PMX_GROUP) + RIIC3(RZ_PMX_GROUP) SCIF0(RZ_PMX_GROUP) SCIF1(RZ_PMX_GROUP) SCIF2(RZ_PMX_GROUP) @@ -240,6 +265,22 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { SCIF7(RZ_PMX_GROUP) }; +static const char * const riic0_groups[] = { + RIIC0(RZ_GROUPS) +}; + +static const char * const riic1_groups[] = { + RIIC1(RZ_GROUPS) +}; + +static const char * const riic2_groups[] = { + RIIC2(RZ_GROUPS) +}; + +static const char * const riic3_groups[] = { + RIIC3(RZ_GROUPS) +}; + static const char * const scif0_groups[] = { SCIF0(RZ_GROUPS) }; @@ -273,6 +314,10 @@ static const char * const scif7_groups[] = { }; static const struct sh_pfc_function pinmux_functions[] = { + SH_PFC_FUNCTION(riic0), + SH_PFC_FUNCTION(riic1), + SH_PFC_FUNCTION(riic2), + SH_PFC_FUNCTION(riic3), SH_PFC_FUNCTION(scif0), SH_PFC_FUNCTION(scif1), SH_PFC_FUNCTION(scif2),