linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Weng Xuetian <wengxt@gmail.com>
To: Chen Yu <yu.c.chen@intel.com>
Cc: Darren Hart <dvhart@infradead.org>,
	linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org,
	Weng Xuetian <wengxt@gmail.com>
Subject: [PATCH v4] surface pro 4: Add support for Surface Pro 4 Buttons
Date: Tue, 12 Jan 2016 11:43:55 -0800	[thread overview]
Message-ID: <1452627835-20806-1-git-send-email-wengxt@gmail.com> (raw)
In-Reply-To: <1451244080-940-1-git-send-email-wengxt@gmail.com>

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

  parent reply	other threads:[~2016-01-12 19:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-24 20:28 [PATCH] surface pro 4: Add support for Surface Pro 4 Buttons Weng Xuetian
2015-12-27 13:36 ` Andy Shevchenko
2015-12-27 17:29 ` [PATCH v2] " Weng Xuetian
2015-12-27 19:07   ` Chen, Yu C
2015-12-27 19:21   ` [PATCH v3] " Weng Xuetian
2015-12-27 20:58     ` Andy Shevchenko
2016-01-04 20:35       ` Darren Hart
2016-01-05  0:00         ` Chen, Yu C
2016-01-04 20:11     ` Darren Hart
2016-01-11 18:38     ` Darren Hart
2016-01-12 19:43     ` Weng Xuetian [this message]
2016-01-14 23:01       ` [PATCH v4] " Darren Hart
2016-01-15  1:41         ` Chen, Yu C
2016-01-15  1:50         ` Chen, Yu C
2016-01-17 23:10       ` [PATCH v5] " Weng Xuetian
2016-01-18  3:18         ` Chen, Yu C
2016-01-19 21:00         ` Darren Hart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1452627835-20806-1-git-send-email-wengxt@gmail.com \
    --to=wengxt@gmail.com \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=yu.c.chen@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).