Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp885787pxb; Wed, 3 Mar 2021 19:43:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQz03bq4mhk9sIEyRXlIuS1xFrsMmDTHtSHwdcxsFKiPzUbY2HYG2Ri5tqJ9br10C5BWP1 X-Received: by 2002:a17:906:66cc:: with SMTP id k12mr1959998ejp.382.1614829436393; Wed, 03 Mar 2021 19:43:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614829436; cv=none; d=google.com; s=arc-20160816; b=JWfvg3lz0eoOeQVWna+PhzSnJH1RS4C37LUM9qKEPM4zol3ceK9VAq8pMNa5x8+OX5 u0FTV7VriAYzDemWjHAbuZ15otKhiXUSRgfLrsDl/YVwzfCIpUSXd8Be/N3QCU7KiKam 9qJExHLWD/946rEhL+oaOO//wEzOVpESm/OD7VIgt2KUh7K2KU5lsPQrsj42lZyDVD6q 2iCRvemBeRAvE2/DdIRZ4JYgPxAhxflMHlYbb8pwVdcxtg0l1Vty73u926Kc4/sXJwbt MCts9aqj8xwUmIHPj7AQkp8PrulbmM1KCoLAGZLUCHQysAjAWHVcAIpHoS+WrPVAs4I5 Ht/w== 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=i1or6H9FI65m4N2bzHfu3ATuOAcFfM0TWGr++PPuWxQ=; b=c6Nz45zpSzBftYWBz3isFDqtTF/TZYxjW/KiH7YkKzduxc/GTuKIWlgOy7/9Dr0a5S Ow15SL/nMiNbAuzphnc5x3We7Isqqr5AWZzuY5+ESHKs4FNnw9yYIFv9T2IfAjE3CwZb 9pWBjTd9b+kOvHB8j4/VthY3tIKeL5Y7t8jJqsjfwsRFx6WrwV1nx7fHuWCpw6pi4M3y 2JCOBNhmkGz2z+BWOyyT08FsGnDHc0Btv44iveCNbDWVam9Hv/GkJldMU9yCfXavj1bM 8Fcub5PIcJ+OhqfSIv2xmyMKLToI2Mi0eRnreTo8nL6axYhxJGZOQh5XUjyVXVkndSuo KFTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0NKrJW7J; 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 t4si2616628ejd.376.2021.03.03.19.43.34; Wed, 03 Mar 2021 19:43:56 -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=0NKrJW7J; 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 S1379755AbhCBBbE (ORCPT + 99 others); Mon, 1 Mar 2021 20:31:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:45284 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241303AbhCATTX (ORCPT ); Mon, 1 Mar 2021 14:19:23 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 46EDF651CA; Mon, 1 Mar 2021 17:17:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614619025; bh=eVpNBYO+zCrDSxxvHZxGxthYvU6+BsoZE78DED3ha/c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0NKrJW7JJKsDigq4TRiutUke1dcvsXekGxBtO7uye8pwNMRezOQ2xuwKVn60JlwOp hZqyzX83a4xPBcugzwSTw8RPaMWoDZiQIHZqzk8WLBtM/H56F+EGtDrOrvCXQ/uD+o WwzvxeVmldJHeTu5fTC3Jc1WjTG49Esoqhed8htE= 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 305/663] platform/chrome: cros_ec_proto: Add LID and BATTERY to default mask Date: Mon, 1 Mar 2021 17:09:13 +0100 Message-Id: <20210301161156.933768396@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 852405d8efcbca0e02f14592fb1d1dcd0d3fb508 ] After 'platform/chrome: cros_ec_proto: Use EC_HOST_EVENT_MASK not BIT' some of the flags are not quite correct. LID_CLOSED is used to suspend the device, so it makes sense to ignore that. BATTERY events are also frequent and causing spurious wakes on elm/hana mt8173 devices. 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.2.I3291bf83e4884c206b097ede34780e014fa3e265@changeid Signed-off-by: Sasha Levin --- drivers/platform/chrome/cros_ec_proto.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/platform/chrome/cros_ec_proto.c b/drivers/platform/chrome/cros_ec_proto.c index 4e442175612d4..ea5149efcbeae 100644 --- a/drivers/platform/chrome/cros_ec_proto.c +++ b/drivers/platform/chrome/cros_ec_proto.c @@ -526,9 +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 & - ~(EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_DISCONNECTED) | + ~(EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED) | + 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_BATTERY) | EC_HOST_EVENT_MASK(EC_HOST_EVENT_PD_MCU) | EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_STATUS)); /* -- 2.27.0