From patchwork Mon Oct 31 04:45:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 80118 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp2262487qge; Sun, 30 Oct 2016 21:46:08 -0700 (PDT) X-Received: by 10.98.81.129 with SMTP id f123mr45825193pfb.36.1477889168675; Sun, 30 Oct 2016 21:46:08 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f17si12174143pgg.308.2016.10.30.21.46.08; Sun, 30 Oct 2016 21:46:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758453AbcJaEqH (ORCPT + 7 others); Mon, 31 Oct 2016 00:46:07 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36215 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756816AbcJaEqG (ORCPT ); Mon, 31 Oct 2016 00:46:06 -0400 Received: by mail-pf0-f196.google.com with SMTP id n85so7673623pfi.3; Sun, 30 Oct 2016 21:46:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=g+7tfzLC7vcDsd5AdZDF4RGAN9/Gv0h7hvcSFmoU/pI=; b=ib+15oSgPJN0OJ91Hr21uyu95rOQ5Z75xZZaxKy4+UmsiPpzQCicPj2SX1fKB0vh1u JWKEZ+QLVlgl2rX3cF/SaW56hjJrAcFDz9S7ZiMGCOuEFw0BXfFWok2HOa540/uLddtq aNGYE6GAI4Q33LPLeeFwM54ytpIy14BWyzzpLeB3mqyr5LMZVe8uo1aglZK56pmuHEl0 sro1PYnNYdcdtdqfRpxHM8cvdj9qZ8C5drzz9gDcU67ptIeTrNgmV169wTD6sEt4iyIg upokMmD2b8EdMo4gIGPEGLHp+MprP9KKTbK5FBqPTX5gfgto5SRjCn7M28vYuoYrsQ7C cpMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=g+7tfzLC7vcDsd5AdZDF4RGAN9/Gv0h7hvcSFmoU/pI=; b=M9ucp19uV/MdgdghZIOPSGDkUFP74aR3eeQELiRfAkIoABpp63gGNkLRQAHTW4rGsW NA+N8tcZdrv+iZEfJ/xiFS+Z111mHgHwVOwGdPIn+wq6/6421sjJjLyQ5it4zVkftQFF /l4FCyLxAKu+ReAzNA0jCfHSsq78GHWiFwGk+4H2ZptKJ18KQ/8ptede010YJpI+dGml F1kEQHhoLb7M6sqKm0Z3Mi+kvPLKHkDe9YitfMoQIAjKxW+K8shxaypTXxs4xZ4upXIp A6DA3lVaeCMUvgpwKwrJjlpsT04Z57gD++7whkmi/qecYpmeFTgtm96jWfDNUBoAqxAj KAZg== X-Gm-Message-State: ABUngvfxjNWuREULCtbZ5MIVxpL9w3oimMwAW6gqJGZi1/Q0vveoHE6L5Njg9L8edzQ6wg== X-Received: by 10.98.61.152 with SMTP id x24mr13623504pfj.88.1477889165718; Sun, 30 Oct 2016 21:46:05 -0700 (PDT) Received: from aurora.jms.id.au ([203.0.153.9]) by smtp.gmail.com with ESMTPSA id ij5sm32918434pab.2.2016.10.30.21.46.01 (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 30 Oct 2016 21:46:05 -0700 (PDT) Received: by aurora.jms.id.au (sSMTP sendmail emulation); Mon, 31 Oct 2016 15:15:57 +1030 From: Joel Stanley To: Rob Herring , Mark Rutland Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, andrew@aj.id.au Subject: [PATCH] dt-bindings/gpio: Add Aspeed GPIO bindings header Date: Mon, 31 Oct 2016 15:15:50 +1030 Message-Id: <20161031044550.1784-1-joel@jms.id.au> X-Mailer: git-send-email 2.9.3 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This provides constants for using GPIOs in the device tree on Aspeed SoCs. Signed-off-by: Joel Stanley --- The Apseed GPIO driver and binding document went upstream in 4.9, but we forgot to send this patch as part of the series. include/dt-bindings/gpio/aspeed-gpio.h | 47 ++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 include/dt-bindings/gpio/aspeed-gpio.h -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/dt-bindings/gpio/aspeed-gpio.h b/include/dt-bindings/gpio/aspeed-gpio.h new file mode 100644 index 000000000000..058c527cbcaf --- /dev/null +++ b/include/dt-bindings/gpio/aspeed-gpio.h @@ -0,0 +1,47 @@ +/* + * This header provides constants for binding aspeed,*-gpio. + * + * The first cell in Aspeed's GPIO specifier is the GPIO ID. The macros below + * provide names for this. + * + * The second cell contains standard flag values specified in gpio.h. + */ + +#ifndef _DT_BINDINGS_GPIO_ASPEED_GPIO_H +#define _DT_BINDINGS_GPIO_ASPEED_GPIO_H + +#include + +#define ASPEED_GPIO_PORT_A 0 +#define ASPEED_GPIO_PORT_B 1 +#define ASPEED_GPIO_PORT_C 2 +#define ASPEED_GPIO_PORT_D 3 +#define ASPEED_GPIO_PORT_E 4 +#define ASPEED_GPIO_PORT_F 5 +#define ASPEED_GPIO_PORT_G 6 +#define ASPEED_GPIO_PORT_H 7 +#define ASPEED_GPIO_PORT_I 8 +#define ASPEED_GPIO_PORT_J 9 +#define ASPEED_GPIO_PORT_K 10 +#define ASPEED_GPIO_PORT_L 11 +#define ASPEED_GPIO_PORT_M 12 +#define ASPEED_GPIO_PORT_N 13 +#define ASPEED_GPIO_PORT_O 14 +#define ASPEED_GPIO_PORT_P 15 +#define ASPEED_GPIO_PORT_Q 16 +#define ASPEED_GPIO_PORT_R 17 +#define ASPEED_GPIO_PORT_S 18 +#define ASPEED_GPIO_PORT_T 19 +#define ASPEED_GPIO_PORT_U 20 +#define ASPEED_GPIO_PORT_V 21 +#define ASPEED_GPIO_PORT_W 22 +#define ASPEED_GPIO_PORT_X 23 +#define ASPEED_GPIO_PORT_Y 24 +#define ASPEED_GPIO_PORT_Z 25 +#define ASPEED_GPIO_PORT_AA 26 +#define ASPEED_GPIO_PORT_BB 27 + +#define ASPEED_GPIO(port, offset) \ + ((ASPEED_GPIO_PORT_##port * 8) + offset) + +#endif