@@ -238,6 +238,8 @@ static int hid_dev_rot_probe(struct platform_device *pdev)
name = "dev_rotation";
else if (hsdev->usage == HID_USAGE_SENSOR_RELATIVE_ORIENTATION)
name = "relative_orientation";
+ else if (hsdev->usage == HID_USAGE_SENSOR_GEOMAGNETIC_ORIENTATION)
+ name = "geomagnetic_orientation";
ret = hid_sensor_parse_common_attributes(hsdev, hsdev->usage,
&rot_state->common_attributes);
@@ -333,6 +335,10 @@ static int hid_dev_rot_remove(struct platform_device *pdev)
/* Relatve orientation(AG) sensor */
.name = "HID-SENSOR-20008e",
},
+ {
+ /* Geomagnetic orientation(AM) sensor */
+ .name = "HID-SENSOR-2000c1",
+ },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(platform, hid_dev_rot_ids);
@@ -83,6 +83,7 @@
#define HID_USAGE_SENSOR_DEVICE_ORIENTATION 0x20008A
#define HID_USAGE_SENSOR_RELATIVE_ORIENTATION 0x20008E
+#define HID_USAGE_SENSOR_GEOMAGNETIC_ORIENTATION 0x2000C1
#define HID_USAGE_SENSOR_ORIENT_ROTATION_MATRIX 0x200482
#define HID_USAGE_SENSOR_ORIENT_QUATERNION 0x200483
#define HID_USAGE_SENSOR_ORIENT_MAGN_FLUX 0x200484