From patchwork Sat Feb 10 22:51:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gergo Koteles X-Patchwork-Id: 199321 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1683730dyd; Sat, 10 Feb 2024 14:52:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IEo6SpxAERvBpGPXU2IaV1qcDtcNK2jetu811BsJ38Ku95GUT+SpJhY0K7dQ4owhC90wbyx X-Received: by 2002:a05:6a21:1585:b0:19e:9a8a:4151 with SMTP id nr5-20020a056a21158500b0019e9a8a4151mr4760438pzb.50.1707605571538; Sat, 10 Feb 2024 14:52:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707605571; cv=pass; d=google.com; s=arc-20160816; b=KcvsVNfl8dGLNvfqNjrJATUf4xzSHHev3+H3IHzZqVceFt0K9CdlGY0QGHUP2fa3k0 srgx5q3b/6q9//jQrVOUpnpaYKcVQCK9CYIwYjFfDMKzY97SPfX/3VPlSGU91ZkfFlKm 3OJRyx+LEguhL47Rp5f8XkiBEKm5Zm2QWz92XryVU8TZa5xM0T30gGP0IhcFDDKMiOEK C3JI8X80f+vKHMIJ7DhX2AAFU4WEzqkPrbe9DQaxSjVz7QREfaH+zOho2+aPfKS7296q Zs6S0qE+knZvGqmgM/5pNOhz69o1pyUm0yRoYF9+k2LvaNkffC/Y9HRbEV9K66bE6K0/ 587g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=WS+XKiFNSp4Yz/F2Xww39q3Uze+NnjCXzZmgOhBi2Gk=; fh=vSNVneZ1ogwYmPXFaHOXKgC9XMDBd0fY/pXPQNAOgrA=; b=g/8vZPg4KY7bax+Wxu2XPX/q3h9wlC2isGzOk2235asQf6Ykp9l2ZZHttF5xHo9Pft EX/FzC+Cd8iAyeFJV86eUCrvPh7sv44x3Ydmevy6yYbBXfTvp6qqL3MDx5OwS63a5dBA MVDq49DxeYCC1MhFoK/Ma25U0PGkZsh5dsidj+H0orJrFZe2yRaAaGkoQveMDQLhW5L+ mLdQb53r6KoBbQYOfxOFGfErLMmjr2rkNpMlgrY62So6KZd4A9vk8QMTJrlyE0KlbUpI uygkJciKUebj2QcyrG1yhlufaxPz30hjdxOBzfAUDxXDgkyjeK3kO2fzgPGrmc2HK92/ +Uxw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=irl.hu dmarc=pass fromdomain=irl.hu); spf=pass (google.com: domain of linux-kernel+bounces-60572-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60572-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu X-Forwarded-Encrypted: i=2; AJvYcCX79kFFqTi95rYK8mZDaRfvSebMQOoEPylnuP6/piNKrFRONR2VlCkFZWqRYdV99F9AX/xkk7ZgARsHyvLPtYOc9en8aA== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id mq15-20020a17090b380f00b00296adf67794si4003113pjb.96.2024.02.10.14.52.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 14:52:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60572-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=irl.hu dmarc=pass fromdomain=irl.hu); spf=pass (google.com: domain of linux-kernel+bounces-60572-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60572-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 597122851A2 for ; Sat, 10 Feb 2024 22:52:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8E1E55FF04; Sat, 10 Feb 2024 22:52:37 +0000 (UTC) Received: from irl.hu (irl.hu [95.85.9.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E8537259B; Sat, 10 Feb 2024 22:52:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.85.9.111 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707605556; cv=none; b=Qhf0W1sfQGux31OXxYgcCuBSwJpnmH+N36KtVfoaMD8VwvEIt7CrDbJ+uhDbgyDD01p/JvuCzk0YMI817xwTuQK4w1PwV9YAFyYrgMFjFeOgvLhL/fKfXkZjf5ndtWjjwYBXQmeHkGf7arzq30/D3YFmPC5iU8g9BQuFOffGG9E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707605556; c=relaxed/simple; bh=ojCfonPmi+t4owjCpF349H1y/yURgoI1T78Bd83+Cw0=; h=From:To:Cc:Subject:Date:Message-ID:Mime-Version:Content-Type; b=DUoMLq2avw8VI0ip55xPUbId0KIHqGKHye2YTeFlJLzYqhftoEiwuNzr9Ma/4mmKgNeqOBFVEglj3SFgulgBKsov6VhSl8OBZabW7zKzn9VREyQNRZTdH9TYbvqwZlcPdgU/um/rIe8QNB9tWrPrNIOCADpIaucwIZxIXfydb8A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=irl.hu; spf=pass smtp.mailfrom=irl.hu; arc=none smtp.client-ip=95.85.9.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=irl.hu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=irl.hu Received: from fedori.lan (51b69e54.dsl.pool.telekom.hu [::ffff:81.182.158.84]) (AUTH: CRAM-MD5 soyer@irl.hu, ) by irl.hu with ESMTPSA id 0000000000073C1E.0000000065C7FE2F.001B7FDB; Sat, 10 Feb 2024 23:52:31 +0100 From: Gergo Koteles To: Ike Panhc , Hans de Goede , =?utf-8?q?Ilpo_J=C3=A4rvinen?= Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Gergo Koteles Subject: [PATCH] platform/x86: ideapad-laptop: support Fn+R dual-function key Date: Sat, 10 Feb 2024 23:51:57 +0100 Message-ID: <0cdbc0e6eb65e160384ae0ed152e7de3ded1d9d5.1707604991.git.soyer@irl.hu> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mime-Autoconverted: from 8bit to 7bit by courier 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790554219595544925 X-GMAIL-MSGID: 1790554219595544925 According to the manual, Fn+R adjusts the display refresh rate. Map Fn+R to KEY_DISPLAYTOGGLE. Signed-off-by: Gergo Koteles Acked-by: Ike Panhc --- drivers/platform/x86/ideapad-laptop.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index 88eefccb6ed2..4c130957f80d 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c @@ -1091,6 +1091,8 @@ static const struct key_entry ideapad_keymap[] = { { KE_KEY, 0x07 | IDEAPAD_WMI_KEY, { KEY_HELP } }, { KE_KEY, 0x0e | IDEAPAD_WMI_KEY, { KEY_PICKUP_PHONE } }, { KE_KEY, 0x0f | IDEAPAD_WMI_KEY, { KEY_HANGUP_PHONE } }, + /* Refresh Rate Toggle (Fn+R) */ + { KE_KEY, 0x10 | IDEAPAD_WMI_KEY, { KEY_DISPLAYTOGGLE } }, /* Dark mode toggle */ { KE_KEY, 0x13 | IDEAPAD_WMI_KEY, { KEY_PROG1 } }, /* Sound profile switch */