From patchwork Thu Dec 14 14:21:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ludovic Desroches X-Patchwork-Id: 10112323 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 AFBD460352 for ; Thu, 14 Dec 2017 14:29:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F79829628 for ; Thu, 14 Dec 2017 14:29:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 945F4296AC; Thu, 14 Dec 2017 14:29:35 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 23DA729628 for ; Thu, 14 Dec 2017 14:29:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=g5e9tdxqqEwV+F/+aNggGmQGGruJyxVmUGBe2FQMy6o=; b=aeAK+3o4alkxrj oMVzfQ42JjAbpLVE/7aXueaLhdpkiq6CxltfFRiLA30Z01tRab3Hjm5pow+eXtHsSzkm0EzMcrsuL ip6PLtcFU/bBVieUwt0/QV4yCTDU51nuk1r196tFNWlbHg4X4bi6EkZneg8fNPph+TFbUIghenadm vqyISoU2fw0bURGt6KCRRjogWolIyB6kCULAqWfK7PXdg5AwQB/F3P3OdrWys8sCaSDaSkmS0HnpP eyqHcv/deWEi/dQtrr7YazSoqyQ53Gcd/+asNem3hyQlPBEloVOq4j9krEaMEHt4D5Rbug9KIRxUz eNm8huYNrhnqTt1j/VAw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ePUVy-0004sY-Ad; Thu, 14 Dec 2017 14:29:34 +0000 Received: from esa1.microchip.iphmx.com ([68.232.147.91]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ePUQ8-0000YK-Qw for linux-arm-kernel@lists.infradead.org; Thu, 14 Dec 2017 14:23:39 +0000 X-IronPort-AV: E=Sophos;i="5.45,400,1508828400"; d="scan'208";a="10138012" Received: from exsmtp02.microchip.com (HELO email.microchip.com) ([198.175.253.38]) by esa1.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 14 Dec 2017 07:22:57 -0700 Received: from ibiza.corp.atmel.com (10.10.76.4) by chn-sv-exch02.mchp-main.com (10.10.76.38) with Microsoft SMTP Server id 14.3.352.0; Thu, 14 Dec 2017 07:22:56 -0700 From: Ludovic Desroches To: , Subject: [RFC PATCH 1/7] gpio: of: use the BIT macro for of_gpio_flags Date: Thu, 14 Dec 2017 15:21:32 +0100 Message-ID: <20171214142138.23008-2-ludovic.desroches@microchip.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20171214142138.23008-1-ludovic.desroches@microchip.com> References: <20171214142138.23008-1-ludovic.desroches@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171214_062333_495454_F418BB1E X-CRM114-Status: UNSURE ( 7.29 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ludovic Desroches Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use the BIT macro for the of_gpio_flags enumeration. Signed-off-by: Ludovic Desroches --- include/linux/of_gpio.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h index 18a7f03e1182..f928c2df2bcd 100644 --- a/include/linux/of_gpio.h +++ b/include/linux/of_gpio.h @@ -14,6 +14,7 @@ #ifndef __LINUX_OF_GPIO_H #define __LINUX_OF_GPIO_H +#include #include #include #include @@ -28,10 +29,10 @@ struct device_node; * Linux-specific in their .xlate callback. Though, 1:1 mapping is recommended. */ enum of_gpio_flags { - OF_GPIO_ACTIVE_LOW = 0x1, - OF_GPIO_SINGLE_ENDED = 0x2, - OF_GPIO_OPEN_DRAIN = 0x4, - OF_GPIO_TRANSITORY = 0x8, + OF_GPIO_ACTIVE_LOW = BIT(0), + OF_GPIO_SINGLE_ENDED = BIT(1), + OF_GPIO_OPEN_DRAIN = BIT(2), + OF_GPIO_TRANSITORY = BIT(3), }; #ifdef CONFIG_OF_GPIO