mbox series

[RFC,0/2] Support for buttons on newer MS Surface devices

Message ID 20190516142523.117978-1-luzmaximilian@gmail.com (mailing list archive)
Headers show
Series Support for buttons on newer MS Surface devices | expand

Message

Maximilian Luz May 16, 2019, 2:25 p.m. UTC
This series adds suport for power and volume buttons on 5th and 6th
generation Microsoft Surface devices. Specifically, it adds support for
the power-button on the Surface Laptop 1 and Laptop 2, as well as
support for power- and (on-device) volume-buttons on the Surface Pro 5
(2017), Pro 6, and Book 2.

These devices use the same MSHW0040 device as on the Surface Pro 4,
however, whereas the Pro 4 uses an ACPI notify handler, the newer
devices use GPIO interrupts to signal these events.

The first patch of this series ensures that the surfacepro3_button
driver, used for MSHW0040 on the Pro 4, does not probe for the newer
devices. The second patch adapts soc_button_array to implement the
actual button support.

I think the changes to soc_button_array in the second patch warrant a
thorough review. I've tried to make things a bit more generic to be able
to integrate arbitrary ACPI GPIO power-/volume-button devices more
easily, I'm not sure if there may be reasons against this. 

Maximilian Luz (2):
  platform: Fix device check for surfacepro3_button
  input: soc_button_array for newer surface devices

 drivers/input/misc/soc_button_array.c     | 134 ++++++++++++++++++++--
 drivers/platform/x86/surfacepro3_button.c |  38 ++++++
 2 files changed, 160 insertions(+), 12 deletions(-)

Comments

Maximilian Luz June 1, 2019, 7:07 p.m. UTC | #1
Hi,

any comments on this?

I should also mention that this has been tested via
https://github.com/jakeday/linux-surface.

Maximilian


On 5/16/19 4:25 PM, Maximilian Luz wrote:
> This series adds suport for power and volume buttons on 5th and 6th
> generation Microsoft Surface devices. Specifically, it adds support for
> the power-button on the Surface Laptop 1 and Laptop 2, as well as
> support for power- and (on-device) volume-buttons on the Surface Pro 5
> (2017), Pro 6, and Book 2.
> 
> These devices use the same MSHW0040 device as on the Surface Pro 4,
> however, whereas the Pro 4 uses an ACPI notify handler, the newer
> devices use GPIO interrupts to signal these events.
> 
> The first patch of this series ensures that the surfacepro3_button
> driver, used for MSHW0040 on the Pro 4, does not probe for the newer
> devices. The second patch adapts soc_button_array to implement the
> actual button support.
> 
> I think the changes to soc_button_array in the second patch warrant a
> thorough review. I've tried to make things a bit more generic to be able
> to integrate arbitrary ACPI GPIO power-/volume-button devices more
> easily, I'm not sure if there may be reasons against this.
> 
> Maximilian Luz (2):
>    platform: Fix device check for surfacepro3_button
>    input: soc_button_array for newer surface devices
> 
>   drivers/input/misc/soc_button_array.c     | 134 ++++++++++++++++++++--
>   drivers/platform/x86/surfacepro3_button.c |  38 ++++++
>   2 files changed, 160 insertions(+), 12 deletions(-)
>
Maximilian Luz June 11, 2019, 11:06 p.m. UTC | #2
Since there are no comments on this, should I simply submit this as patch?

Maximilian


On 6/1/19 9:07 PM, Maximilian Luz wrote:
> Hi,
> 
> any comments on this?
> 
> I should also mention that this has been tested via
> https://github.com/jakeday/linux-surface.
> 
> Maximilian
Andy Shevchenko June 20, 2019, 5:53 a.m. UTC | #3
On Wed, Jun 12, 2019 at 2:06 AM Maximilian Luz <luzmaximilian@gmail.com> wrote:
>
> Since there are no comments on this, should I simply submit this as patch?

No top post, please.

And yes, submit it as a series. Also Cc to Benjamin Tissoires.

> On 6/1/19 9:07 PM, Maximilian Luz wrote:
> > Hi,
> >
> > any comments on this?
> >
> > I should also mention that this has been tested via
> > https://github.com/jakeday/linux-surface.
> >
> > Maximilian
Maximilian Luz June 20, 2019, 11:53 a.m. UTC | #4
On 6/20/19 7:53 AM, Andy Shevchenko wrote:
> No top post, please.

Sorry, will do better!

> And yes, submit it as a series. Also Cc to Benjamin Tissoires.

Done.

Thank you,
Maximilian