Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp688839iog; Fri, 24 Jun 2022 11:47:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uGprTx343bnJGqG1NJCgcgxZjFyVtyp73MBBYhpg4rsyyyjdTZUR4daWY9e17I1aEpeOlx X-Received: by 2002:a63:44:0:b0:40c:9f98:a172 with SMTP id 65-20020a630044000000b0040c9f98a172mr221045pga.65.1656096437706; Fri, 24 Jun 2022 11:47:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656096437; cv=none; d=google.com; s=arc-20160816; b=vfizEs57e+vL3KYox+edYkwGpJJyFMdyVkbFn2YgfUlU3JmYBEC37GIVj8lfZq8XsV H6cBNiqqNov/u9IC4d9ZbPru3Wj22pQ8IahRKhk+BPWsfeTC2SuVW9EHYVC12gLHNmO6 EEpZScD90eG8eRXCuXym/5tRH/xO6/Sm8oeW3ewkhMH3FDVKG/oQKolvzqY5qyZAVVtS A+O4JvBU+auc9tS94ny538mEBccsAU4D/Yo2ot04EnfeS1ExPUdTqndvO2RRhhjaCQuc SxXZHUbb7fPKqT7hWLo2y98dyxhdhmnVTuYDNPsU+vSpU7sr9FzNhN1GVIuFd2oB9zzY Rc9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=f6qkeHUNFH4QmeQBj0bNc7f9zKmHQ5igPCiK5zgxrT8=; b=PRKBVqQSgzyal37h1CMM5ZrMWKqyNwHDH4BnnWHWCU7RGyLLipylhmZLU8YT9vBBMf Gg5rfyeMvzixWQSU1PtwRDIg55dz5H0pP1DIrjIKd91AAoCPXxkndtakVLQuugfXn1D7 T+XGq8WebHq1Okjs6yDrizxyeuiUMjb1cgyjDnIOSotJ/sAlEHS55qYB5i2vY6ciLJzz jDAtt5+HS3ab0yH2usfZ5pj+SqFrO5Rvc036XeN7NbWkr5zaLQU9fB9qKUgQsn/xLtD6 rIyOnvR1arcLV3UXUmJDMTPcJbIlccr/qBheE5GpGLuzcY4lpf9AUhumoryiiRfhboBp lp3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="h/hkqjcn"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a6-20020a63cd46000000b004019c5f7652si3621005pgj.640.2022.06.24.11.47.05; Fri, 24 Jun 2022 11:47:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="h/hkqjcn"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231690AbiFXShM (ORCPT + 99 others); Fri, 24 Jun 2022 14:37:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231394AbiFXShI (ORCPT ); Fri, 24 Jun 2022 14:37:08 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CD9781258; Fri, 24 Jun 2022 11:37:07 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id cw10so6427434ejb.3; Fri, 24 Jun 2022 11:37:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=f6qkeHUNFH4QmeQBj0bNc7f9zKmHQ5igPCiK5zgxrT8=; b=h/hkqjcnhoGz0vbAHb9p1jUooWrA/hO0BNtoz3If5Rt0ojAia+aSiYGe0hxG47PM+l 72N29VmdrpdyZSxecqBMnU8W5lGIIJzF+L8cGn+CeWJhkp8yBvK7Vct4ng+Tf2tBPT7l 5LiS0DZDOHYsHwiRtT2XwIuoiD9ei8KX92AvHpUjOhVoc3ovPb5H6cREBNtSN36ve3GN CLrBUdB8LPY8wJPD7mdue26qit7n6Td4WQesrtbMV9Jbb9mP6VqK9ke/uZm37lOSHZnW GhHTJMmk3aPH8+SivXBNQv37bEpyGOSWib8ExYci6huH6xN5j1teaBKe1reKOyfa4J3i Q6Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=f6qkeHUNFH4QmeQBj0bNc7f9zKmHQ5igPCiK5zgxrT8=; b=U+yNBNfQ1jIX9yMdp24bQYFVx2097ymCIGjcUsqo3tVd3tKJATtPh1JT9osNd3KD5h M6t+uNFRFLLxWa5TWAgj2W8+DoBy9tLNyAaGhlYyZJZpuDzAnJz40Zp6RlCm9YXjllsh adtBtFEnoaes5VKFFnIyzjkrSjYJWD6ObA51BTIiUpVIS7dSSfOxZXhhbHOaQv/vol2Y ccUPjoeu0A/qaEJ1QYJOcVtvMuzblh5wmSpNLTPLvpp/2SZyKOyLlks2Pe8l/Oe/I8CV 1ppiEjcrKef6MI85vLM3soGS+LziD+WUxknLXwQdxjjsH+niZkOiyHmr6jcXvclHaWn8 tE2A== X-Gm-Message-State: AJIora/SlZV89F3OkwH69PKPVy1ufovfZvJ0JbmsIrxtmOJJcefsQHDQ f5wOjTzNBaAFFtKcJ19GmVY= X-Received: by 2002:a17:907:da7:b0:711:6c6d:c6d with SMTP id go39-20020a1709070da700b007116c6d0c6dmr399275ejc.276.1656095825905; Fri, 24 Jun 2022 11:37:05 -0700 (PDT) Received: from xws.localdomain ([37.120.217.162]) by smtp.gmail.com with ESMTPSA id jw12-20020a170906e94c00b00722e8827c53sm1493822ejb.208.2022.06.24.11.37.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 11:37:05 -0700 (PDT) From: Maximilian Luz To: Hans de Goede Cc: Mark Gross , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Maximilian Luz Subject: [PATCH 3/4] platform/surface: aggregator_registry: Add support for tablet mode switch on Surface Pro 8 Date: Fri, 24 Jun 2022 20:36:41 +0200 Message-Id: <20220624183642.910893-4-luzmaximilian@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220624183642.910893-1-luzmaximilian@gmail.com> References: <20220624183642.910893-1-luzmaximilian@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a KIP subsystem tablet-mode switch device for the Surface Pro 8. The respective driver for this device provides SW_TABLET_MODE input events for user-space based on the state of the keyboard cover (e.g. detached, folded-back, normal/laptop mode). Signed-off-by: Maximilian Luz --- drivers/platform/surface/surface_aggregator_registry.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c index bf3303f1aa71..8f249df673a4 100644 --- a/drivers/platform/surface/surface_aggregator_registry.c +++ b/drivers/platform/surface/surface_aggregator_registry.c @@ -77,6 +77,12 @@ static const struct software_node ssam_node_tmp_pprof = { .parent = &ssam_node_root, }; +/* Tablet-mode switch via KIP subsystem. */ +static const struct software_node ssam_node_kip_tablet_switch = { + .name = "ssam:01:0e:01:00:01", + .parent = &ssam_node_root, +}; + /* DTX / detachment-system device (Surface Book 3). */ static const struct software_node ssam_node_bas_dtx = { .name = "ssam:01:11:01:00:00", @@ -264,11 +270,11 @@ static const struct software_node *ssam_node_group_sp8[] = { &ssam_node_bat_ac, &ssam_node_bat_main, &ssam_node_tmp_pprof, + &ssam_node_kip_tablet_switch, &ssam_node_hid_kip_keyboard, &ssam_node_hid_kip_penstash, &ssam_node_hid_kip_touchpad, &ssam_node_hid_kip_iid5, - /* TODO: Add support for tablet mode switch. */ NULL, }; -- 2.36.1