Bug 109871 - Power/volume button is not handled on Surface Pro 4
Summary: Power/volume button is not handled on Surface Pro 4
Status: CLOSED CODE_FIX
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: x86-64 (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: platform_x86_64@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-23 20:49 UTC by Weng Xuetian
Modified: 2016-01-25 02:28 UTC (History)
2 users (show)

See Also:
Kernel Version: 4.3.3
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Patch on surfacepro3_button (1.55 KB, patch)
2015-12-23 20:49 UTC, Weng Xuetian
Details | Diff

Description Weng Xuetian 2015-12-23 20:49:54 UTC
Created attachment 198131 [details]
Patch on surfacepro3_button

My Surface pro 4 is i7/16G not sure if this applies to all other surface pro 4 model.

From Device Manager under Windows, surface pro 4 seems to use a different device id MSHW0040 for its button.

I tried to make use to existing surfacepro3_button module and seems it works by simply add new ID. All three buttons (power/volumn up/down) are all working. Surface Pro 4 doesn't have a home button.

Patch attached.
Comment 1 Weng Xuetian 2015-12-23 20:51:24 UTC
Add current surfacepro3_button maintainer in CC.
Comment 2 Chen Yu 2015-12-24 08:24:16 UTC
Thanks for you work! I've tested your patch on surface pro 3, looks good to me, one minor nit below:
 can you please modify the file name of surfacepro3_button.c to surfacepro_button.c and also the description in Kconfig&MAINTAINER and the naming of 
'surface pro 3/4' to 'surface pro series' in surfacepro_button.c. maybe there would be a surface pro 5 one day :)
you can send your patch to platform-driver-x86@vger.kernel.org and let's wait for x86 maintainers's response.
Yu
Comment 3 Weng Xuetian 2015-12-24 09:17:57 UTC
(In reply to Chen Yu from comment #2)
> Thanks for you work! I've tested your patch on surface pro 3, looks good to
> me, one minor nit below:
>  can you please modify the file name of surfacepro3_button.c to
> surfacepro_button.c and also the description in Kconfig&MAINTAINER and the
> naming of 
> 'surface pro 3/4' to 'surface pro series' in surfacepro_button.c. maybe
> there would be a surface pro 5 one day :)
> you can send your patch to platform-driver-x86@vger.kernel.org and let's
> wait for x86 maintainers's response.
> Yu

Maybe to "surface" instead of "surface pro"? Though it doesn't do anyting on non-pro device right now.
Comment 4 Chen Yu 2015-12-24 09:31:55 UTC
(In reply to Weng Xuetian from comment #3)
> (In reply to Chen Yu from comment #2)
> > Thanks for you work! I've tested your patch on surface pro 3, looks good to
> > me, one minor nit below:
> >  can you please modify the file name of surfacepro3_button.c to
> > surfacepro_button.c and also the description in Kconfig&MAINTAINER and the
> > naming of 
> > 'surface pro 3/4' to 'surface pro series' in surfacepro_button.c. maybe
> > there would be a surface pro 5 one day :)
> > you can send your patch to platform-driver-x86@vger.kernel.org and let's
> > wait for x86 maintainers's response.
> > Yu
> 
> Maybe to "surface" instead of "surface pro"? Though it doesn't do anyting on
> non-pro device right now.

surface series is not based on core platform, so its hardware is different from surface pro. surface 3 is a hardware reduced platform, eg, this patch does not work for surface 3 button.
Comment 5 Chen Yu 2016-01-25 02:27:57 UTC
patch merged and close this thread.

commit	6d5ac6e1771e30137ba1a2898885102b8bc21851

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>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>

Note You need to log in before you can comment on or make changes to this bug.