Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1000719yba; Thu, 4 Apr 2019 02:07:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqz/81YH3DpWXsUl6GGwMxJ0X8rcyiurvwOnUKtznmPisuxYiWwf85C83x5ReQqKCsPoDbCo X-Received: by 2002:aa7:8719:: with SMTP id b25mr4701958pfo.90.1554368868510; Thu, 04 Apr 2019 02:07:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554368868; cv=none; d=google.com; s=arc-20160816; b=sp1ozOhM4nxeC//767LiveG3V1d/Jy4rUOgXTO4jHMSATi4kzh1FQoEBS05dCnm6hO x0L7JWWn6bF02tCIl/ZiR07X/mGKbXqtLZK1/z82F428XKmQPznDP+9EW5LpX9mZV1up OJJ1HRL3G5zDYgA2IMZ9P+NBH0uX6INxYZELTamly1rmTqxQmutyMHmK4155cBitSiSB DTidrJySCKTIwqilb3nLQ2XY2T0oM1/aWnSprTOwneLqDr9yuX7DBhfc/WZHUqh9C/2D fuDLpp6LCAmmVvOYCgmhs/7Q7nfOUEgi4SzQGIgxFd2dnXmbDDzxLhN9NsfJw44zWj+F NxCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZqYEbuGXA1fk/81K1QrGeOqXES+U7u1nuDYY0dp1Qok=; b=gpEaG+C30vz9FyGkXAaBrCft2TMqzyUv+rxK5ab7YRFRYNluFLRFYTro+mmRgVWEjw Me8QeruV42HDEKSXV8KkpjgqtT59cdWJzr5mnwgCwzthN8MQ4P/Jxo83utPJF+Yj9Sgg 1T3BCuwReJJIvlS+E+s+ngBx6foWwtoGMUKfAZr67bMd21kHLiQVn/alihrnP2X6xe7L 1hLOFFOfCXjZM1PxvurQou4WEKOV+QGUWkq+lUsLW3RMGvI3ceQZqSrYHkAWG8shknZW mRRFNJCrgyetzuGD443sUStea9SVwxw3Z6Qvka71glT5TqEGJpoMVc5MW/znGk0WuPo+ 5P2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MiLGHjRU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 124si10554367pgi.38.2019.04.04.02.07.33; Thu, 04 Apr 2019 02:07:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MiLGHjRU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732199AbfDDJFp (ORCPT + 99 others); Thu, 4 Apr 2019 05:05:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:43916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732187AbfDDJFm (ORCPT ); Thu, 4 Apr 2019 05:05:42 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7DF4321855; Thu, 4 Apr 2019 09:05:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554368742; bh=ihjSHTqdLvC9fBc7wFroTxIx2XqecVcGxgP1WDWeMak=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MiLGHjRU9vv844dxlH/DBDnHlnMwmoilFJ3VFHbL9Jx03mnEm4d8Rr8i5Uk/vJyqA y5i9t+xi+rG1atAf7PKYEGsHU0oy//fFvTKyBqlkv5z2UIEmum9LCUl7X9OVsfLsv1 55mbTL/zS9vmwpGXwvR+5IHxboIjDNLueIX3kKzU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tristian Celestin , =?UTF-8?q?J=C3=A9r=C3=B4me=20de=20Bretagne?= , Mario Limonciello , "Darren Hart (VMware)" , Sasha Levin Subject: [PATCH 4.19 153/187] platform/x86: intel-hid: Missing power button release on some Dell models Date: Thu, 4 Apr 2019 10:48:10 +0200 Message-Id: <20190404084610.328165511@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404084603.119654039@linuxfoundation.org> References: <20190404084603.119654039@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit e97a34563d18606ee5db93e495382a967f999cd4 ] Power button suspend for some Dell models was added in: commit 821b85366284 ("platform/x86: intel-hid: Power button suspend on Dell Latitude 7275") by checking against the power button press notification (0xCE) to report the power button press event. The corresponding power button release notification (0xCF) was caught and ignored to stop it from being reported as an "unknown event" in the logs. The missing button release event is creating issues on Android-x86, as reported on the project mailing list for a Dell Latitude 5175 model, since the events are expected in down/up pairs. Report the power button release event to fix this issue. Link: https://groups.google.com/forum/#!topic/android-x86/aSwZK9Nf9Ro Tested-by: Tristian Celestin Tested-by: Jérôme de Bretagne Signed-off-by: Jérôme de Bretagne Reviewed-by: Mario Limonciello [dvhart: corrected commit reference format per checkpatch] Signed-off-by: Darren Hart (VMware) Signed-off-by: Sasha Levin --- drivers/platform/x86/intel-hid.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/intel-hid.c b/drivers/platform/x86/intel-hid.c index 6cf9b7fa5bf0..3201a83073b5 100644 --- a/drivers/platform/x86/intel-hid.c +++ b/drivers/platform/x86/intel-hid.c @@ -373,7 +373,7 @@ wakeup: * the 5-button array, but still send notifies with power button * event code to this device object on power button actions. * - * Report the power button press; catch and ignore the button release. + * Report the power button press and release. */ if (!priv->array) { if (event == 0xce) { @@ -382,8 +382,11 @@ wakeup: return; } - if (event == 0xcf) + if (event == 0xcf) { + input_report_key(priv->input_dev, KEY_POWER, 0); + input_sync(priv->input_dev); return; + } } /* 0xC0 is for HID events, other values are for 5 button array */ -- 2.19.1