Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1307780 > unrolled thread

[PATCH v4] surface pro 4: Add support for Surface Pro 4 Buttons

Started byWeng Xuetian <wengxt@gmail.com>
First post2016-01-12 20:50 +0100
Last post2016-01-19 22:10 +0100
Articles 7 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v4] surface pro 4: Add support for Surface Pro 4 Buttons Weng Xuetian <wengxt@gmail.com> - 2016-01-12 20:50 +0100
    Re: [PATCH v4] surface pro 4: Add support for Surface Pro 4 Buttons Darren Hart <dvhart@infradead.org> - 2016-01-15 00:10 +0100
      RE: [PATCH v4] surface pro 4: Add support for Surface Pro 4 Buttons "Chen, Yu C" <yu.c.chen@intel.com> - 2016-01-15 02:50 +0100
      RE: [PATCH v4] surface pro 4: Add support for Surface Pro 4 Buttons "Chen, Yu C" <yu.c.chen@intel.com> - 2016-01-15 03:00 +0100
    [PATCH v5] surface pro 4: Add support for Surface Pro 4 Buttons Weng Xuetian <wengxt@gmail.com> - 2016-01-18 00:20 +0100
      RE: [PATCH v5] surface pro 4: Add support for Surface Pro 4 Buttons "Chen, Yu C" <yu.c.chen@intel.com> - 2016-01-18 04:20 +0100
      Re: [PATCH v5] surface pro 4: Add support for Surface Pro 4 Buttons Darren Hart <dvhart@infradead.org> - 2016-01-19 22:10 +0100

#1307780 — [PATCH v4] surface pro 4: Add support for Surface Pro 4 Buttons

FromWeng Xuetian <wengxt@gmail.com>
Date2016-01-12 20:50 +0100
Subject[PATCH v4] surface pro 4: Add support for Surface Pro 4 Buttons
Message-ID<qQd75-5xe-25@gated-at.bofh.it>
Surface Pro 4 buttons are managed by a device with _HID "MSHW0040"
different from Surface Pro 3.

This commit adds MSHW0040 to id list to support the Surface Pro 4.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=109871
Signed-off-by: Weng Xuetian <wengxt@gmail.com>
---
v4:
 - Do not rename the driver.
v3:
 - Fix commit message grammar mistakes.
v2:
 - Reformat patch with -M -C
---
 drivers/platform/x86/Kconfig              | 4 ++--
 drivers/platform/x86/surfacepro3_button.c | 8 +++++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 1089eaa..ea76d67 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -940,8 +940,8 @@ config INTEL_PMC_IPC
 	with other entities in the CPU.
 
 config SURFACE_PRO3_BUTTON
-	tristate "Power/home/volume buttons driver for Microsoft Surface Pro 3 tablet"
+	tristate "Power/home/volume buttons driver for Microsoft Surface Pro 3/4 tablet"
 	depends on ACPI && INPUT
 	---help---
-	  This driver handles the power/home/volume buttons on the Microsoft Surface Pro 3 tablet.
+	  This driver handles the power/home/volume buttons on the Microsoft Surface Pro 3/4 tablet.
 endif # X86_PLATFORM_DEVICES
diff --git a/drivers/platform/x86/surfacepro3_button.c b/drivers/platform/x86/surfacepro3_button.c
index f7dade3..2c0e7d7 100644
--- a/drivers/platform/x86/surfacepro3_button.c
+++ b/drivers/platform/x86/surfacepro3_button.c
@@ -1,6 +1,6 @@
 /*
  * power/home/volume button support for
- * Microsoft Surface Pro 3 tablet.
+ * Microsoft Surface Pro 3/4 tablet.
  *
  * Copyright (c) 2015 Intel Corporation.
  * All rights reserved.
@@ -19,7 +19,8 @@
 #include <linux/acpi.h>
 #include <acpi/button.h>
 
-#define SURFACE_BUTTON_HID		"MSHW0028"
+#define SURFACE_PRO3_BUTTON_HID		"MSHW0028"
+#define SURFACE_PRO4_BUTTON_HID		"MSHW0040"
 #define SURFACE_BUTTON_OBJ_NAME		"VGBI"
 #define SURFACE_BUTTON_DEVICE_NAME	"Surface Pro 3 Buttons"
 
@@ -54,7 +55,8 @@ MODULE_LICENSE("GPL v2");
  * acpi_driver.
  */
 static const struct acpi_device_id surface_button_device_ids[] = {
-	{SURFACE_BUTTON_HID,    0},
+	{SURFACE_PRO3_BUTTON_HID,    0},
+	{SURFACE_PRO4_BUTTON_HID,    0},
 	{"", 0},
 };
 MODULE_DEVICE_TABLE(acpi, surface_button_device_ids);
-- 
2.6.4

[toc] | [next] | [standalone]


#1309747

FromDarren Hart <dvhart@infradead.org>
Date2016-01-15 00:10 +0100
Message-ID<qQZbH-5Fp-1@gated-at.bofh.it>
In reply to#1307780
On Tue, Jan 12, 2016 at 11:43:55AM -0800, Weng Xuetian wrote:
> Surface Pro 4 buttons are managed by a device with _HID "MSHW0040"
> different from Surface Pro 3.
> 
> This commit adds MSHW0040 to id list to support the Surface Pro 4.
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=109871
> Signed-off-by: Weng Xuetian <wengxt@gmail.com>

This is so much better, thank you Weng.

Yu, are you happy with this version?

-- 
Darren Hart
Intel Open Source Technology Center

[toc] | [prev] | [next] | [standalone]


#1309803

From"Chen, Yu C" <yu.c.chen@intel.com>
Date2016-01-15 02:50 +0100
Message-ID<qR1Gy-7or-9@gated-at.bofh.it>
In reply to#1309747
Hi Darren,

> -----Original Message-----
> From: Darren Hart [mailto:dvhart@infradead.org]
> Sent: Friday, January 15, 2016 7:01 AM
> To: Weng Xuetian
> Cc: Chen, Yu C; linux-kernel@vger.kernel.org; platform-driver-
> x86@vger.kernel.org
> Subject: Re: [PATCH v4] surface pro 4: Add support for Surface Pro 4 Buttons
> 
> On Tue, Jan 12, 2016 at 11:43:55AM -0800, Weng Xuetian wrote:
> > Surface Pro 4 buttons are managed by a device with _HID "MSHW0040"
> > different from Surface Pro 3.
> >
> > This commit adds MSHW0040 to id list to support the Surface Pro 4.
> >
> > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=109871
> > Signed-off-by: Weng Xuetian <wengxt@gmail.com>
> 
> This is so much better, thank you Weng.
> 
> Yu, are you happy with this version?
> 
 Looks good to me.
Acked-by: Chen Yu <yu.c.chen@intel.com>

thanks,
Yu

[toc] | [prev] | [next] | [standalone]


#1309809

From"Chen, Yu C" <yu.c.chen@intel.com>
Date2016-01-15 03:00 +0100
Message-ID<qR1Qe-7rW-13@gated-at.bofh.it>
In reply to#1309747
Hi Darren, Xuetian

> -----Original Message-----
> From: Darren Hart [mailto:dvhart@infradead.org]
> Sent: Friday, January 15, 2016 7:01 AM
> To: Weng Xuetian
> Cc: Chen, Yu C; linux-kernel@vger.kernel.org; platform-driver-
> x86@vger.kernel.org
> Subject: Re: [PATCH v4] surface pro 4: Add support for Surface Pro 4 Buttons
> 
> On Tue, Jan 12, 2016 at 11:43:55AM -0800, Weng Xuetian wrote:
> > Surface Pro 4 buttons are managed by a device with _HID "MSHW0040"
> > different from Surface Pro 3.
> >
> > This commit adds MSHW0040 to id list to support the Surface Pro 4.
> >
> > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=109871
> > Signed-off-by: Weng Xuetian <wengxt@gmail.com>
> 
> This is so much better, thank you Weng.
> 
> Yu, are you happy with this version?
> 
One minor nit below, other than that,
Acked-by: Chen Yu <yu.c.chen@intel.com> 

-- #define SURFACE_BUTTON_DEVICE_NAME      "Surface Pro 3 Buttons"
++ #define SURFACE_BUTTON_DEVICE_NAME      "Surface Pro 3/4 Buttons"

And  

[toc] | [prev] | [next] | [standalone]


#1311198 — [PATCH v5] surface pro 4: Add support for Surface Pro 4 Buttons

FromWeng Xuetian <wengxt@gmail.com>
Date2016-01-18 00:20 +0100
Subject[PATCH v5] surface pro 4: Add support for Surface Pro 4 Buttons
Message-ID<qS4M2-J7-9@gated-at.bofh.it>
In reply to#1307780
Surface Pro 4 buttons are managed by a device with _HID "MSHW0040"
different from Surface Pro 3.

This commit adds MSHW0040 to id list to support the Surface Pro 4.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=109871
Signed-off-by: Weng Xuetian <wengxt@gmail.com>
---
v5:
 - rename device name macro as required by Chen Yu
v4:
 - Do not rename the driver.
v3:
 - Fix commit message grammar mistakes.
v2:
 - Reformat patch with -M -C
---
 drivers/platform/x86/Kconfig              |  4 ++--
 drivers/platform/x86/surfacepro3_button.c | 10 ++++++----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 1089eaa..ea76d67 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -940,8 +940,8 @@ config INTEL_PMC_IPC
 	with other entities in the CPU.
 
 config SURFACE_PRO3_BUTTON
-	tristate "Power/home/volume buttons driver for Microsoft Surface Pro 3 tablet"
+	tristate "Power/home/volume buttons driver for Microsoft Surface Pro 3/4 tablet"
 	depends on ACPI && INPUT
 	---help---
-	  This driver handles the power/home/volume buttons on the Microsoft Surface Pro 3 tablet.
+	  This driver handles the power/home/volume buttons on the Microsoft Surface Pro 3/4 tablet.
 endif # X86_PLATFORM_DEVICES
diff --git a/drivers/platform/x86/surfacepro3_button.c b/drivers/platform/x86/surfacepro3_button.c
index f7dade3..b9c38f6 100644
--- a/drivers/platform/x86/surfacepro3_button.c
+++ b/drivers/platform/x86/surfacepro3_button.c
@@ -1,6 +1,6 @@
 /*
  * power/home/volume button support for
- * Microsoft Surface Pro 3 tablet.
+ * Microsoft Surface Pro 3/4 tablet.
  *
  * Copyright (c) 2015 Intel Corporation.
  * All rights reserved.
@@ -19,9 +19,10 @@
 #include <linux/acpi.h>
 #include <acpi/button.h>
 
-#define SURFACE_BUTTON_HID		"MSHW0028"
+#define SURFACE_PRO3_BUTTON_HID		"MSHW0028"
+#define SURFACE_PRO4_BUTTON_HID		"MSHW0040"
 #define SURFACE_BUTTON_OBJ_NAME		"VGBI"
-#define SURFACE_BUTTON_DEVICE_NAME	"Surface Pro 3 Buttons"
+#define SURFACE_BUTTON_DEVICE_NAME	"Surface Pro 3/4 Buttons"
 
 #define SURFACE_BUTTON_NOTIFY_PRESS_POWER	0xc6
 #define SURFACE_BUTTON_NOTIFY_RELEASE_POWER	0xc7
@@ -54,7 +55,8 @@ MODULE_LICENSE("GPL v2");
  * acpi_driver.
  */
 static const struct acpi_device_id surface_button_device_ids[] = {
-	{SURFACE_BUTTON_HID,    0},
+	{SURFACE_PRO3_BUTTON_HID,    0},
+	{SURFACE_PRO4_BUTTON_HID,    0},
 	{"", 0},
 };
 MODULE_DEVICE_TABLE(acpi, surface_button_device_ids);
-- 
2.7.0

[toc] | [prev] | [next] | [standalone]


#1311227 — RE: [PATCH v5] surface pro 4: Add support for Surface Pro 4 Buttons

From"Chen, Yu C" <yu.c.chen@intel.com>
Date2016-01-18 04:20 +0100
SubjectRE: [PATCH v5] surface pro 4: Add support for Surface Pro 4 Buttons
Message-ID<qS8wh-3dw-7@gated-at.bofh.it>
In reply to#1311198
> -----Original Message-----
> From: Weng Xuetian [mailto:wengxt@gmail.com]
> Sent: Monday, January 18, 2016 7:11 AM
> To: Chen, Yu C
> Cc: Darren Hart; linux-kernel@vger.kernel.org; platform-driver-
> x86@vger.kernel.org; Weng Xuetian
> Subject: [PATCH v5] surface pro 4: Add support for Surface Pro 4 Buttons
> 
> Surface Pro 4 buttons are managed by a device with _HID "MSHW0040"
> different from Surface Pro 3.
> 
> This commit adds MSHW0040 to id list to support the Surface Pro 4.
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=109871
> Signed-off-by: Weng Xuetian <wengxt@gmail.com>

Acked-by: Chen Yu <yu.c.chen@intel.com>

[toc] | [prev] | [next] | [standalone]


#1312516 — Re: [PATCH v5] surface pro 4: Add support for Surface Pro 4 Buttons

FromDarren Hart <dvhart@infradead.org>
Date2016-01-19 22:10 +0100
SubjectRe: [PATCH v5] surface pro 4: Add support for Surface Pro 4 Buttons
Message-ID<qSLHl-4Uh-27@gated-at.bofh.it>
In reply to#1311198
On Sun, Jan 17, 2016 at 03:10:38PM -0800, Weng Xuetian wrote:
> Surface Pro 4 buttons are managed by a device with _HID "MSHW0040"
> different from Surface Pro 3.
> 
> This commit adds MSHW0040 to id list to support the Surface Pro 4.
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=109871
> Signed-off-by: Weng Xuetian <wengxt@gmail.com>
> ---
> v5:
>  - rename device name macro as required by Chen Yu

Queued up, thanks!
-- 
Darren Hart
Intel Open Source Technology Center

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web