From patchwork Fri Nov 16 07:20:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Hecht X-Patchwork-Id: 10685565 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-2.web.codeaurora.org (Postfix) with ESMTP id BC3E2109C for ; Fri, 16 Nov 2018 07:21:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A65B32D6C7 for ; Fri, 16 Nov 2018 07:21:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B0222D6DE; Fri, 16 Nov 2018 07:21:24 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 463E52D6C7 for ; Fri, 16 Nov 2018 07:21:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389222AbeKPRcc (ORCPT ); Fri, 16 Nov 2018 12:32:32 -0500 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.218]:34207 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727567AbeKPRcc (ORCPT ); Fri, 16 Nov 2018 12:32:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1542352881; s=strato-dkim-0002; d=fpond.eu; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=gRXCkgR3KxmwzIjB7A4ksRgP7C9AlODdbmqAEJ2YfSs=; b=ZE/OaGqtwYjuWa8ZBerkxoOzzYOKCXoqiML+BToiOt42OzNkIBAy96SZ2zY0172FXT JRhQ/kjvgmd+CUsURXVIndhMXUQXPk+vHerrOr4MEnrXIIEAJB3nYcQ0Zdm87z4n5aR7 kM/sJokr0pxIzKMt9TWdWcoyM9+6XNnXH+U5o0g6W/1Ohe/y2ZCnF4HURzDuk04Ek2jP 7J97xvRf06KnAV7mcP3U17uBXq5RwUFoj/V51hoh4LZsKPp+2GWq6E9tezxjSKzwmhiS 8rRjJJbqeUUihuLsQIM5HqmduobgHGFN6QA2nCjS0VyzmmoTMkAf8EFip6a6TzNSMRc2 rBSw== X-RZG-AUTH: ":OWANVUa4dPFUgKR/3dpvnYP0Np73dmm4I5W0/AvJ6ahE0tB4eGX21N2+gwi5" X-RZG-CLASS-ID: mo00 Received: from localhost.localdomain by smtp.strato.de (RZmta 44.4 SBL|AUTH) with ESMTPSA id C0291auAG7LH3zL (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Fri, 16 Nov 2018 08:21:17 +0100 (CET) From: Ulrich Hecht To: linux-renesas-soc@vger.kernel.org, geert@linux-m68k.org, wsa@the-dreams.de Cc: Ulrich Hecht Subject: [PATCH v2 1/4] pinctrl: sh-pfc: Add physical pin multiplexing helper macros Date: Fri, 16 Nov 2018 15:20:48 +0800 Message-Id: <1542352851-25393-2-git-send-email-uli+renesas@fpond.eu> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542352851-25393-1-git-send-email-uli+renesas@fpond.eu> References: <1542352851-25393-1-git-send-email-uli+renesas@fpond.eu> 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 Used by I2C controllers 0, 3 and 5 in R8A7795 and R8A7796 SoCs. Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven --- drivers/pinctrl/sh-pfc/sh_pfc.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/pinctrl/sh-pfc/sh_pfc.h b/drivers/pinctrl/sh-pfc/sh_pfc.h index 1fc1336..6bb9c6b 100644 --- a/drivers/pinctrl/sh-pfc/sh_pfc.h +++ b/drivers/pinctrl/sh-pfc/sh_pfc.h @@ -386,6 +386,28 @@ extern const struct sh_pfc_soc_info shx3_pinmux_info; PINMUX_DATA(fn##_MARK, FN_##msel, FN_##fn, FN_##ipsr) /* + * Describe a pinmux configuration similar to PINMUX_IPSR_MSEL, but with + * an additional select register that controls physical multiplexing + * with another pin. + * - ipsr: IPSR field + * - fn: Function name, also referring to the IPSR field + * - msel1: Physical multiplexing selector + * - msel2: Module selector + */ +#define PINMUX_IPSR_MSEL2(ipsr, fn, msel1, msel2) \ + PINMUX_DATA(fn##_MARK, FN_##msel1, FN_##msel2, FN_##fn, FN_##ipsr) + +/* + * Describe a pinmux configuration in which a pin is physically multiplexed + * with other pins. + * - ipsr: IPSR field + * - fn: Function name, also referring to the IPSR field + * - msel: Phyiscal multiplexing selector + */ +#define PINMUX_IPSR_PHYS(ipsr, fn, msel) \ + PINMUX_DATA(fn##_MARK, FN_##msel) + +/* * Describe a pinmux configuration for a single-function pin with GPIO * capability. * - fn: Function name