Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5049938ybi; Sat, 20 Jul 2019 11:46:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzn1G5vbtLOcng8XX3ArTgkP8ewQnea+0A8+JvjTaLq2IBew7/vbmorrvR7+s7/RsYNj4lU X-Received: by 2002:a65:65c5:: with SMTP id y5mr60634389pgv.342.1563648363604; Sat, 20 Jul 2019 11:46:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563648363; cv=none; d=google.com; s=arc-20160816; b=z3VHHkksdycCVZ89P9z8E1XFDaX93GgPgikMwACw5IYycBJ1MKRuqkVmrd227ceVzY d8aZa5CrfUuZ3MT8oOpDjNyDKAMLg1t+BMJGHMqTgBSqUVX9VYv2czb06+73TrTrdODQ rpfbHQMzShJsvTKQaGmqyAoZzg1zI5wI37hA39FPoN7IWdSoUV5kz3EgqSIYiXyf4B7s oSEg0Ymuq025Nt/sOb7sY1LOpYpQ3QlctK6yC2IaRzmybFQt0Me8LSzlc2uWrt9ImJWZ TgRp48vZEltIlB6+QDjHiLsjwxryInJp1dQU+W7prYRoBS7YCt8yx9xUZdJzEY0lFRdJ dzNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=SgTZjNZcK7fh7PMsMi2FbcQDp65/1AY4zVRFhCApHSI=; b=oG3b+oZnGNV9q+UZDg3L3UPwkLp8OeLNLtHTAZaxcoWnYpHK9xc1pWw3qZBi8Di2qa 2IcsuZ9R3RTXcl4YNSDeFvfFguWC/b9i19vYDvOnRUBAJIzptwMY9IdGGW8LCDmw8PW1 Do6CB9f1rU0DXf8dQVE8mamKaH9Xf2wQths9hzQ6mhRuoT2OD2zQ6PXOv1e/nv+raEcX S2o1W0YBRkvk5fhYvgrfiyhhHqqX6gK4kUll7OnClyZ2tpZ8No/4C2WuiiNhG1BCu3QI dJKVKa9PiUQ7NHdjowkF+rd0Ihg5XKCPFmxycnbEtIf5RfMpqiM/+ox2USGNSHCARhol 0PFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=QBXl8Mlg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z14si5331635pju.64.2019.07.20.11.45.48; Sat, 20 Jul 2019 11:46:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=QBXl8Mlg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728669AbfGTPFv (ORCPT + 99 others); Sat, 20 Jul 2019 11:05:51 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:55110 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725858AbfGTPFv (ORCPT ); Sat, 20 Jul 2019 11:05:51 -0400 Received: by mail-wm1-f68.google.com with SMTP id p74so31236339wme.4; Sat, 20 Jul 2019 08:05:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SgTZjNZcK7fh7PMsMi2FbcQDp65/1AY4zVRFhCApHSI=; b=QBXl8MlgOZyILQgUg4aDW/K7ySz/UG9/TIrFTn1PBeJUy6FKZxV72JeD0mLs6bkIO+ CFiHhP1WaEZQHc7K0ovi2iE6uqYCNSMEZg0ra8cOkSp06GAlZOxaKAH8kW3AaCXEL43r Uv3aIsdwIUqiFn0n794yJrN8cAFpbA9NWWJgC5VHTdzux/FkMDTHLewWpfS9bzaP5VYy folmex7VJFIVIxg2jkEPchn1FiV+vDmiX638Rrr54sucxXooN9E5nyX9E1h3VON2G/CC lCoiHDRtZfoIMthFtCfdX1CFEPkccs9yOHnML2hR68hNNOW4qnL5D8fDQjZskRVQ8QQ7 oZyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SgTZjNZcK7fh7PMsMi2FbcQDp65/1AY4zVRFhCApHSI=; b=LuJL5ynlEP8FCnwIzqcFCj5838EciG2mdYUGcyJWMDaj58STqqyEA/GCLuG1EQlhCF QjAMSwPJrZxB1U/Lu9u/+u9x15H77N8sINgmWsM+TeAyQNVKBs0BAkgjUI0ve7X0nFum +rBswFEHZsjikxlWDsbrp9NeX4CmL0sd9dR6jKosWxGFSIUNFnq7YyXs8g9Y9Y/ZOktM 8V3SS4JRdKnv8rEjQN1B72Tzlcb0op55X/Po1JNgmfgjOZz58BcKHiz6UKrn5+a29lrZ 1a18w4ZraMkdVhTmuKEb8bN/MQ1IRR6hLcrqT6nhOu1EO5p8z4HF24wTi/1NRkF6D2ks exGg== X-Gm-Message-State: APjAAAU/n3Kv02H6J7UC3MPC7fLQ7+/e+/3v8xnyT78TyyBkxLCgIg9S nfOrq5e/6Q9E43mJcoZ8FHvR/noK X-Received: by 2002:a7b:cb94:: with SMTP id m20mr51720738wmi.144.1563635147979; Sat, 20 Jul 2019 08:05:47 -0700 (PDT) Received: from xws.fritz.box (pD9EA3BA8.dip0.t-ipconnect.de. [217.234.59.168]) by smtp.gmail.com with ESMTPSA id g8sm38326864wme.20.2019.07.20.08.05.46 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 20 Jul 2019 08:05:47 -0700 (PDT) From: Maximilian Luz Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, platform-driver-x86@vger.kernel.org, Dmitry Torokhov , Hans de Goede , Chen Yu , Darren Hart , Andy Shevchenko , Benjamin Tissoires , Maximilian Luz Subject: [PATCH v3 0/2] Support for buttons on newer MS Surface devices Date: Sat, 20 Jul 2019 17:05:09 +0200 Message-Id: <20190720150511.95076-1-luzmaximilian@gmail.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series adds support 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. Changes in v3: - [PATCH 1/2] platform/x86: surfacepro3_button: Fix device check - Changed subject line to fit conventions. - Added comments to clarify ACPI/DSM specific behavior. - Change return type of introduced device check function to bool. - [PATCH 1/2] Input: soc_button_array - Add support for newer surface devices - Changed subject line to fit conventions. - Explicitly require CONFIG_ACPI via Kconfig instead of guarding with #ifdef CONFIG_ACPI in code. - Add supported Surface devices to module description in Kconfig. - Allow -EPROBE_DEFER and other errors to be propagated from gpiod_get. - Fix deferral process in case GPIO subsystem is not initialized. Changes in v2: - [PATCH 1/2] platform: Fix device check for surfacepro3_button No changes. - [PATCH 2/2] input: soc_button_array for newer surface devices Ensure the patch compiles without CONFIG_ACPI. Maximilian Luz (2): platform/x86: surfacepro3_button: Fix device check Input: soc_button_array - Add support for newer surface devices drivers/input/misc/Kconfig | 6 +- drivers/input/misc/soc_button_array.c | 141 ++++++++++++++++++++-- drivers/platform/x86/surfacepro3_button.c | 47 ++++++++ 3 files changed, 178 insertions(+), 16 deletions(-) -- 2.22.0