X86 platform drivers
 help / color / mirror / Atom feed
From: Gergo Koteles <soyer@irl.hu>
To: "Ike Panhc" <ike.pan@canonical.com>,
	"Hans de Goede" <hdegoede@redhat.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] platform/x86: ideapad-laptop: support Fn+R dual-function key
Date: Mon, 19 Feb 2024 13:32:05 +0100	[thread overview]
Message-ID: <531e85d73c1926161eb15f8900ea77aade394b6f.camel@irl.hu> (raw)
In-Reply-To: <3b6a7bba-47a5-469c-aac1-5574ad78dadf@canonical.com>

Hi Ike,

On Mon, 2024-02-19 at 10:39 +0800, Ike Panhc wrote:
> On 2/11/24 06:51, Gergo Koteles wrote:
> > According to the manual, Fn+R adjusts the display refresh rate.
> > Map Fn+R to KEY_DISPLAYTOGGLE.
> > 
> > Signed-off-by: Gergo Koteles <soyer@irl.hu>
> > ---
> >  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 */
> 
> Acked-by: Ike Panhc <ike.pan@canonical.com>
> 
> BTW on which ideapad we need this patch?
> 

Oh, I somehow missed that. I found it on a Yoga 7 14ARB7.

Newer Yogas and Legions with 60Hz/90Hz displays have this refresh rate
toggle feature.

I'm wondering if this would be worth a new KEY_REFRESH_RATE_TOGGLE
event code? 

KEY_DISPLAYTOGGLE is used to toggle the LCD on/off in other drivers.

What do you think?

Thanks,
Gergo

> Thanks.
> 
> --
> Ike


  reply	other threads:[~2024-02-19 12:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-10 22:51 [PATCH] platform/x86: ideapad-laptop: support Fn+R dual-function key Gergo Koteles
2024-02-13 12:01 ` Ilpo Järvinen
2024-02-19  2:39 ` Ike Panhc
2024-02-19 12:32   ` Gergo Koteles [this message]
2024-02-19 12:51     ` Ilpo Järvinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=531e85d73c1926161eb15f8900ea77aade394b6f.camel@irl.hu \
    --to=soyer@irl.hu \
    --cc=hdegoede@redhat.com \
    --cc=ike.pan@canonical.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox