[PATCH] Support intel-vbtn based tablet mode switch

2018-01-29 Thread Marco Martin
On some laptop like the Dell Inspiron 7000 series tablet mode switch implemented in Intel ACPI, the events to enter and exit the tablet mode are 0xCC and 0xCD This initializes the tablet/laptop mode at the correct value if the system booted in tablet mode (or the vbtn module loaded with the device

[PATCH] Support intel-vbtn based tablet mode switch

2018-01-23 Thread Marco Martin
Some laptops such as Dell Inspiron 7000 series have the tablet mode switch implemented in Intel ACPI, the events to enter and exit the tablet mode are 0xCC and 0xCD CC: platform-driver-...@vger.kernel.org CC: Matthew Garrett CC: "Pali Rohár" CC: Darren Hart CC: Mario Limonciello CC: Andy Shevc

Re: [PATCH] Support intel-vbtn based tablet mode switch

2018-01-23 Thread Marco Martin
On Tue, Jan 23, 2018 at 12:46 AM, Dmitry Torokhov wrote: >> @@ -81,6 +86,7 @@ static void notify_handler(acpi_handle handle, u32 event, >> void *context) >> return; >> } >> } else if (sparse_keymap_report_event(priv->input_dev, event, 1, >> true)) { >> +

Re: [PATCH] Support intel-vbtn based tablet mode switch

2018-01-22 Thread Dmitry Torokhov
On Mon, Jan 22, 2018 at 01:48:01PM +0100, Marco Martin wrote: > some laptops such as Dell Inspiron 7000 series have the > tablet mode switch implemented in intel acpi, > the events to enter and exit the tablet mode are 0xCC and 0xCD > > CC: platform-driver-...@vger.kernel.org > CC: Matthew Garrett

Re: [PATCH] Support intel-vbtn based tablet mode switch

2018-01-22 Thread Andy Shevchenko
On Mon, Jan 22, 2018 at 3:52 PM, Marco Martin wrote: > On Mon, Jan 22, 2018 at 2:42 PM, Andy Shevchenko > wrote: >>> + if (obj && obj->type == ACPI_TYPE_INTEGER) { >>> + if (obj->integer.value & TABLET_MODE_FLAG) >>> + input_repor

Re: [PATCH] Support intel-vbtn based tablet mode switch

2018-01-22 Thread Marco Martin
On Mon, Jan 22, 2018 at 2:42 PM, Andy Shevchenko wrote: > >> + status = acpi_evaluate_object(handle, "VGBS", NULL, &vgbs_output); >> + /* VGBS being present and returning something means >> +* we have a tablet mode switch >> +*/ >> + if (ACPI_SUCCESS(status)) { >>

Re: [PATCH] Support intel-vbtn based tablet mode switch

2018-01-22 Thread Andy Shevchenko
On Mon, Jan 22, 2018 at 2:48 PM, Marco Martin wrote: > some laptops such as Dell Inspiron 7000 series have the > tablet mode switch implemented in intel acpi, > the events to enter and exit the tablet mode are 0xCC and 0xCD Thanks for an update. For the future, please consider the following: - u

[PATCH] Support intel-vbtn based tablet mode switch

2018-01-22 Thread Marco Martin
some laptops such as Dell Inspiron 7000 series have the tablet mode switch implemented in intel acpi, the events to enter and exit the tablet mode are 0xCC and 0xCD CC: platform-driver-...@vger.kernel.org CC: Matthew Garrett CC: "Pali Rohár" CC: Darren Hart CC: Mario Limonciello CC: Andy Shevc