Browse Source

asus-laptop: pega_accel - Report accelerometer orientation change through udev

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>
Anisse Astier 13 years ago
parent
commit
b93f82816c
1 changed files with 8 additions and 0 deletions
  1. 8 0
      drivers/platform/x86/asus-laptop.c

+ 8 - 0
drivers/platform/x86/asus-laptop.c

@@ -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);
 }