From: Mattia Dongili <malattia@linux.it>
To: Armin Wolf <W_Armin@gmx.de>
Cc: "Michał Szczepaniak" <m.szczepaniak.000@gmail.com>,
platform-driver-x86@vger.kernel.org
Subject: Re: [sony-laptop] Hardware keys are not properly mapped on Sony VAIO UX VGN-UX390N
Date: Tue, 2 Jul 2024 21:12:30 +0900 [thread overview]
Message-ID: <ZoPurnLUNXW4_T_u@taihen.jp> (raw)
In-Reply-To: <af6fd27a-76bd-472d-a773-d25d23ad15c9@gmx.de>
On Sat, Jun 29, 2024 at 10:07:25PM +0200, Armin Wolf wrote:
> Am 19.06.24 um 14:02 schrieb Armin Wolf:
>
> > Am 19.06.24 um 10:16 schrieb Mattia Dongili:
> >
> > > On Wed, Jun 19, 2024 at 10:00:18AM +0200, Michał Szczepaniak wrote:
> > > > On 19/06/2024 09:54, Mattia Dongili wrote:
> > > > > On Tue, Jun 18, 2024 at 11:18:12PM +0200, Armin Wolf wrote:
[...]
> > > > > > From 7c44c1d15f859647f19e5e2d9874432bb3a5cb92 Mon Sep 17
> > > > > > 00:00:00 2001
> > > > > > From: Armin Wolf <W_Armin@gmx.de>
> > > > > > Date: Tue, 18 Jun 2024 23:09:36 +0200
> > > > > > Subject: [PATCH] platform/x86: sony-laptop: Fix
> > > > > > SONYPI_EVENT_ZOOM_OUT_PRESSED
> > > > > > on Sony VAIO UX VGN-UX390N
> > > > > >
> > > > > > It turns out that on type 3 models, the definitions for the
> > > > > > programmable
> > > > > > keys partially conflict with the definitions for the zoom keys.
> > > > > >
> > > > > > This causes SONYPI_EVENT_ZOOM_OUT_PRESSED on the Sony VAIO UX
> > > > > > VGN-UX390N
> > > > > > to be reported as SONYPI_EVENT_PKEY_P1. Fix this by providing a
> > > > > > separate
> > > > > > definition for type3 models without the conflicting key entry.
> > > > > >
> > > > > > Signed-off-by: Armin Wolf <W_Armin@gmx.de>
> > > > > > ---
> > > > > > drivers/platform/x86/sony-laptop.c | 9 ++++++++-
> > > > > > 1 file changed, 8 insertions(+), 1 deletion(-)
> > > > > >
> > > > > > diff --git a/drivers/platform/x86/sony-laptop.c
> > > > > > b/drivers/platform/x86/sony-laptop.c
> > > > > > index 3e94fdd1ea52..0e1d099ac06a 100644
> > > > > > --- a/drivers/platform/x86/sony-laptop.c
> > > > > > +++ b/drivers/platform/x86/sony-laptop.c
> > > > > > @@ -3451,6 +3451,13 @@ static struct sonypi_event sonypi_pkeyev[] = {
> > > > > > { 0, 0 }
> > > > > > };
> > > > > > +static struct sonypi_event sonypi_pkeyev_type3[] = {
> > > > > > + { 0x01, SONYPI_EVENT_PKEY_P1 },
> > > > > > + { 0x02, SONYPI_EVENT_PKEY_P2 },
> > > > > > + { 0x04, SONYPI_EVENT_PKEY_P3 },
> > > > > > + { 0, 0 }
> > > > > > +};
> > > > > > +
> > > > > > /* The set of possible bluetooth events */
> > > > > > static struct sonypi_event sonypi_blueev[] = {
> > > > > > { 0x55, SONYPI_EVENT_BLUETOOTH_PRESSED },
> > > > > > @@ -3572,7 +3579,7 @@ static struct sonypi_eventtypes
> > > > > > type3_events[] = {
> > > > > > { 0x31, SONYPI_MEMORYSTICK_MASK, sonypi_memorystickev },
> > > > > > { 0x41, SONYPI_BATTERY_MASK, sonypi_batteryev },
> > > > > > { 0x31, SONYPI_PKEY_MASK, sonypi_pkeyev },
> > > > > > - { 0x05, SONYPI_PKEY_MASK, sonypi_pkeyev },
> > > > > > + { 0x05, SONYPI_PKEY_MASK, sonypi_pkeyev_type3 },
> > > > > Based on the commits you found, the conflicting event was added for
> > > > > the
> > > > > VGN-A series (a Type3 model). This change is effectively removing
> > > > > the P1
> > > > > button handling for them.
> > > > >
> > > > > See 3eb8749a37990b505ab94466038c067444bbd7eb and later
> > > > > e93c8a6819b217f4f4a490f67f26e02ff6b23b44: there used to be a Type4
> > > > > model
> > > > > that was meant to keep some of the events separate from Type3 models.
> > > > > Perhaps reintroducing the distinction is going to serve us better in
> > > > > this case?
> > > > > The IRQ handler can be shared between Type3/4, but the events
> > > > > can be in separate arrays, one for type3 and one for type4.
> > > > >
> > > > > What do you think?
> >
> > Sounds good, however there seem to be even more conflicting key
> > entries inside the type 3 key definitions.
> > Since you are the maintainer of the driver, i would prefer if you
> > would handle this.
> >
> > Thanks,
> > Armin Wolf
> >
> Any progress so far?
Sorry, no. I don't think I'll have time to work on this for a few more weeks.
If you want to work on a fix please do, but like I said I'd rather not
risk breaking other models to fix one.
--
mattia
:wq!
prev parent reply other threads:[~2024-07-02 12:12 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-14 15:06 [sony-laptop] Hardware keys are not properly mapped on Sony VAIO UX VGN-UX390N Michał Szczepaniak
2024-06-16 18:18 ` Armin Wolf
2024-06-16 20:34 ` Michał Szczepaniak
2024-06-16 22:48 ` Armin Wolf
2024-06-18 1:24 ` Mattia Dongili
2024-06-18 7:09 ` Michał Szczepaniak
2024-06-18 11:47 ` Armin Wolf
2024-06-18 13:08 ` Michał Szczepaniak
2024-06-18 21:18 ` Armin Wolf
2024-06-19 0:08 ` Michał Szczepaniak
2024-06-19 7:54 ` Mattia Dongili
2024-06-19 8:00 ` Michał Szczepaniak
2024-06-19 8:16 ` Mattia Dongili
2024-06-19 12:02 ` Armin Wolf
2024-06-29 20:07 ` Armin Wolf
2024-07-02 12:12 ` Mattia Dongili [this message]
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=ZoPurnLUNXW4_T_u@taihen.jp \
--to=malattia@linux.it \
--cc=W_Armin@gmx.de \
--cc=m.szczepaniak.000@gmail.com \
--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