From patchwork Mon Jan 9 19:32:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 9505803 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7BFD56075F for ; Mon, 9 Jan 2017 19:32:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D4CB28535 for ; Mon, 9 Jan 2017 19:32:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7236D2853A; Mon, 9 Jan 2017 19:32:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2F8128537 for ; Mon, 9 Jan 2017 19:32:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763361AbdAITci (ORCPT ); Mon, 9 Jan 2017 14:32:38 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:41452 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763466AbdAITch (ORCPT ); Mon, 9 Jan 2017 14:32:37 -0500 Received: from mfilter35-d.gandi.net (mfilter35-d.gandi.net [217.70.178.166]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id 11EEC1720C3; Mon, 9 Jan 2017 20:32:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter35-d.gandi.net Received: from relay4-d.mail.gandi.net ([IPv6:::ffff:217.70.183.196]) by mfilter35-d.gandi.net (mfilter35-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id vgxgZ0Sadg6U; Mon, 9 Jan 2017 20:32:33 +0100 (CET) X-Originating-IP: 5.90.17.170 Received: from w540.lan (unknown [5.90.17.170]) (Authenticated sender: jacopo@jmondi.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 52F6017209B; Mon, 9 Jan 2017 20:32:32 +0100 (CET) From: Jacopo Mondi To: magnus.damm@gmail.com, laurent.pinchart@ideasonboard.com, geert+renesas@glider.be, chris.brandt@renesas.com, linus.walleij@linaro.org Cc: linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org Subject: [PATCH 1/3] pinctrl: sh-pfc: r7s72100: Enable DIO mode Date: Mon, 9 Jan 2017 20:32:24 +0100 Message-Id: <1483990346-26998-2-git-send-email-jacopo+renesas@jmondi.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1483990346-26998-1-git-send-email-jacopo+renesas@jmondi.org> References: <1483990346-26998-1-git-send-email-jacopo+renesas@jmondi.org> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When selecting alternative function for one pin, set the PIPCn.PIPCnm bit to 1 to enable direct IO mode control (the alternative function decides the pin direction) and disable input buffer and bidirection control functionalities (PIBCn.PIBCnm = 0 and PBDCn.PDBCnm = 0) intially enabled when configuring the pin in PORT mode Signed-off-by: Jacopo Mondi --- drivers/pinctrl/sh-pfc/pfc-r7s72100.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/sh-pfc/pfc-r7s72100.c b/drivers/pinctrl/sh-pfc/pfc-r7s72100.c index 72e1dff..8c0ae13 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r7s72100.c +++ b/drivers/pinctrl/sh-pfc/pfc-r7s72100.c @@ -58,9 +58,12 @@ enum { PINMUX_DATA(name##_DATA, name##_PMC_0, \ name##_PIBC_1, name##_PBDC_1) -#define _P_FN(n, fn, pfcae, pfce, pfc) \ +#define _P_FN(n, fn, pfcae, pfce, pfc) \ PINMUX_DATA(n##_MARK_FN##fn, n##_PMC_1, \ - n##_PFCAE_##pfcae, n##_PFCE_##pfce, n##_PFC_##pfc) + n##_PFCAE_##pfcae, \ + n##_PFCE_##pfce, \ + n##_PFC_##pfc, \ + n##_PIPC_1, n##_PIBC_0, n##_PBDC_0) #define _P_MARK_FN1(bank, pin, name, sfx, cfg) _P_FN(name, 1, 0, 0, 0) #define _P_MARK_FN2(bank, pin, name, sfx, cfg) _P_FN(name, 2, 0, 0, 1)