Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp619130pxb; Wed, 3 Mar 2021 10:56:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJzsE118kNcKqYO5B/ie2ywD59DMJr8rk9PPWrnKvJ1RMQ29Q+ofvCBULhBx60IudTqNGS7c X-Received: by 2002:a05:6402:3122:: with SMTP id dd2mr686608edb.253.1614797778962; Wed, 03 Mar 2021 10:56:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614797778; cv=none; d=google.com; s=arc-20160816; b=zAWNrfrkYaPJqkx5v2/W8pm1hBUqTQ9oVoouiyAAF1uuZzFtgf2GrdF/yRiM8RLgFD mBP3/5LcZUP5jFXiL83SG5aupfWbVg5MmUum+1IV1MDNTm8xdC7I3T1LusZt6Pxo5dLw Q6VHVgOz3eYVuixG6L5iUnB8CVCYOJXLWfX0hcJ7acibSvf1OijU+MdlEShD2TFU1Iff HKIlGjntXAAvO7JhPIJ0BfX6gLKwtk1T/yvgw3LXDOUe+Yr+AoTxNBHcg7TfZkpjE5wG ECXPVKqgmjCiyUWu2kLM/JWKwsHY9pnIzxlJwSzFHrd/tLXI4olS/bzpHzAwn6XJCOvG rIjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WSQE/8MQ0UZgfTm/E7i/qtc/6PUIPPiZ8NPJzArtgvY=; b=eOz8o5ANyJgz+G1xkHIZiHy332sT/JxiqKdKrvIAgTaZ9HoAsgrXx5E+qTlmYRXe9o kmDxzCRe5lix/DR7neEr9VfOEOUheDXO+M2h+17ylVVeoKOVLblaKwT2f7Fp1Up8BVdy 62bs84fWyGMreiLui/fQel8Hvgb5T4gC5ydSSPPu/wq+3R7/JSIuPiXmNFF5CUSBsi1j JweFmCHKhiotrMvtpdpk6E0mdLR9rwdEtj1hDuqmq7RGQgO0tTPNc5sKIKTlXcqcs+S7 Z71hs097NQ/i6lDhPH2JvVE39bemKA9fSzi/9T9O4sNVr3cBm9ZOz/7HHE1Ya3u0ZYSf hLxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lZuEccKt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n18si9185542edt.3.2021.03.03.10.55.37; Wed, 03 Mar 2021 10:56:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lZuEccKt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378552AbhCBBGv (ORCPT + 99 others); Mon, 1 Mar 2021 20:06:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:34074 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240920AbhCATCu (ORCPT ); Mon, 1 Mar 2021 14:02:50 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6D3C4651C7; Mon, 1 Mar 2021 17:17:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614619022; bh=feIlYXTVLyC7FB0sZlXad6dMoNge6x2vuV/fNVk3dRE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lZuEccKtxeLod5guBau9Y9O7Pepg/6WipymcF2MPuoMSA3ArdACE1E1IVY+FeZCCg /yLcqPybR8f/si+Lb9SdLptiFuj6Y/dN8cRDxevUqIi6ddXPYGi8iMiIgyr7B4PPHT xwPaDFfT5T49qomtN2gb1pOPe93MM4qFPzOKNvvk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Evan Benn , Brian Norris , Enric Balletbo i Serra , Sasha Levin Subject: [PATCH 5.10 304/663] platform/chrome: cros_ec_proto: Use EC_HOST_EVENT_MASK not BIT Date: Mon, 1 Mar 2021 17:09:12 +0100 Message-Id: <20210301161156.878819492@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161141.760350206@linuxfoundation.org> References: <20210301161141.760350206@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Evan Benn [ Upstream commit 0944ea07baa748741563c8842122010fa9017d16 ] The host_event_code enum is 1-based, use EC_HOST_EVENT_MASK not BIT to generate the intended mask. This patch changes the behaviour of the mask, a following patch will restore the intended behaviour: 'Add LID and BATTERY to default mask' Fixes: c214e564acb2 ("platform/chrome: cros_ec_proto: ignore unnecessary wakeups on old ECs") Signed-off-by: Evan Benn Reviewed-by: Brian Norris Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20201209220306.1.I6133572c0ab3c6b95426f804bac2d3833e24acb1@changeid Signed-off-by: Sasha Levin --- drivers/platform/chrome/cros_ec_proto.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/platform/chrome/cros_ec_proto.c b/drivers/platform/chrome/cros_ec_proto.c index 0ecee8b8773d0..4e442175612d4 100644 --- a/drivers/platform/chrome/cros_ec_proto.c +++ b/drivers/platform/chrome/cros_ec_proto.c @@ -526,11 +526,11 @@ int cros_ec_query_all(struct cros_ec_device *ec_dev) * power), not wake up. */ ec_dev->host_event_wake_mask = U32_MAX & - ~(BIT(EC_HOST_EVENT_AC_DISCONNECTED) | - BIT(EC_HOST_EVENT_BATTERY_LOW) | - BIT(EC_HOST_EVENT_BATTERY_CRITICAL) | - BIT(EC_HOST_EVENT_PD_MCU) | - BIT(EC_HOST_EVENT_BATTERY_STATUS)); + ~(EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_DISCONNECTED) | + EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_LOW) | + EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_CRITICAL) | + EC_HOST_EVENT_MASK(EC_HOST_EVENT_PD_MCU) | + EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_STATUS)); /* * Old ECs may not support this command. Complain about all * other errors. -- 2.27.0