aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOsama Khan <osama.khan@ericsson.com>2017-10-21 06:42:21 -0400
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2017-10-27 13:54:01 -0400
commit163ca80013aafb6dc9cb295de3db7aeab9ab43f8 (patch)
treecd70e8f7dd8b8e045a0afe5105e8a39759e54a01
parent5520437bebf7c65507a12bb111eba79f35efba1d (diff)
platform/x86: hp_accel: Add quirk for HP ProBook 440 G4
Added support for HP ProBook 440 G4 laptops by including the accelerometer orientation quirk for that device. Testing was performed based on the axis orientation guidelines here: https://www.kernel.org/doc/Documentation/misc-devices/lis3lv02d which states "If the left side is elevated, X increases (becomes positive)". When tested, on lifting the left edge, x values became increasingly negative thus indicating an inverted x-axis on the installed lis3lv02d chip. This was compensated by adding an entry for this device in hp_accel.c specifying the quirk as x_inverted. The patch was tested on a ProBook 440 G4 device and x-axis as well as y and z-axis values are now generated as per spec. Signed-off-by: Osama Khan <osama.khan@ericsson.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-rw-r--r--drivers/platform/x86/hp_accel.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/platform/x86/hp_accel.c b/drivers/platform/x86/hp_accel.c
index 493d8910a74e..7b12abe86b94 100644
--- a/drivers/platform/x86/hp_accel.c
+++ b/drivers/platform/x86/hp_accel.c
@@ -240,6 +240,7 @@ static const struct dmi_system_id lis3lv02d_dmi_ids[] = {
240 AXIS_DMI_MATCH("HDX18", "HP HDX 18", x_inverted), 240 AXIS_DMI_MATCH("HDX18", "HP HDX 18", x_inverted),
241 AXIS_DMI_MATCH("HPB432x", "HP ProBook 432", xy_rotated_left), 241 AXIS_DMI_MATCH("HPB432x", "HP ProBook 432", xy_rotated_left),
242 AXIS_DMI_MATCH("HPB440G3", "HP ProBook 440 G3", x_inverted_usd), 242 AXIS_DMI_MATCH("HPB440G3", "HP ProBook 440 G3", x_inverted_usd),
243 AXIS_DMI_MATCH("HPB440G4", "HP ProBook 440 G4", x_inverted),
243 AXIS_DMI_MATCH("HPB442x", "HP ProBook 442", xy_rotated_left), 244 AXIS_DMI_MATCH("HPB442x", "HP ProBook 442", xy_rotated_left),
244 AXIS_DMI_MATCH("HPB452x", "HP ProBook 452", y_inverted), 245 AXIS_DMI_MATCH("HPB452x", "HP ProBook 452", y_inverted),
245 AXIS_DMI_MATCH("HPB522x", "HP ProBook 522", xy_swap), 246 AXIS_DMI_MATCH("HPB522x", "HP ProBook 522", xy_swap),