From patchwork Mon Feb 8 17:57:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 8253511 Return-Path: X-Original-To: patchwork-linux-arm@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 78E52BEEE5 for ; Mon, 8 Feb 2016 17:59:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A53B203E9 for ; Mon, 8 Feb 2016 17:59:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A8D57203E1 for ; Mon, 8 Feb 2016 17:59:54 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aSq57-0007wz-FR; Mon, 08 Feb 2016 17:58:37 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aSq4j-0007YA-9W for linux-arm-kernel@lists.infradead.org; Mon, 08 Feb 2016 17:58:14 +0000 Received: by mail-wm0-x243.google.com with SMTP id c200so2662300wme.0 for ; Mon, 08 Feb 2016 09:57:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BemB8yceenXkfwPB7x10hvgwzV4anfRl5fFv+qay30E=; b=iA2RPI4bpcCdsZ9pvJ7IaFwYJxHxDsPkUHDiAwRGUjm56ZCDXuAc5ERacP9QG9mnfH 8pg/weJHhXcVmc4srzkc/HxND7gRwez7YxTdzh4mMsTK/JZmEtsDT3gS0TN4wcHYzO6x lzhsWI4cBsSxUAIe3pIVN3CTkCVZjVBSwD5Jypz5INWzuhSP4vL63J/5WsS89j8F91va zYLfnCLTWFxnoR4PdtOOSGSxcMuE1eE0Fm7bfCTCeKFt0wX2YKCXkw9PUzT+J6KyUddw ZSHb7Kcbf/89dDWvdyTzTeYSmFRfBRmWZP6/gfK6/htId6A3BFNmpHmUlYj2yZ0EP6YS zKOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BemB8yceenXkfwPB7x10hvgwzV4anfRl5fFv+qay30E=; b=Nn+/LehwDazWyyaZVbOO1YVMfGG8g7OZu8SsWFa48GlbMYyM34ki74sbP+zyg3vJJ3 WXClLdSLi5lkOsqhpwRHfEVrSP3GUQ7s5Xlp8xmTxXb4PKI435M0zgs23ysNUZ/euqvr jwiqI9Epc6C1PwxQh/Zm27zkX4oBgamjqdwL/ES/D29RNoL/emH7o2sRGkW1jQvYgB2k JPk8zQaXiwddR59o8v2IqqmTNMPm1XeR52XhSJb3X4XpeaOKsNBQlylPH8U71hOd4nYT hoO9+LswpJTY8s2VouMaYESPG2bFhdByV4Ba95IfP+91vvdXqh9Hqx4IrkVMYi4buVtp NyXw== X-Gm-Message-State: AG10YOTcJPBKnsP+yysghSK5HOGhQZKgGPuYldxsiecqZLTyO1DMSPE3WeFwbkFH693lQg== X-Received: by 10.28.65.193 with SMTP id o184mr97181wma.15.1454954271956; Mon, 08 Feb 2016 09:57:51 -0800 (PST) Received: from lmecul0520.st.com. (164.20.90.92.rev.sfr.net. [92.90.20.164]) by smtp.gmail.com with ESMTPSA id ll9sm30791147wjc.29.2016.02.08.09.57.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Feb 2016 09:57:51 -0800 (PST) From: Maxime Coquelin To: patrice.chotard@st.com, Linus Walleij , Mark Rutland , Rob Herring , linux-gpio@vger.kernel.org, arnd@arndb.de Subject: [PATCH 1/2] pinctrl: stm32: Remove dependency with DT bindings header files Date: Mon, 8 Feb 2016 18:57:38 +0100 Message-Id: <1454954259-4923-2-git-send-email-mcoquelin.stm32@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454954259-4923-1-git-send-email-mcoquelin.stm32@gmail.com> References: <1454954259-4923-1-git-send-email-mcoquelin.stm32@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160208_095813_510485_F1A0107A X-CRM114-Status: GOOD ( 13.12 ) X-Spam-Score: -2.5 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Daniel Thompson , bruherrera@gmail.com, linux-kernel@vger.kernel.org, afaerber@suse.de, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Some macros where defined in DT bindings headers, whereas only used in the driver. This patch moves these macros to the driver side. Signed-off-by: Maxime Coquelin --- drivers/pinctrl/stm32/pinctrl-stm32.c | 2 -- drivers/pinctrl/stm32/pinctrl-stm32.h | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/pinctrl-stm32.c index 9a08222..8deb566 100644 --- a/drivers/pinctrl/stm32/pinctrl-stm32.c +++ b/drivers/pinctrl/stm32/pinctrl-stm32.c @@ -23,8 +23,6 @@ #include #include -#include - #include "../core.h" #include "../pinconf.h" #include "../pinctrl-utils.h" diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.h b/drivers/pinctrl/stm32/pinctrl-stm32.h index 1b7c369..35ebc94 100644 --- a/drivers/pinctrl/stm32/pinctrl-stm32.h +++ b/drivers/pinctrl/stm32/pinctrl-stm32.h @@ -9,6 +9,14 @@ #include #include +#define STM32_PIN_NO(x) ((x) << 8) +#define STM32_GET_PIN_NO(x) ((x) >> 8) +#define STM32_GET_PIN_FUNC(x) ((x) & 0xff) + +#define STM32_PIN_GPIO 0 +#define STM32_PIN_AF(x) ((x) + 1) +#define STM32_PIN_ANALOG (STM32_PIN_AF(15) + 1) + struct stm32_desc_function { const char *name; const unsigned char num;