asus-laptop: pega_accel - Report accelerometer orientation change through udev
authorAnisse Astier <anisse@astier.eu>
Fri, 14 Oct 2011 09:13:41 +0000 (11:13 +0200)
committerMatthew Garrett <mjg@redhat.com>
Mon, 24 Oct 2011 14:52:41 +0000 (16:52 +0200)
Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/asus-laptop.c

index 012c44d..05c0e59 100644 (file)
@@ -1342,6 +1342,14 @@ static void asus_acpi_notify(struct acpi_device *device, u32 event)
                }
                return ;
        }
+
+       /* Accelerometer "coarse orientation change" event */
+       if (asus->pega_accel_poll && event == 0xEA) {
+               kobject_uevent(&asus->pega_accel_poll->input->dev.kobj,
+                              KOBJ_CHANGE);
+               return ;
+       }
+
        asus_input_notify(asus, event);
 }