mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
surfacepro3_button: Add a warning when switching to tablet mode
Microsoft Surface Book has a tablet mode button. Print another message once on this event instead of repeating "Unknown event...". Unfortunately, proper support involves the _DSM method, which is not a discoverable interface. Just print a warning for now. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
This commit is contained in:
parent
ddd9357f60
commit
e27ffe7e41
1 changed files with 7 additions and 2 deletions
|
@ -24,6 +24,8 @@
|
||||||
#define SURFACE_BUTTON_OBJ_NAME "VGBI"
|
#define SURFACE_BUTTON_OBJ_NAME "VGBI"
|
||||||
#define SURFACE_BUTTON_DEVICE_NAME "Surface Pro 3/4 Buttons"
|
#define SURFACE_BUTTON_DEVICE_NAME "Surface Pro 3/4 Buttons"
|
||||||
|
|
||||||
|
#define SURFACE_BUTTON_NOTIFY_TABLET_MODE 0xc8
|
||||||
|
|
||||||
#define SURFACE_BUTTON_NOTIFY_PRESS_POWER 0xc6
|
#define SURFACE_BUTTON_NOTIFY_PRESS_POWER 0xc6
|
||||||
#define SURFACE_BUTTON_NOTIFY_RELEASE_POWER 0xc7
|
#define SURFACE_BUTTON_NOTIFY_RELEASE_POWER 0xc7
|
||||||
|
|
||||||
|
@ -33,7 +35,7 @@
|
||||||
#define SURFACE_BUTTON_NOTIFY_PRESS_VOLUME_UP 0xc0
|
#define SURFACE_BUTTON_NOTIFY_PRESS_VOLUME_UP 0xc0
|
||||||
#define SURFACE_BUTTON_NOTIFY_RELEASE_VOLUME_UP 0xc1
|
#define SURFACE_BUTTON_NOTIFY_RELEASE_VOLUME_UP 0xc1
|
||||||
|
|
||||||
#define SURFACE_BUTTON_NOTIFY_PRESS_VOLUME_DOWN 0xc2
|
#define SURFACE_BUTTON_NOTIFY_PRESS_VOLUME_DOWN 0xc2
|
||||||
#define SURFACE_BUTTON_NOTIFY_RELEASE_VOLUME_DOWN 0xc3
|
#define SURFACE_BUTTON_NOTIFY_RELEASE_VOLUME_DOWN 0xc3
|
||||||
|
|
||||||
ACPI_MODULE_NAME("surface pro 3 button");
|
ACPI_MODULE_NAME("surface pro 3 button");
|
||||||
|
@ -105,9 +107,12 @@ static void surface_button_notify(struct acpi_device *device, u32 event)
|
||||||
case SURFACE_BUTTON_NOTIFY_RELEASE_VOLUME_DOWN:
|
case SURFACE_BUTTON_NOTIFY_RELEASE_VOLUME_DOWN:
|
||||||
key_code = KEY_VOLUMEDOWN;
|
key_code = KEY_VOLUMEDOWN;
|
||||||
break;
|
break;
|
||||||
|
case SURFACE_BUTTON_NOTIFY_TABLET_MODE:
|
||||||
|
dev_warn_once(&device->dev, "Tablet mode is not supported\n");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
dev_info_ratelimited(&device->dev,
|
dev_info_ratelimited(&device->dev,
|
||||||
"Unsupported event [0x%x]\n", event);
|
"Unsupported event [0x%x]\n", event);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
input = button->input;
|
input = button->input;
|
||||||
|
|
Loading…
Reference in a new issue