Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8422291ybl; Thu, 16 Jan 2020 16:34:17 -0800 (PST) X-Google-Smtp-Source: APXvYqzh3+8+RS9Fn+WzHNXefvj27iLq7hnRN3tlSOVGU+RrO1bDrOsQ+WLPKzhbm4RH3N3L2ero X-Received: by 2002:aca:d985:: with SMTP id q127mr1470828oig.132.1579221257562; Thu, 16 Jan 2020 16:34:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579221257; cv=none; d=google.com; s=arc-20160816; b=IJ3eWQ7JFUfGJ8DDjQAOsMcGs6QFZ1Rtvf+0p0ShjBtT8mM9GdrOX23oTfweTIFXTf OmFYHu2b/ZhEbCwvwQ3L/q4q2UEMvcIkeHFelx48YU/uA7e470UkmcCk9XX1yJG2GTIm fwjbpTreIoBPMRop68hmWGE9wamV/TbZWpUUsI6VIo6eUDC2atCKkjwxI7CPU30OnOvm 4GJkcT4lFOnb1m6twfjSNmcUoCYpruX6dgeDZ3SuRCFY8kc9Dkm3Ac4iKeoO4nooenJD P7PCpksYcQfAVXii5ntfM4oMFZU4qDrl1W7bd82W5fSt57Z+zqpTJhIcj752eA5Lin0/ UCTw== 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=yRMO2QqX9Le7HFBZRJHlbTB5K9xOxxmAaMe3aN1c4SU=; b=wYL3SJVHcDyMw49+5038teWahaQb0BV4P7KxY7RnW8Jy3wT09fqrjx1pav04Sc2WdR QUk9ENY0jrsq6yZGdzz9ePruOmZ+8qSNtAJK4inbxK/+G8ACD0v3uaWsjLx2PsgN6klS fNUsMsbI4xnRCnGFktt//mnVhqboRqVJAwbIx57zFvcedIDkEw1xDRjvFIN5jYEtMHON vizx7eYjmAc9DBgmveVtbsoLU5QXqiVA4ojKDzGoyLE37lFyZgth/VBFgw0RvCatxmQL wMfVq4VW6QJk6zTHQpky7tlBuaPQyjiBAIXYcM2JMISSqNe+48iK3pehGirmwdNX3SrM Uc9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="h8Ex1/kB"; 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 m7si12165595oih.7.2020.01.16.16.34.05; Thu, 16 Jan 2020 16:34:17 -0800 (PST) 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="h8Ex1/kB"; 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 S2389418AbgAPXXR (ORCPT + 99 others); Thu, 16 Jan 2020 18:23:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:51406 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387787AbgAPXXO (ORCPT ); Thu, 16 Jan 2020 18:23:14 -0500 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 235BB206D9; Thu, 16 Jan 2020 23:23:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579216993; bh=4fSvwcd259BM5fC+hglvaxeQVV7bqNO09yYzxt3xtds=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h8Ex1/kBbc+iplFqEy50ov+in9MkR8do4UZdbamcATcq4KhbHUFZZx6nklQEZAkJl KP33J0o1ePp3jnGGgsT7Con8eCiwQFPlvbRlYZsvcP4klhKWqYYzv9SWjHD8fsK5Om XfUFFniGnyWp9uXeuiuRiDlHY0gcSVvJTZe6ceq4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jian-Hong Pan , Daniel Drake , Andy Shevchenko Subject: [PATCH 5.4 088/203] platform/x86: asus-wmi: Fix keyboard brightness cannot be set to 0 Date: Fri, 17 Jan 2020 00:16:45 +0100 Message-Id: <20200116231753.351602596@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200116231745.218684830@linuxfoundation.org> References: <20200116231745.218684830@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Jian-Hong Pan commit 176a7fca81c5090a7240664e3002c106d296bf31 upstream. Some of ASUS laptops like UX431FL keyboard backlight cannot be set to brightness 0. According to ASUS' information, the brightness should be 0x80 ~ 0x83. This patch fixes it by following the logic. Fixes: e9809c0b9670 ("asus-wmi: add keyboard backlight support") Signed-off-by: Jian-Hong Pan Reviewed-by: Daniel Drake Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman --- drivers/platform/x86/asus-wmi.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -512,13 +512,7 @@ static void kbd_led_update(struct asus_w { int ctrl_param = 0; - /* - * bits 0-2: level - * bit 7: light on/off - */ - if (asus->kbd_led_wk > 0) - ctrl_param = 0x80 | (asus->kbd_led_wk & 0x7F); - + ctrl_param = 0x80 | (asus->kbd_led_wk & 0x7F); asus_wmi_set_devstate(ASUS_WMI_DEVID_KBD_BACKLIGHT, ctrl_param, NULL); }