From patchwork Sun Nov 13 18:59:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maximilian Luz X-Patchwork-Id: 19407 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1798945wru; Sun, 13 Nov 2022 11:09:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf7xKdq2+vMs+2OdDQH9zJtiUtL2NaYLX05bU3vQGI3Ul0OonD7WoAFouclbrHMSRwAFVIzj X-Received: by 2002:a05:6402:289e:b0:460:7413:5d46 with SMTP id eg30-20020a056402289e00b0046074135d46mr8880200edb.47.1668366549018; Sun, 13 Nov 2022 11:09:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668366549; cv=none; d=google.com; s=arc-20160816; b=OnV2VMPakOr5xKCkZXQeODsqZEirN8JYnbzLZYSUiOV6LDIrCx/xR3sL2zZyOUdko3 ZfyPKdRCj4j+b7yirPG/sOWMondHRAEEugtJAuV3ughaakFfMkRS+VU5aeD0w4sfw1gy dXJ57I7OK6+BHdQdYDqnEFFvJ3qWkG4eNNf4laXqC9cr5hE/a3wYOw4EUAdlbNjA48qF WCHXUbxW+24shsXSQi8JOxlUafsGMMWHbVDXGutULPeWktBbAZX2iheu4mjKvcIQPf7r 3m6EZZfYRjy0SsJQr3+6nXnuzCNOz8rZU+UiUX0AM0IifBXCs9xUJ8FtUK2bSazf4Wj7 0WHQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=8m5wRLYsxEq7AelfE/7w31+qv6bELSvLoZTg6CoYHe4=; b=f7ofQV4P8fIgDsnjxA7ddXIvyvwh7WFCYrWu6jmq3FDa5GPohonxHaxGpT0M+fCkbL nxexCldb2m+4dC4MQRuF8U+k3K6YLlhZ4ovorhPI9+GiLVQ04u/NlbWgEps2gvuFEAz3 HQj1ZOyqHpDGXSfxKNElJA+oVcXHPIzVh8DC9RbIE1ZS5hzSzm6sedRtrs0hTNzi5sfF T3vUvAXDydYPERduGnlm5uqgS0u3a1I6G94KvEJV8pR0z2Uu7QPp4IqOTeRiVvZIMokp g9wKWZvZTCLgwH00sFETk5mlUp3SIL3hbL/TDA/rpoHKJySc/6cHLwZNVYVMrvCxxAPr MzvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=VWu+I6w5; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ho7-20020a1709070e8700b007adf558e182si7881894ejc.926.2022.11.13.11.08.44; Sun, 13 Nov 2022 11:09:09 -0800 (PST) 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=VWu+I6w5; 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 S235551AbiKMTAE (ORCPT + 99 others); Sun, 13 Nov 2022 14:00:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235532AbiKMTAC (ORCPT ); Sun, 13 Nov 2022 14:00:02 -0500 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24AD9A1BB; Sun, 13 Nov 2022 11:00:01 -0800 (PST) Received: by mail-ed1-x52f.google.com with SMTP id v27so14429031eda.1; Sun, 13 Nov 2022 11:00:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=8m5wRLYsxEq7AelfE/7w31+qv6bELSvLoZTg6CoYHe4=; b=VWu+I6w5v0li2zX8CHeFV0iUxKuPfMECxNxbP6M7mWzAtX5n06OHbzeCIhYGrmS3W+ mC+XcDA0mqCbuy3Zg9k/wxn7dIvi/1pX7m6VnLSZZM3GCXqIjL8/izdCn7e0icCWbN9s 3hPpS3oVX1ZjWhrnBIfqpwMzszVHxuPlidvODbEFuHnJ5E9xMsWcp64VnVK3oTQibkn2 d6FdcyDGsR7l6q//9ysTjdJ1I5VJKJLY5CN1fm4I9XeJmWsFRRxF0YgFVfmzokc26wvC uCeoivztWXC7W2npQ6NX9uP6+XwSyptAOrqVQ7iqWhZO+1MQli71ohpz6EtO44F9jtMf glAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8m5wRLYsxEq7AelfE/7w31+qv6bELSvLoZTg6CoYHe4=; b=wrgdBYNVE7niIePpQPMdLHjCqllQAL7YrvY+G19P9X07nBhf71KHhJJ4py9YKVuz0r zcupWzzOivKVtKwFRwegJIYN2s3/nab9IR93jfGa6fNzZpwjF2BT8LbPXoY1nXCJR9PV kdqwPjtaT+AaGYjb/dAFnK4tnOxcxLmKQ94ubB6rNWaC0bMWDXh9gPSSeuCX+QqHSav/ 41AQWWIksQIhLZ1GkGnBDHoIH7DBcxQo9kfp/4KnEDKt7gAWRvVcMXdnqlP8FHjufRYy V7mJ+ys11RQVVDQDafofX1Shf1fqmBtroxMvDH9txszvSPO1k/sKx4q5YClbRqdaaGTU mqfw== X-Gm-Message-State: ANoB5pmFIVGqoB+lUfujI7XxRsUFfUoBoOafZGE7YddVUrk1bxZyRsdu 5+CFgtKSNEJdw0ZbKeVxlKU= X-Received: by 2002:a05:6402:b32:b0:461:a130:ea3c with SMTP id bo18-20020a0564020b3200b00461a130ea3cmr8536838edb.272.1668365999547; Sun, 13 Nov 2022 10:59:59 -0800 (PST) Received: from xws.localdomain ([37.120.217.162]) by smtp.gmail.com with ESMTPSA id p9-20020a170906140900b007a9a56e2a07sm3233809ejc.49.2022.11.13.10.59.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Nov 2022 10:59:58 -0800 (PST) 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 1/2] platform/surface: aggregator: Do not check for repeated unsequenced packets Date: Sun, 13 Nov 2022 19:59:50 +0100 Message-Id: <20221113185951.224759-1-luzmaximilian@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749409122937084881?= X-GMAIL-MSGID: =?utf-8?q?1749409122937084881?= Currently, we check any received packet whether we have already seen it previously, regardless of the packet type (sequenced / unsequenced). We do this by checking the sequence number. This assumes that sequence numbers are valid for both sequenced and unsequenced packets. However, this assumption appears to be incorrect. On some devices, the sequence number field of unsequenced packets (in particular HID input events on the Surface Pro 9) is always zero. As a result, the current retransmission check kicks in and discards all but the first unsequenced packet, breaking (among other things) keyboard and touchpad input. Note that we have, so far, only seen packets being retransmitted in sequenced communication. In particular, this happens when there is an ACK timeout, causing the EC (or us) to re-send the packet waiting for an ACK. Arguably, retransmission / duplication of unsequenced packets should not be an issue as there is no logical condition (such as an ACK timeout) to determine when a packet should be sent again. Therefore, remove the retransmission check for unsequenced packets entirely to resolve the issue. Fixes: c167b9c7e3d6 ("platform/surface: Add Surface Aggregator subsystem") Signed-off-by: Maximilian Luz --- .../surface/aggregator/ssh_packet_layer.c | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/drivers/platform/surface/aggregator/ssh_packet_layer.c b/drivers/platform/surface/aggregator/ssh_packet_layer.c index 6748fe4ac5d5..def8d7ac541f 100644 --- a/drivers/platform/surface/aggregator/ssh_packet_layer.c +++ b/drivers/platform/surface/aggregator/ssh_packet_layer.c @@ -1596,16 +1596,32 @@ static void ssh_ptl_timeout_reap(struct work_struct *work) ssh_ptl_tx_wakeup_packet(ptl); } -static bool ssh_ptl_rx_retransmit_check(struct ssh_ptl *ptl, u8 seq) +static bool ssh_ptl_rx_retransmit_check(struct ssh_ptl *ptl, const struct ssh_frame *frame) { int i; + /* + * Ignore unsequenced packets. On some devices (notably Surface Pro 9), + * unsequenced events will always be sent with SEQ=0x00. Attempting to + * detect retransmission would thus just block all events. + * + * While sequence numbers would also allow detection of retransmitted + * packets in unsequenced communication, they have only ever been used + * to cover edge-cases in sequenced transmission. In particular, the + * only instance of packets being retransmitted (that we are aware of) + * is due to an ACK timeout. As this does not happen in unsequenced + * communication, skip the retransmission check for those packets + * entirely. + */ + if (frame->type == SSH_FRAME_TYPE_DATA_NSQ) + return false; + /* * Check if SEQ has been seen recently (i.e. packet was * re-transmitted and we should ignore it). */ for (i = 0; i < ARRAY_SIZE(ptl->rx.blocked.seqs); i++) { - if (likely(ptl->rx.blocked.seqs[i] != seq)) + if (likely(ptl->rx.blocked.seqs[i] != frame->seq)) continue; ptl_dbg(ptl, "ptl: ignoring repeated data packet\n"); @@ -1613,7 +1629,7 @@ static bool ssh_ptl_rx_retransmit_check(struct ssh_ptl *ptl, u8 seq) } /* Update list of blocked sequence IDs. */ - ptl->rx.blocked.seqs[ptl->rx.blocked.offset] = seq; + ptl->rx.blocked.seqs[ptl->rx.blocked.offset] = frame->seq; ptl->rx.blocked.offset = (ptl->rx.blocked.offset + 1) % ARRAY_SIZE(ptl->rx.blocked.seqs); @@ -1624,7 +1640,7 @@ static void ssh_ptl_rx_dataframe(struct ssh_ptl *ptl, const struct ssh_frame *frame, const struct ssam_span *payload) { - if (ssh_ptl_rx_retransmit_check(ptl, frame->seq)) + if (ssh_ptl_rx_retransmit_check(ptl, frame)) return; ptl->ops.data_received(ptl, payload); From patchwork Sun Nov 13 18:59:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maximilian Luz X-Patchwork-Id: 19408 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1799006wru; Sun, 13 Nov 2022 11:09:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf4H7iCV1tXyxaleO+iXxPYMNpSJ8aKHMSpjQCPJc7CBDQl9WZwv0uYew2tAG9oc9d+zRZvu X-Received: by 2002:aa7:df95:0:b0:467:6035:285c with SMTP id b21-20020aa7df95000000b004676035285cmr8659625edy.386.1668366559642; Sun, 13 Nov 2022 11:09:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668366559; cv=none; d=google.com; s=arc-20160816; b=KoGlkIv1K//wfSmu6p2jIAKIXFVd8h5Dn20B+c2qAx4XeuB6JyGQuCKBapNDKe+rdx ciNc+VuZ/NBh3kc4TCy310D6tldmO43+98qEseUc4+J30fzUz2NccigF6qXVnsDOvMzM z79aidYu2Iny2mfqfMSVS1/3Qs85yOgTs5VL8dlZ5ZRu1+5cJHqoBW70Y/HXN0t6cpgp 3v4M5mRd3AbAfyoXPJZuQwiGvu7TqAQ5jjqbVPpqkOXKfo1nPofayPQhr49oe4Uz4Yz/ JUZhOMo24o/8QGIw59vQUy2odsQ+ZmyVVnLAen4h64Xc3DvmVOrRTXAr2H0cnHAfEU4K uw5g== 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=jxTTLqwcHAEVAeTuuCkKjXpW6hN/t89uxKi8B+/b3Us=; b=MR8ODoYc/75Y5/HDg7y1Nn5dnZQ8HjO0MYw/ZSAmY+x5ozlrqjd8SfqWxcKjm5V1NS PmZZH1cQM6g1OxgiMYQzJ5zqwOeggPL2wA2cqdhNRj+zL9EXedYUtP/f2K1LJZRx2hAQ JICe5r21kjMQ6WV6cAVdHfgrCaou+DpaC+wZXV8XVJ1tASOKO6iQY490TozItk2b6GnA wo8LdkoY4lke0MgpqyYQ9gqVGRdexfFAzoyfaUNiToI1fOYJzDvAij+gxWruCVpW8wHq 2293qKQUUEYpoG3F7thtD3ZHO2g1zVE8MZLtva7wysnq/RRovWp7ic8VP4g3907ZEDkR +ncg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=h0mWA+rq; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z22-20020a170906435600b0078de51e658esi5557964ejm.208.2022.11.13.11.08.55; Sun, 13 Nov 2022 11:09:19 -0800 (PST) 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=h0mWA+rq; 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 S235565AbiKMTAG (ORCPT + 99 others); Sun, 13 Nov 2022 14:00:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235014AbiKMTAD (ORCPT ); Sun, 13 Nov 2022 14:00:03 -0500 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7362063F3; Sun, 13 Nov 2022 11:00:02 -0800 (PST) Received: by mail-ej1-x62a.google.com with SMTP id n20so2961255ejh.0; Sun, 13 Nov 2022 11:00:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jxTTLqwcHAEVAeTuuCkKjXpW6hN/t89uxKi8B+/b3Us=; b=h0mWA+rqNs0FF3Zh1fKm41HP9Xj62c+rQ8bNwUKNtKO6WVKVCCIu0+9U9ZvYMxDOMl StBcl+UhWp1E1DyRheAqpz8m7F3e0TncByQHRSWGPy4a6U8IcUPF2ytNYRvNzhGaR/4a j8PjIoAXjArZGIw/uGaHhqAaHLjNcGGezzWbYpz9HYabxvKO2vxqAUqskkmvnwGlYE2A bUbdko5tEWCrE6i3oeEi4d0Sdhb38H1wXWtbFS4wuSaj9s1OG19HQNPXwsDakWNuPSdD M45xdzJVTzT+H7oCbQiO/zOuPWz66xo7Ju0RKzPezpjeIe7yqiufAZ9qJtmdLbaN6p9k gIbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jxTTLqwcHAEVAeTuuCkKjXpW6hN/t89uxKi8B+/b3Us=; b=MNEiuNejjM5cW8z5fsW7C/EGitm9DkVJhm65HCeRuHgLGa19foHJ2nIL8XuHcew5GT jm/Gr8yJKxFyD6+RFkCi4xbMmaMXGHodk8QSlAX43gndb1Vx3nYto16/n/J9++7i3G0W /+GhYFNLsTW435atwpNQ50UHRHBW4dvHmbpk6CavoKhkAMDmGhGO3/XzZD8Ar+6qwY+I WhCfIdr/wOLylQ72qbWeUsQp3YtjzSNyLLJY4HlPqzwXlw8tVA76de8dG+dHsBL51iYN JgEs3bDrN8/ju2QqxJVNrD+0UtWKQZA/Y5nN4Osq3lUmOp7YS4YDVSw/zSwPIWNJTUui E+ag== X-Gm-Message-State: ANoB5pnSK7QGWoLk81WVwC4fahNHwHZjScILQlfT2sysppAUOAoy15zo rB8RnOCDNZkoYOkR1hTf+DnMDhON2kuK7Q== X-Received: by 2002:a17:906:8556:b0:7ad:e518:13fd with SMTP id h22-20020a170906855600b007ade51813fdmr8141729ejy.323.1668366001007; Sun, 13 Nov 2022 11:00:01 -0800 (PST) Received: from xws.localdomain ([37.120.217.162]) by smtp.gmail.com with ESMTPSA id p9-20020a170906140900b007a9a56e2a07sm3233809ejc.49.2022.11.13.10.59.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Nov 2022 11:00:00 -0800 (PST) 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 2/2] platform/surface: aggregator_registry: Add support for Surface Pro 9 Date: Sun, 13 Nov 2022 19:59:51 +0100 Message-Id: <20221113185951.224759-2-luzmaximilian@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221113185951.224759-1-luzmaximilian@gmail.com> References: <20221113185951.224759-1-luzmaximilian@gmail.com> MIME-Version: 1.0 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749409133672597578?= X-GMAIL-MSGID: =?utf-8?q?1749409133672597578?= Add device nodes to enable support for battery and charger status, the ACPI platform profile, as well as internal and type-cover HID devices (including sensors, touchpad, keyboard, and other miscellaneous devices) on the Surface Pro 9. This does not include support for a tablet-mode switch yet, as that is now handled via the POS subsystem (unlike the Surface Pro 8, where it is handled via the KIP subsystem) and therefore needs further changes. While we're at it, also add the missing comment for the Surface Pro 8. Signed-off-by: Maximilian Luz --- .../surface/surface_aggregator_registry.c | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c index 585911020cea..db82c2a7c567 100644 --- a/drivers/platform/surface/surface_aggregator_registry.c +++ b/drivers/platform/surface/surface_aggregator_registry.c @@ -268,6 +268,7 @@ static const struct software_node *ssam_node_group_sp7[] = { NULL, }; +/* Devices for Surface Pro 8 */ static const struct software_node *ssam_node_group_sp8[] = { &ssam_node_root, &ssam_node_hub_kip, @@ -284,6 +285,23 @@ static const struct software_node *ssam_node_group_sp8[] = { NULL, }; +/* Devices for Surface Pro 9 */ +static const struct software_node *ssam_node_group_sp9[] = { + &ssam_node_root, + &ssam_node_hub_kip, + &ssam_node_bat_ac, + &ssam_node_bat_main, + &ssam_node_tmp_pprof, + /* TODO: Tablet mode switch (via POS subsystem) */ + &ssam_node_hid_kip_keyboard, + &ssam_node_hid_kip_penstash, + &ssam_node_hid_kip_touchpad, + &ssam_node_hid_kip_fwupd, + &ssam_node_hid_sam_sensors, + &ssam_node_hid_sam_ucm_ucsi, + NULL, +}; + /* -- SSAM platform/meta-hub driver. ---------------------------------------- */ @@ -303,6 +321,9 @@ static const struct acpi_device_id ssam_platform_hub_match[] = { /* Surface Pro 8 */ { "MSHW0263", (unsigned long)ssam_node_group_sp8 }, + /* Surface Pro 9 */ + { "MSHW0343", (unsigned long)ssam_node_group_sp9 }, + /* Surface Book 2 */ { "MSHW0107", (unsigned long)ssam_node_group_gen5 },