Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp408061pxu; Tue, 1 Dec 2020 14:30:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJwtvZ2OVajQTcEoJdeY6GHS+d9SJMK4BR2toUZHgDJO/bFNCC2qzjPFqfLvXpyDxo/L5oGg X-Received: by 2002:a17:906:8693:: with SMTP id g19mr5502098ejx.111.1606861857082; Tue, 01 Dec 2020 14:30:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606861857; cv=none; d=google.com; s=arc-20160816; b=sDmY8r+ZAGDTXxeuXx5OG5cUAH8WBK9cvWL9EwFKNljs/42jxpjzNQ2b08JJU2rA1t GeRwxwqc3Dj0ddiAA5kUwcuVIKLzwdaaXB6JZuKRkh88Ke4fD8bqWxAb9W8UrYsmEeNN sosMX/wYGwrfas0qqdGEBbdYjt+vnpV3yDTWxZjpHthn+J87wbB9OkTvTasS3lmWJxGZ 2qviX3xgMAegOXry/mevzQeToqtuvatGXtYo0o/FRVgRspK2btXecM0/VdPPqiHT23jz jhz7chVUxlbEpG/V4GFCIlnX0G+QiM682/SeyMgtJF6an9z3TnPw/MVGuJN5B88sD6hq cjOA== 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=MG94Mc9w+Lc3OnmtQP/7N9bmSLY0FVJNzwyrKu1WrhA=; b=lTkPITltffJG/K0+iQIcZk56YhZ9Ib2UHcQwzxQy+mBuUZ2VP6Jh+K4SB05rU9SWJ4 tyYl+tTjIKWwtQHyKod80ezhFgb7EYR3d6fxkybeABEy1RB3gjuAz++FJefC4w1FfKhn 2z04+lnc94LQpyQXBzOX7gDEtDR0oYnzlfeAmhLWUqV2QQRHFXqeaSMcafmTImaFF1Pj RVIxDgbzd9ZuflspEKULEteg4KFt7hYJGDOUDfl2xfDOWPOMg5y+l8bybyz+lcMbQlA/ 3m3AyDCAtVjVJkROLsqYvgtHNtLdqpOdwkeG9dE+TPNJ466spnKXKFvglrfshPFS/QxA KoaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KOvpiWR7; 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 o2si791080ejn.501.2020.12.01.14.30.34; Tue, 01 Dec 2020 14:30:57 -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=KOvpiWR7; 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 S2390831AbgLAJYc (ORCPT + 99 others); Tue, 1 Dec 2020 04:24:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:43116 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388367AbgLAJGN (ORCPT ); Tue, 1 Dec 2020 04:06:13 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 E31F92223F; Tue, 1 Dec 2020 09:05:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606813532; bh=lqZRJVJAtiv01l+CYjt2C3UksiMzZFKzjkY40VVyF7U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KOvpiWR7UNQ9YU0A4/IiApat4iA6Zhn/Z8xuMIsJAxxLv85eC6CmuBIokZeiuAPpr c+bxeECDp/8kZohmXaFuGvEmM5pXj3baP0EKfzWWGr6Kv4e0ltM66NHbznCRm5Jvx9 fQwDo6i9Unif0CVTDHlDLdb1G4ozwLJ7wtM8KOiE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Benjamin Berg , Henrique de Moraes Holschuh , Hans de Goede , Sasha Levin Subject: [PATCH 5.4 72/98] platform/x86: thinkpad_acpi: Send tablet mode switch at wakeup time Date: Tue, 1 Dec 2020 09:53:49 +0100 Message-Id: <20201201084658.600170370@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201201084652.827177826@linuxfoundation.org> References: <20201201084652.827177826@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: Benjamin Berg [ Upstream commit e40cc1b476d60f22628741e53cf3446a29e6e6b9 ] The lid state may change while the machine is suspended. As such, we may need to re-check the state at wake-up time (at least when waking up from hibernation). Add the appropriate call to the resume handler in order to sync the SW_TABLET_MODE switch state with the hardware state. Fixes: dda3ec0aa631 ("platform/x86: thinkpad_acpi: Implement tablet mode using GMMS method") BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210269 Signed-off-by: Benjamin Berg Acked-by: Henrique de Moraes Holschuh Link: https://lore.kernel.org/r/20201123132157.866303-1-benjamin@sipsolutions.net Signed-off-by: Hans de Goede Signed-off-by: Sasha Levin --- drivers/platform/x86/thinkpad_acpi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index abcb336a515a1..5081048f2356e 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -4238,6 +4238,7 @@ static void hotkey_resume(void) pr_err("error while attempting to reset the event firmware interface\n"); tpacpi_send_radiosw_update(); + tpacpi_input_send_tabletsw(); hotkey_tablet_mode_notify_change(); hotkey_wakeup_reason_notify_change(); hotkey_wakeup_hotunplug_complete_notify_change(); -- 2.27.0