From patchwork Fri Nov 16 16:23:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10686633 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 D625714D6 for ; Fri, 16 Nov 2018 16:27:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C1E372CC21 for ; Fri, 16 Nov 2018 16:27:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B41042D26D; Fri, 16 Nov 2018 16:27:13 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 3B0AD2CC21 for ; Fri, 16 Nov 2018 16:27:13 +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=3UerUtJU91Nrs0wkq3w+fAovdyAADBFj87P6dkQ9QXI=; b=LFFym9UkwXHZZP rvtgpLZ3B793Dp1+k0TTVtRyg7CBqtjqob2/Jcx/Qh2t23WyoPX0gCngv11tJk3ZJR6O2eRtCVAW2 Cqy9qnATDnFaNTWFdVmczNB5DT9cj1CoH3bIIRqH9RH8ReYyCKwtc4RNJCEoogmMnrhKK80t8l6bH Z534Vtibsw1+cOSSEOCo9hYGVvgIWo2PxUNJ/4emuetlfXLzzl74dD/MQeMfSBpZYybYSREdY+IkY cPT4p6ayaGYj26oII6Q0Wu6OSnvQzS4d3f8bG1FY5D3TJywdnZuvE2ULlHNnPZJNDJn/6Z7ttp/7Q mtUyV/cRjd5EL0ZSAxhg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNgxT-000752-54; Fri, 16 Nov 2018 16:27:03 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNgva-0004A1-Gm for linux-arm-kernel@bombadil.infradead.org; Fri, 16 Nov 2018 16:25:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=8wP0gVV3Zl93pzAu8XGhRa39F4fhDnZ6pOzMe6JY0Q0=; b=f9NqDS5Y40ybSc0ZB8WNuEdgO5 fh97AVi5lWceG53xAHEF3M3m2an0yq2BDVZZHi/tA3CD2VPcroL5xf8rI+rWFPFPrvf4n/PJle9i+ RRwtwD5l4PVTteqT0W3DCa+r1wWazM2Kxes7V6qGz/GljNj/u839RXvI8KzvMPB3co5c20vAlKkPC GZH0kWKbrRweKb1zhuO1UK3yC6UWGe7SygbJ1hOeRkYRiQhFTS5i6xcI6ewfdybtGpKM+7ezp5bso D2o4RGi1z5nSxKqTCqg3FISvVjtL9r0JiEV46TOSuu1kHnrQAs+EJjxmwV+E37H3x+p7knHUjTztH mz+/Jsyw==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNgvX-0001qD-6J for linux-arm-kernel@lists.infradead.org; Fri, 16 Nov 2018 16:25:03 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id B802A531BC; Fri, 16 Nov 2018 17:25:00 +0100 (CET) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id zqiRkGA0TpfN; Fri, 16 Nov 2018 17:24:40 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id A877252BCA; Fri, 16 Nov 2018 17:24:23 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id GzltHdsBBfvu; Fri, 16 Nov 2018 17:24:20 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 639C252D03; Fri, 16 Nov 2018 17:24:17 +0100 (CET) From: Lubomir Rintel To: Mark Brown , Geert Uytterhoeven , Darren Hart , Andy Shevchenko Subject: [PATCH v2 09/17] Platform: OLPC: Use BIT() and GENMASK() for event masks Date: Fri, 16 Nov 2018 17:23:55 +0100 Message-Id: <20181116162403.49854-10-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181116162403.49854-1-lkundrak@v3.sk> References: <20181116162403.49854-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181116_112503_421135_2C0692B8 X-CRM114-Status: UNSURE ( 9.92 ) 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: Mark Rutland , devicetree@vger.kernel.org, devel@driverdev.osuosl.org, Eric Miao , James Cameron , linux-pm@vger.kernel.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Sebastian Reichel , Haojian Zhuang , linux-spi@vger.kernel.org, Lubomir Rintel , Rob Herring , linux-arm-kernel@lists.infradead.org, platform-driver-x86@vger.kernel.org, Robert Jarzmik , Daniel Mack 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 Just a cosmetic tidy-up. Signed-off-by: Lubomir Rintel --- Changes since v1: - This patch was added to the set. include/linux/olpc-ec.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/include/linux/olpc-ec.h b/include/linux/olpc-ec.h index 7fa3d27f7fee..f7b6a7eda232 100644 --- a/include/linux/olpc-ec.h +++ b/include/linux/olpc-ec.h @@ -2,6 +2,8 @@ #ifndef _LINUX_OLPC_EC_H #define _LINUX_OLPC_EC_H +#include + /* XO-1 EC commands */ #define EC_FIRMWARE_REV 0x08 #define EC_WRITE_SCI_MASK 0x1b @@ -17,17 +19,16 @@ #define EC_EXT_SCI_QUERY 0x85 /* SCI source values */ -#define EC_SCI_SRC_EMPTY 0x00 -#define EC_SCI_SRC_GAME 0x01 -#define EC_SCI_SRC_BATTERY 0x02 -#define EC_SCI_SRC_BATSOC 0x04 -#define EC_SCI_SRC_BATERR 0x08 -#define EC_SCI_SRC_EBOOK 0x10 /* XO-1 only */ -#define EC_SCI_SRC_WLAN 0x20 /* XO-1 only */ -#define EC_SCI_SRC_ACPWR 0x40 -#define EC_SCI_SRC_BATCRIT 0x80 -#define EC_SCI_SRC_GPWAKE 0x100 /* XO-1.5 only */ -#define EC_SCI_SRC_ALL 0x1FF +#define EC_SCI_SRC_GAME BIT(0) +#define EC_SCI_SRC_BATTERY BIT(1) +#define EC_SCI_SRC_BATSOC BIT(2) +#define EC_SCI_SRC_BATERR BIT(3) +#define EC_SCI_SRC_EBOOK BIT(4) /* XO-1 only */ +#define EC_SCI_SRC_WLAN BIT(5) /* XO-1 only */ +#define EC_SCI_SRC_ACPWR BIT(6) +#define EC_SCI_SRC_BATCRIT BIT(7) +#define EC_SCI_SRC_GPWAKE BIT(8) /* XO-1.5 only */ +#define EC_SCI_SRC_ALL GENMASK(8, 0) struct platform_device;