RE: [PATCH] Support tablet mode switch for Dell laptops

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

 



> -----Original Message-----
> From: platform-driver-x86-owner@xxxxxxxxxxxxxxx [mailto:platform-driver-x86-
> owner@xxxxxxxxxxxxxxx] On Behalf Of Pali Rohár
> Sent: Friday, January 19, 2018 10:01 AM
> To: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
> Cc: linux-kernel@xxxxxxxxxxxxxxx; mjg59@xxxxxxxxxxxxx; dvhart@xxxxxxxxxxxxx;
> andy@xxxxxxxxxxxxx; bhush94@xxxxxxxxx; platform-driver-x86@xxxxxxxxxxxxxxx;
> Marco Martin <notmart@xxxxxxxxx>
> Subject: Re: [PATCH] Support tablet mode switch for Dell laptops
> 
> On Thursday 18 January 2018 16:44:08 Pali Rohár wrote:
> > On Thursday 18 January 2018 14:59:50 Marco Martin wrote:
> > > -	if (!sparse_keymap_report_event(priv->input_dev, event, 1, true))
> > > +	if (event == 0xCC) {
> > > +		input_report_switch(priv->input_dev, SW_TABLET_MODE, 1);
> > > +		input_sync(priv->input_dev);
> > > +	} else if (event == 0xCD) {
> > > +		input_report_switch(priv->input_dev, SW_TABLET_MODE, 0);
> > > +		input_sync(priv->input_dev);
> > > +	} else if (!sparse_keymap_report_event(priv->input_dev, event, 1, true))
> >
> > Is not it possible to put 0xCC and 0xCD into sparse keymap table?
> > Because IIRC sparse keymap was created just to avoid that big
> > if-elseif-elseif-else blocks.
> 
> Dmitry, can you comment above part? I think that there should be better
> way how to handle above switches and sparse keymap via one input device.
> 
> > >  		dev_info(&device->dev, "unknown event index 0x%x\n",
> > >  			 event);
> > >  }
> >
> 
> --
> Pali Rohár
> pali.rohar@xxxxxxxxx

We discussed a little more on the bug he filed with attached DSDT.  I think that in 
sparse keymap he can use KE_VSW for the entries and sparse keymap can handle.

Assuming that works I'm expecting him to resubmit soon with that and some other
changes I recommended on the bug.




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

  Powered by Linux