Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp250087ybd; Tue, 25 Jun 2019 20:44:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDJjuaIbwCuiujdbesWped5NJcJB1ZVzUEWza9seALpyZgK4bZppWhI32tEbMBt235GktA X-Received: by 2002:a63:5212:: with SMTP id g18mr537837pgb.387.1561520665174; Tue, 25 Jun 2019 20:44:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561520665; cv=none; d=google.com; s=arc-20160816; b=ZkdQUqiuhaaB12Guc8h6lF+qHXebcryooOhP5+UX2aXkPUvvnzYPd4j5PsG4+92ygh IvSefGJ1ZaGskz79KoGvxvP45zoUR/UQngIJ8Du5DqD5rj1KqCHzBcFE2x3+fL0kiGDI /dNoYl2jMgfjFdPP0KMFI7/Wb4WXvZMzAg9i41Msn5VXv8YPYNVeowPadax1HIgxKEe3 XG4U3UPsRaiDjTu/meAVfdJJFdsnUZN0GzLOTi39YsoYT5wYQWVItifwG0WYwQWaUGNr rrjsxCcAzUIyikN65GGixqfo4avxusFSejTWZ+hyFZYpbQpsVt1w7iC4lLOfd/u2qi90 N/Sw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=X5qOPer5MJenUV2dWHfiR15M1VVpn64FjAaOgS8dVU0=; b=0fkuNGXAco8d2MqRb0wRunVxI2tNVCbMXiKSaur1LcU/0tQB9z+dCZWpan0Tmmh61U unJ0i97xSCK4J271JZNsXFvnEtfqtLkOpt5wvcle0I5Hp49ql3yzVl9VZ0Mnc+LNr7A2 MHr37BIsv8fWFvlwss04UrAa6a6oHdaJtZBZ9JUsdXodSJJl0Sjd8PXyORukby42DCtt Wvn+xC+5vugWUZfR9JX/5ixry0RHEeRmb1gEoYs6nWnOu3WoIUjqvgJD42SUMsLheDhw uDi273Gh7qTMhKTA6yQy+Y1VqCuQL3q/cJj5oughlgdNV82lFrZMS6aRU6mT8J8zpr2D Ursg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Sqk8UGj8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a3si15930309pff.117.2019.06.25.20.44.09; Tue, 25 Jun 2019 20:44:25 -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=Sqk8UGj8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726898AbfFZDnU (ORCPT + 99 others); Tue, 25 Jun 2019 23:43:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:54316 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727259AbfFZDnK (ORCPT ); Tue, 25 Jun 2019 23:43:10 -0400 Received: from sasha-vm.mshome.net (mobile-107-77-172-74.mobile.att.net [107.77.172.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B5E48216E3; Wed, 26 Jun 2019 03:43:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561520590; bh=hj9KGbkr4AqICPcOaWd8LGYkgMnOsDSZM4G15WuTWFA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sqk8UGj8DD5xuGjgD4umAgMMSndgQUyJy9qyT7SNjLu6r5o0/Q/r7zgzKMy8ex+IR dcJdDTuBo95Fhbq9Q2EP5X3XWTw4PDEYYTsCnOazcfAXnlUp7db5DVWLtnYNpF7ftm y+H4AHeQJKytzX33p0zC0rB+Er+5EMMLnHIUSNSo= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Hans de Goede , =?UTF-8?q?Jo=C3=A3o=20Paulo=20Rechi=20Vita?= , Andy Shevchenko , Sasha Levin , acpi4asus-user@lists.sourceforge.net, platform-driver-x86@vger.kernel.org Subject: [PATCH AUTOSEL 5.1 40/51] platform/x86: asus-wmi: Only Tell EC the OS will handle display hotkeys from asus_nb_wmi Date: Tue, 25 Jun 2019 23:40:56 -0400 Message-Id: <20190626034117.23247-40-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190626034117.23247-1-sashal@kernel.org> References: <20190626034117.23247-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hans de Goede [ Upstream commit 401fee8195d401b2b94dee57383f627050724d5b ] Commit 78f3ac76d9e5 ("platform/x86: asus-wmi: Tell the EC the OS will handle the display off hotkey") causes the backlight to be permanently off on various EeePC laptop models using the eeepc-wmi driver (Asus EeePC 1015BX, Asus EeePC 1025C). The asus_wmi_set_devstate(ASUS_WMI_DEVID_BACKLIGHT, 2, NULL) call added by that commit is made conditional in this commit and only enabled in the quirk_entry structs in the asus-nb-wmi driver fixing the broken display / backlight on various EeePC laptop models. Cc: João Paulo Rechi Vita Fixes: 78f3ac76d9e5 ("platform/x86: asus-wmi: Tell the EC the OS will handle the display off hotkey") Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko Signed-off-by: Sasha Levin --- drivers/platform/x86/asus-nb-wmi.c | 8 ++++++++ drivers/platform/x86/asus-wmi.c | 2 +- drivers/platform/x86/asus-wmi.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c index b6f2ff95c3ed..59f3a37a44d7 100644 --- a/drivers/platform/x86/asus-nb-wmi.c +++ b/drivers/platform/x86/asus-nb-wmi.c @@ -78,10 +78,12 @@ static bool asus_q500a_i8042_filter(unsigned char data, unsigned char str, static struct quirk_entry quirk_asus_unknown = { .wapf = 0, + .wmi_backlight_set_devstate = true, }; static struct quirk_entry quirk_asus_q500a = { .i8042_filter = asus_q500a_i8042_filter, + .wmi_backlight_set_devstate = true, }; /* @@ -92,26 +94,32 @@ static struct quirk_entry quirk_asus_q500a = { static struct quirk_entry quirk_asus_x55u = { .wapf = 4, .wmi_backlight_power = true, + .wmi_backlight_set_devstate = true, .no_display_toggle = true, }; static struct quirk_entry quirk_asus_wapf4 = { .wapf = 4, + .wmi_backlight_set_devstate = true, }; static struct quirk_entry quirk_asus_x200ca = { .wapf = 2, + .wmi_backlight_set_devstate = true, }; static struct quirk_entry quirk_asus_ux303ub = { .wmi_backlight_native = true, + .wmi_backlight_set_devstate = true, }; static struct quirk_entry quirk_asus_x550lb = { + .wmi_backlight_set_devstate = true, .xusb2pr = 0x01D9, }; static struct quirk_entry quirk_asus_forceals = { + .wmi_backlight_set_devstate = true, .wmi_force_als_set = true, }; diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index ee1fa93708ec..a66e99500c12 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -2131,7 +2131,7 @@ static int asus_wmi_add(struct platform_device *pdev) err = asus_wmi_backlight_init(asus); if (err && err != -ENODEV) goto fail_backlight; - } else + } else if (asus->driver->quirks->wmi_backlight_set_devstate) err = asus_wmi_set_devstate(ASUS_WMI_DEVID_BACKLIGHT, 2, NULL); status = wmi_install_notify_handler(asus->driver->event_guid, diff --git a/drivers/platform/x86/asus-wmi.h b/drivers/platform/x86/asus-wmi.h index 6c1311f4b04d..57a79bddb286 100644 --- a/drivers/platform/x86/asus-wmi.h +++ b/drivers/platform/x86/asus-wmi.h @@ -44,6 +44,7 @@ struct quirk_entry { bool store_backlight_power; bool wmi_backlight_power; bool wmi_backlight_native; + bool wmi_backlight_set_devstate; bool wmi_force_als_set; int wapf; /* -- 2.20.1