All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hp_accel: Add accelerometer quirk for HP ProBook 440 G4
@ 2017-10-21 10:42 ` Osama Khan
  0 siblings, 0 replies; 6+ messages in thread
From: Osama Khan @ 2017-10-21 10:42 UTC (permalink / raw)
  To: eric.piel; +Cc: platform-driver-x86, linux-kernel

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>
---
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[] = {
        AXIS_DMI_MATCH("HDX18", "HP HDX 18", x_inverted),
        AXIS_DMI_MATCH("HPB432x", "HP ProBook 432", xy_rotated_left),
        AXIS_DMI_MATCH("HPB440G3", "HP ProBook 440 G3", x_inverted_usd),
+       AXIS_DMI_MATCH("HPB440G4", "HP ProBook 440 G4", x_inverted),
        AXIS_DMI_MATCH("HPB442x", "HP ProBook 442", xy_rotated_left),
        AXIS_DMI_MATCH("HPB452x", "HP ProBook 452", y_inverted),
        AXIS_DMI_MATCH("HPB522x", "HP ProBook 522", xy_swap),

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] hp_accel: Add accelerometer quirk for HP ProBook 440 G4
@ 2017-10-21 10:42 ` Osama Khan
  0 siblings, 0 replies; 6+ messages in thread
From: Osama Khan @ 2017-10-21 10:42 UTC (permalink / raw)
  To: eric.piel; +Cc: platform-driver-x86, linux-kernel

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>
---
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[] = {
        AXIS_DMI_MATCH("HDX18", "HP HDX 18", x_inverted),
        AXIS_DMI_MATCH("HPB432x", "HP ProBook 432", xy_rotated_left),
        AXIS_DMI_MATCH("HPB440G3", "HP ProBook 440 G3", x_inverted_usd),
+       AXIS_DMI_MATCH("HPB440G4", "HP ProBook 440 G4", x_inverted),
        AXIS_DMI_MATCH("HPB442x", "HP ProBook 442", xy_rotated_left),
        AXIS_DMI_MATCH("HPB452x", "HP ProBook 452", y_inverted),
        AXIS_DMI_MATCH("HPB522x", "HP ProBook 522", xy_swap),

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] hp_accel: Add accelerometer quirk for HP ProBook 440 G4
  2017-10-21 10:42 ` Osama Khan
@ 2017-10-27 16:30   ` Andy Shevchenko
  -1 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2017-10-27 16:30 UTC (permalink / raw)
  To: Osama Khan; +Cc: eric.piel, platform-driver-x86, linux-kernel

On Sat, Oct 21, 2017 at 1:42 PM, Osama Khan <osama.khan@ericsson.com> wrote:
> 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.
>

Thanks for the patch.

First of all, indentation is mangled and it doesn't clearly applies.
Second, we use a prefix platform/x86 for patches against PDx86 subsystem.

P.S. No need to resend this time, just check your mail client and be
aware about the prefix in the future.

> Signed-off-by: Osama Khan <osama.khan@ericsson.com>
> ---
> 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[] = {
>         AXIS_DMI_MATCH("HDX18", "HP HDX 18", x_inverted),
>         AXIS_DMI_MATCH("HPB432x", "HP ProBook 432", xy_rotated_left),
>         AXIS_DMI_MATCH("HPB440G3", "HP ProBook 440 G3", x_inverted_usd),
> +       AXIS_DMI_MATCH("HPB440G4", "HP ProBook 440 G4", x_inverted),
>         AXIS_DMI_MATCH("HPB442x", "HP ProBook 442", xy_rotated_left),
>         AXIS_DMI_MATCH("HPB452x", "HP ProBook 452", y_inverted),
>         AXIS_DMI_MATCH("HPB522x", "HP ProBook 522", xy_swap),



-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] hp_accel: Add accelerometer quirk for HP ProBook 440 G4
@ 2017-10-27 16:30   ` Andy Shevchenko
  0 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2017-10-27 16:30 UTC (permalink / raw)
  To: Osama Khan; +Cc: eric.piel, platform-driver-x86, linux-kernel

On Sat, Oct 21, 2017 at 1:42 PM, Osama Khan <osama.khan@ericsson.com> wrote:
> 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.
>

Thanks for the patch.

First of all, indentation is mangled and it doesn't clearly applies.
Second, we use a prefix platform/x86 for patches against PDx86 subsystem.

P.S. No need to resend this time, just check your mail client and be
aware about the prefix in the future.

> Signed-off-by: Osama Khan <osama.khan@ericsson.com>
> ---
> 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[] = {
>         AXIS_DMI_MATCH("HDX18", "HP HDX 18", x_inverted),
>         AXIS_DMI_MATCH("HPB432x", "HP ProBook 432", xy_rotated_left),
>         AXIS_DMI_MATCH("HPB440G3", "HP ProBook 440 G3", x_inverted_usd),
> +       AXIS_DMI_MATCH("HPB440G4", "HP ProBook 440 G4", x_inverted),
>         AXIS_DMI_MATCH("HPB442x", "HP ProBook 442", xy_rotated_left),
>         AXIS_DMI_MATCH("HPB452x", "HP ProBook 452", y_inverted),
>         AXIS_DMI_MATCH("HPB522x", "HP ProBook 522", xy_swap),



-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] hp_accel: Add accelerometer quirk for HP ProBook 440 G4
  2017-10-27 16:30   ` Andy Shevchenko
@ 2017-10-30  6:10     ` Osama Khan
  -1 siblings, 0 replies; 6+ messages in thread
From: Osama Khan @ 2017-10-30  6:10 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: eric.piel, platform-driver-x86, linux-kernel

Thanks for reviewing the patch. I'll keep your feedback in mind for future submissions.

-----Original Message-----
From: platform-driver-x86-owner@vger.kernel.org [mailto:platform-driver-x86-owner@vger.kernel.org] On Behalf Of Andy Shevchenko
Sent: Friday, October 27, 2017 9:31 PM
To: Osama Khan <osama.khan@ericsson.com>
Cc: eric.piel@tremplin-utc.net; platform-driver-x86@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hp_accel: Add accelerometer quirk for HP ProBook 440 G4

On Sat, Oct 21, 2017 at 1:42 PM, Osama Khan <osama.khan@ericsson.com> wrote:
> 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.
>

Thanks for the patch.

First of all, indentation is mangled and it doesn't clearly applies.
Second, we use a prefix platform/x86 for patches against PDx86 subsystem.

P.S. No need to resend this time, just check your mail client and be aware about the prefix in the future.

> Signed-off-by: Osama Khan <osama.khan@ericsson.com>
> ---
> 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[] = {
>         AXIS_DMI_MATCH("HDX18", "HP HDX 18", x_inverted),
>         AXIS_DMI_MATCH("HPB432x", "HP ProBook 432", xy_rotated_left),
>         AXIS_DMI_MATCH("HPB440G3", "HP ProBook 440 G3", 
> x_inverted_usd),
> +       AXIS_DMI_MATCH("HPB440G4", "HP ProBook 440 G4", x_inverted),
>         AXIS_DMI_MATCH("HPB442x", "HP ProBook 442", xy_rotated_left),
>         AXIS_DMI_MATCH("HPB452x", "HP ProBook 452", y_inverted),
>         AXIS_DMI_MATCH("HPB522x", "HP ProBook 522", xy_swap),



--
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] hp_accel: Add accelerometer quirk for HP ProBook 440 G4
@ 2017-10-30  6:10     ` Osama Khan
  0 siblings, 0 replies; 6+ messages in thread
From: Osama Khan @ 2017-10-30  6:10 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: eric.piel, platform-driver-x86, linux-kernel

Thanks for reviewing the patch. I'll keep your feedback in mind for future submissions.

-----Original Message-----
From: platform-driver-x86-owner@vger.kernel.org [mailto:platform-driver-x86-owner@vger.kernel.org] On Behalf Of Andy Shevchenko
Sent: Friday, October 27, 2017 9:31 PM
To: Osama Khan <osama.khan@ericsson.com>
Cc: eric.piel@tremplin-utc.net; platform-driver-x86@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hp_accel: Add accelerometer quirk for HP ProBook 440 G4

On Sat, Oct 21, 2017 at 1:42 PM, Osama Khan <osama.khan@ericsson.com> wrote:
> 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.
>

Thanks for the patch.

First of all, indentation is mangled and it doesn't clearly applies.
Second, we use a prefix platform/x86 for patches against PDx86 subsystem.

P.S. No need to resend this time, just check your mail client and be aware about the prefix in the future.

> Signed-off-by: Osama Khan <osama.khan@ericsson.com>
> ---
> 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[] = {
>         AXIS_DMI_MATCH("HDX18", "HP HDX 18", x_inverted),
>         AXIS_DMI_MATCH("HPB432x", "HP ProBook 432", xy_rotated_left),
>         AXIS_DMI_MATCH("HPB440G3", "HP ProBook 440 G3", 
> x_inverted_usd),
> +       AXIS_DMI_MATCH("HPB440G4", "HP ProBook 440 G4", x_inverted),
>         AXIS_DMI_MATCH("HPB442x", "HP ProBook 442", xy_rotated_left),
>         AXIS_DMI_MATCH("HPB452x", "HP ProBook 452", y_inverted),
>         AXIS_DMI_MATCH("HPB522x", "HP ProBook 522", xy_swap),



--
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-10-30  6:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-21 10:42 [PATCH] hp_accel: Add accelerometer quirk for HP ProBook 440 G4 Osama Khan
2017-10-21 10:42 ` Osama Khan
2017-10-27 16:30 ` Andy Shevchenko
2017-10-27 16:30   ` Andy Shevchenko
2017-10-30  6:10   ` Osama Khan
2017-10-30  6:10     ` Osama Khan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.