From patchwork Fri Nov 23 12:43:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 1002289 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="c15FIroE"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 431bb66QQKz9s0n for ; Fri, 23 Nov 2018 23:43:46 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388260AbeKWX1s (ORCPT ); Fri, 23 Nov 2018 18:27:48 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:36695 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388147AbeKWX1s (ORCPT ); Fri, 23 Nov 2018 18:27:48 -0500 Received: by mail-ed1-f68.google.com with SMTP id f23so10183029edb.3; Fri, 23 Nov 2018 04:43:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2sb88zJNhPdud3ebkQTZSaAJtx7ux6pMmYXmuodSC9k=; b=c15FIroEVrX3qeWUl2m+OH6hjvAQ/A/jYLvIUBzvKcZ2UPQrosbdtA85Y5bFf8dFIT ZrnRyoCppG393XtibhVSSVS68zol8Go0vV45OLcx4uKa7FM5PVnfHpxgAqoWNaWPlH/V ln8GoCBVuR3x+trk+h3W0ok9E6Z8bm9U3k3nk7oLbswXSaMFrPGoJKoJXjtDV82qJUzJ guwrJPKMjAqa87kCZx/0XqQcVDuu3pny02JyjGRoB2fOftCwxjc1yynabMCecAk1ElEt unnSMi6huzL05vXIpn7d+JSdxs49OHWz9jDFxYbPn2whe92rk9nZ7VHbwhFh1pei9gtQ wQBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2sb88zJNhPdud3ebkQTZSaAJtx7ux6pMmYXmuodSC9k=; b=MKXKa/SllitUiyi4BObo9iAhw0yHdELN9LN65wBLkegT8bhcpgcg+oNZ02P1ANqql9 Y7v2HE0ObC9j3dr1T39ADMKe5cYKFK6rqG1YmAxSR5V4Dy999Evhjrq5PKqm2RN1cRuD PJ/+nxeJBUEib/JDZZ06nMuf+2tG22TREVOGTe5LAzOedZRsnoHW/SV13segg9xT23zB ME7/nZJiMrITZBbrlrU/9dETW0UXu7FddLUJS5/GYS2kcISdGPkiZjDm9n64SCqIOkZy ok/uDuoxLXn32PoSKHDwkb+T1lBznWNt7+7kBBHhRCpp3RiZRZOdsLyARETusVVTZ6vp US0Q== X-Gm-Message-State: AA+aEWZ4Jun1CfuueN/Du2NBaEapIgZuwilMV17ktMmEfydP2qygPJnT ObSnzTxtOZXNUJon/xTfRXs= X-Google-Smtp-Source: AFSGD/XrhVxHv5IQHFdMUg2927LLT9SUOtw9ongQuOfXCjzEOnSqzDq5wv1ITWifDG/8dmdbOFnehw== X-Received: by 2002:a50:b103:: with SMTP id k3mr12647045edd.247.1542977023419; Fri, 23 Nov 2018 04:43:43 -0800 (PST) Received: from localhost (pD9E51040.dip0.t-ipconnect.de. [217.229.16.64]) by smtp.gmail.com with ESMTPSA id h8sm3322955edb.95.2018.11.23.04.43.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Nov 2018 04:43:42 -0800 (PST) From: Thierry Reding To: Linus Walleij Cc: Rob Herring , Jon Hunter , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH] dt-bindings: tegra186-gpio: Add Tegra186 specific prefix Date: Fri, 23 Nov 2018 13:43:41 +0100 Message-Id: <20181123124341.21431-1-thierry.reding@gmail.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org From: Thierry Reding Subsequent generations of Tegra, such as Tegra194, contain a completely different set of GPIOs. In order to clarify that the Tegra186 defines are indeed specific to Tegra186, change the prefix from TEGRA_ to TEGRA186_. Note that for now we need to keep the old definitions in place to avoid breaking compilation in file that use this header. Once all users have been converted to use the new defines, the old ones can be removed. Also note that this is only a naming change and doesn't affect device tree ABI. Signed-off-by: Thierry Reding Acked-by: Jon Hunter --- include/dt-bindings/gpio/tegra186-gpio.h | 41 ++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/include/dt-bindings/gpio/tegra186-gpio.h b/include/dt-bindings/gpio/tegra186-gpio.h index 463ad398fe3e..cabc5712e745 100644 --- a/include/dt-bindings/gpio/tegra186-gpio.h +++ b/include/dt-bindings/gpio/tegra186-gpio.h @@ -14,6 +14,34 @@ #include /* GPIOs implemented by main GPIO controller */ +#define TEGRA186_MAIN_GPIO_PORT_A 0 +#define TEGRA186_MAIN_GPIO_PORT_B 1 +#define TEGRA186_MAIN_GPIO_PORT_C 2 +#define TEGRA186_MAIN_GPIO_PORT_D 3 +#define TEGRA186_MAIN_GPIO_PORT_E 4 +#define TEGRA186_MAIN_GPIO_PORT_F 5 +#define TEGRA186_MAIN_GPIO_PORT_G 6 +#define TEGRA186_MAIN_GPIO_PORT_H 7 +#define TEGRA186_MAIN_GPIO_PORT_I 8 +#define TEGRA186_MAIN_GPIO_PORT_J 9 +#define TEGRA186_MAIN_GPIO_PORT_K 10 +#define TEGRA186_MAIN_GPIO_PORT_L 11 +#define TEGRA186_MAIN_GPIO_PORT_M 12 +#define TEGRA186_MAIN_GPIO_PORT_N 13 +#define TEGRA186_MAIN_GPIO_PORT_O 14 +#define TEGRA186_MAIN_GPIO_PORT_P 15 +#define TEGRA186_MAIN_GPIO_PORT_Q 16 +#define TEGRA186_MAIN_GPIO_PORT_R 17 +#define TEGRA186_MAIN_GPIO_PORT_T 18 +#define TEGRA186_MAIN_GPIO_PORT_X 19 +#define TEGRA186_MAIN_GPIO_PORT_Y 20 +#define TEGRA186_MAIN_GPIO_PORT_BB 21 +#define TEGRA186_MAIN_GPIO_PORT_CC 22 + +#define TEGRA186_MAIN_GPIO(port, offset) \ + ((TEGRA186_MAIN_GPIO_PORT_##port * 8) + offset) + +/* need to keep these for backwards-compatibility */ #define TEGRA_MAIN_GPIO_PORT_A 0 #define TEGRA_MAIN_GPIO_PORT_B 1 #define TEGRA_MAIN_GPIO_PORT_C 2 @@ -42,6 +70,19 @@ ((TEGRA_MAIN_GPIO_PORT_##port * 8) + offset) /* GPIOs implemented by AON GPIO controller */ +#define TEGRA186_AON_GPIO_PORT_S 0 +#define TEGRA186_AON_GPIO_PORT_U 1 +#define TEGRA186_AON_GPIO_PORT_V 2 +#define TEGRA186_AON_GPIO_PORT_W 3 +#define TEGRA186_AON_GPIO_PORT_Z 4 +#define TEGRA186_AON_GPIO_PORT_AA 5 +#define TEGRA186_AON_GPIO_PORT_EE 6 +#define TEGRA186_AON_GPIO_PORT_FF 7 + +#define TEGRA186_AON_GPIO(port, offset) \ + ((TEGRA186_AON_GPIO_PORT_##port * 8) + offset) + +/* need to keep these for backwards-compatibility */ #define TEGRA_AON_GPIO_PORT_S 0 #define TEGRA_AON_GPIO_PORT_U 1 #define TEGRA_AON_GPIO_PORT_V 2