Re: [sony-laptop] Hardware keys are not properly mapped on Sony VAIO UX VGN-UX390N

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
> > > > > > 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@xxxxxx>
> > > > > > ---
> > > > > >    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!





[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux