Re: [PATCH v3] platform/x86: asus-wmi: Add support for SW_TABLET_MODE on UX360

From: Samuel Čavoj
Date: Tue Oct 20 2020 - 18:29:18 EST


Hi,

naturally I notice this right after I send the patch, but my whitespace
is wrong. Time to set a pre-commit hook up. I guess that means a v4,
unless you would fix it on your end? It's just a single line.

Sorry about all the noise,
Sam

On 21.10.2020 00:09, Samuel Čavoj wrote:
> @@ -375,6 +376,20 @@ static int asus_wmi_input_init(struct asus_wmi *asus)
> }
> }
>
> + if (asus->driver->quirks->use_lid_flip_devid) {
> + result = asus_wmi_get_devstate_simple(asus, ASUS_WMI_DEVID_LID_FLIP);
> + if (result < 0)

Right ^here.

> + asus->driver->quirks->use_lid_flip_devid = 0;
> + if (result >= 0) {
> + input_set_capability(asus->inputdev, EV_SW, SW_TABLET_MODE);
> + input_report_switch(asus->inputdev, SW_TABLET_MODE, result);
> + } else if (result == -ENODEV) {
> + pr_err("This device has lid_flip quirk but got ENODEV checking it. This is a bug.");
> + } else {
> + pr_err("Error checking for lid-flip: %d\n", result);
> + }
> + }