From patchwork Wed Aug 10 14:41:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maximilian Luz X-Patchwork-Id: 12940628 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AB62C19F2A for ; Wed, 10 Aug 2022 14:42:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232662AbiHJOmE (ORCPT ); Wed, 10 Aug 2022 10:42:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232664AbiHJOmB (ORCPT ); Wed, 10 Aug 2022 10:42:01 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B51751A01; Wed, 10 Aug 2022 07:41:42 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id k26so28136289ejx.5; Wed, 10 Aug 2022 07:41:42 -0700 (PDT) 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; bh=FikqBGBdu6x0dvHeaCyYGZeHuRdv4sBlsHEPXRgAZ58=; b=ffdypMKK/ep4+DITQK84DLW7WEK36T/ksk5u0KwrFGTYvPS9eaMwVyx7laY9CkW858 R5DUAZJRBhoETpnMK9eX6PFWzAQPvwPkyJ5LJVkBNgkn9NyM4lnSQsJJ3YC+9OecsoZm uvjQzxVarpotbURJ474oTqo2bUcnuY+RXRIiJWpQ3WExUouXiTc2GFED9wuk5FbmblRO dQwBIA9d6vKAi76EJZDZ2XScvT9/VQxesGrwuUVf6krZSGDGI6HkyLT9ZCi94sZej/Nx ijX+xe2MIR3IRShMCa5LboY98JDqqvUk/0xQ5dYsGTQGVaVsRVFEVM6al6DG63DSbgEd zBXA== 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; bh=FikqBGBdu6x0dvHeaCyYGZeHuRdv4sBlsHEPXRgAZ58=; b=o5pnLAh/qDhxA4ZawQvbpzhu30LVvaluRmeGzOvRNlUoBZMWVLBj2MZ1uqkUNrajkP DezHmQ+nMKXx7zHSSkyl00zvtCc5BqigeoCqI0ZIwsMURUKb3DFglviushpa0cnIxtmd VsHAyMvJ8FJwvcvcX4EbSaDHzo2KkDxXntz4fCEuRSjtKfjWglLzSQ36SSZ4gsYmTzpQ HvdsRhpducn8O2NRyp7HiUjbZ9MkmAOVoGv5dUqlU8UhvEylugSbSBLpesjeYsxCaFVK NuHYLPQ3SvfBBtD55r26fRe79zjZli2Vg0vtmxiE7OmZWoNCcKLlc7f6HpqHybmXMRkP w20g== X-Gm-Message-State: ACgBeo2xYGup1GE/e5C7Tgh9zl5n+X+T5NX4QhXYuvi5t4gFVfGMKN1k vpmlHKqs4GENATmTyC8rp4d4AyenBfk= X-Google-Smtp-Source: AA6agR4d7csoW30nuv2zRdV3XRrHGwArOWcLEHh4+2IyLT/pgV06qrIkqzxIZr34Q4QYFBzPrijgJw== X-Received: by 2002:a17:907:7284:b0:731:82a3:16e3 with SMTP id dt4-20020a170907728400b0073182a316e3mr7710834ejc.30.1660142500924; Wed, 10 Aug 2022 07:41:40 -0700 (PDT) Received: from xws.localdomain ([37.120.217.162]) by smtp.gmail.com with ESMTPSA id d25-20020aa7d699000000b0043cedad30a5sm7778049edr.21.2022.08.10.07.41.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Aug 2022 07:41:40 -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 1/3] platform/surface: aggregator_registry: Rename HID device nodes based on their function Date: Wed, 10 Aug 2022 16:41:15 +0200 Message-Id: <20220810144117.493710-2-luzmaximilian@gmail.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220810144117.493710-1-luzmaximilian@gmail.com> References: <20220810144117.493710-1-luzmaximilian@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org Rename HID device nodes based on their function. In particular, these are nodes for firmware updates via the CFU mechanism (component firmware update), HID based sensors, and a USB-C UCSI client. Signed-off-by: Maximilian Luz --- .../surface/surface_aggregator_registry.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c index d5655f6a4a41..c1ee8af7996d 100644 --- a/drivers/platform/surface/surface_aggregator_registry.c +++ b/drivers/platform/surface/surface_aggregator_registry.c @@ -104,14 +104,14 @@ static const struct software_node ssam_node_hid_tid1_touchpad = { .parent = &ssam_node_root, }; -/* HID device instance 6 (TID1, unknown HID device). */ -static const struct software_node ssam_node_hid_tid1_iid6 = { +/* HID device instance 6 (TID1, HID sensor collection). */ +static const struct software_node ssam_node_hid_tid1_sensors = { .name = "ssam:01:15:01:06:00", .parent = &ssam_node_root, }; -/* HID device instance 7 (TID1, unknown HID device). */ -static const struct software_node ssam_node_hid_tid1_iid7 = { +/* HID device instance 7 (TID1, UCM UCSI HID client). */ +static const struct software_node ssam_node_hid_tid1_ucm_ucsi = { .name = "ssam:01:15:01:07:00", .parent = &ssam_node_root, }; @@ -182,8 +182,8 @@ static const struct software_node ssam_node_hid_kip_touchpad = { .parent = &ssam_node_hub_kip, }; -/* HID device instance 5 (KIP hub, unknown HID device). */ -static const struct software_node ssam_node_hid_kip_iid5 = { +/* HID device instance 5 (KIP hub, type-cover firmware update). */ +static const struct software_node ssam_node_hid_kip_fwupd = { .name = "ssam:01:15:02:05:00", .parent = &ssam_node_hub_kip, }; @@ -244,8 +244,8 @@ static const struct software_node *ssam_node_group_sls[] = { &ssam_node_hid_tid1_keyboard, &ssam_node_hid_tid1_penstash, &ssam_node_hid_tid1_touchpad, - &ssam_node_hid_tid1_iid6, - &ssam_node_hid_tid1_iid7, + &ssam_node_hid_tid1_sensors, + &ssam_node_hid_tid1_ucm_ucsi, &ssam_node_hid_tid1_sysctrl, NULL, }; @@ -278,7 +278,7 @@ static const struct software_node *ssam_node_group_sp8[] = { &ssam_node_hid_kip_keyboard, &ssam_node_hid_kip_penstash, &ssam_node_hid_kip_touchpad, - &ssam_node_hid_kip_iid5, + &ssam_node_hid_kip_fwupd, NULL, }; From patchwork Wed Aug 10 14:41:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maximilian Luz X-Patchwork-Id: 12940627 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68146C25B07 for ; Wed, 10 Aug 2022 14:42:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232667AbiHJOmB (ORCPT ); Wed, 10 Aug 2022 10:42:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232649AbiHJOmB (ORCPT ); Wed, 10 Aug 2022 10:42:01 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 505DB4F6A3; Wed, 10 Aug 2022 07:41:43 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id gb36so28064606ejc.10; Wed, 10 Aug 2022 07:41:43 -0700 (PDT) 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; bh=+K2qsWwalWN+gCRC+SKCkMGbVGT3u4gZZQj37rAvARQ=; b=ASKJnbWFRYJikUvAhqgTeTq6xayqgxBfyoSbQsPkUaZb1Kpz+9/aJE87c/9RKXWSI8 r2J6uP1WwFjpC+wnEV83Do5DGCa/+gpn4oPR3iw/U1zITYHBFoYthitzpW8vkZw+WBc4 gDQufUZdhjw4YkuoNulnIeMpRtnhoLff+5jAom9aKrbmO30pv7IOqfjsC1wigQ/NOONu 2QKTeHD3zLc4s8/TAjlGgHPj+bfi2POufkH3V1yJeIGvC53ECjUC0vsOdvnp2xO6qkbP J2SSuBWfSRXqfurF1JEDkM5g5Fs9NifQncK4nDEOHdaJS4cKnPm9I+rrER5EWy7SApOF 6Cdg== 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; bh=+K2qsWwalWN+gCRC+SKCkMGbVGT3u4gZZQj37rAvARQ=; b=RwbtgIiXRmvS4pKdSFULd2CKnynuYD6EojRSHzMFq4BRKmqDvl1ugFxiS3OpAROsF3 qTnEtmExfh85TVVzAJJfjy8RqrFBAmQj5YYSfEMQlEbGrrcgb2P4OP0maC+Ey+3gLZLt 2Anlo34+jlSeyjScCTl3sX8wqxoad62z+WOCYmWZtnDWQdCjqL7RWU6rJz2VhLOVeCEm SmFan0u7bmh0W1NWk6yBjfnIgYRJmkSqPUtbqLQBoCfDhPEpp20UJGLJFaOBsSrnjW+r /3+1WDoa70mNpQybK5aSjpiXE4xwBScuk7UMZ2E+cGokrN6jvzNBtRlfEbvwqU/lYAlR QQrQ== X-Gm-Message-State: ACgBeo3+FXR2BoGpNfPSUk7VzI1KZYpX6fv0LA8XuFCYy0BZ7muuyMru jCVoGHa9CoYnru/AL/PbxKmw03wmrGI= X-Google-Smtp-Source: AA6agR7+OZZMo9j26lkZt/EprWK2SrP/+2kywFgh/UYliLghkSYMnYwwAccYL4FJFi6p+OBvKiVggA== X-Received: by 2002:a17:906:ef8b:b0:730:d348:61b9 with SMTP id ze11-20020a170906ef8b00b00730d34861b9mr20547784ejb.350.1660142501743; Wed, 10 Aug 2022 07:41:41 -0700 (PDT) Received: from xws.localdomain ([37.120.217.162]) by smtp.gmail.com with ESMTPSA id d25-20020aa7d699000000b0043cedad30a5sm7778049edr.21.2022.08.10.07.41.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Aug 2022 07:41:41 -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 2/3] platform/surface: aggregator_registry: Rename HID device nodes based on new findings Date: Wed, 10 Aug 2022 16:41:16 +0200 Message-Id: <20220810144117.493710-3-luzmaximilian@gmail.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220810144117.493710-1-luzmaximilian@gmail.com> References: <20220810144117.493710-1-luzmaximilian@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org On Windows, the HID devices with target ID 1 are grouped as "Surface Hot Plug - SAM". Rename their device nodes in the registry to reflect that and update the comments accordingly. Signed-off-by: Maximilian Luz --- .../surface/surface_aggregator_registry.c | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c index c1ee8af7996d..805c7bd4b15e 100644 --- a/drivers/platform/surface/surface_aggregator_registry.c +++ b/drivers/platform/surface/surface_aggregator_registry.c @@ -86,38 +86,38 @@ static const struct software_node ssam_node_bas_dtx = { .parent = &ssam_node_root, }; -/* HID keyboard (TID1). */ -static const struct software_node ssam_node_hid_tid1_keyboard = { +/* HID keyboard (SAM, TID=1). */ +static const struct software_node ssam_node_hid_sam_keyboard = { .name = "ssam:01:15:01:01:00", .parent = &ssam_node_root, }; -/* HID pen stash (TID1; pen taken / stashed away evens). */ -static const struct software_node ssam_node_hid_tid1_penstash = { +/* HID pen stash (SAM, TID=1; pen taken / stashed away evens). */ +static const struct software_node ssam_node_hid_sam_penstash = { .name = "ssam:01:15:01:02:00", .parent = &ssam_node_root, }; -/* HID touchpad (TID1). */ -static const struct software_node ssam_node_hid_tid1_touchpad = { +/* HID touchpad (SAM, TID=1). */ +static const struct software_node ssam_node_hid_sam_touchpad = { .name = "ssam:01:15:01:03:00", .parent = &ssam_node_root, }; -/* HID device instance 6 (TID1, HID sensor collection). */ -static const struct software_node ssam_node_hid_tid1_sensors = { +/* HID device instance 6 (SAM, TID=1, HID sensor collection). */ +static const struct software_node ssam_node_hid_sam_sensors = { .name = "ssam:01:15:01:06:00", .parent = &ssam_node_root, }; -/* HID device instance 7 (TID1, UCM UCSI HID client). */ -static const struct software_node ssam_node_hid_tid1_ucm_ucsi = { +/* HID device instance 7 (SAM, TID=1, UCM UCSI HID client). */ +static const struct software_node ssam_node_hid_sam_ucm_ucsi = { .name = "ssam:01:15:01:07:00", .parent = &ssam_node_root, }; -/* HID system controls (TID1). */ -static const struct software_node ssam_node_hid_tid1_sysctrl = { +/* HID system controls (SAM, TID=1). */ +static const struct software_node ssam_node_hid_sam_sysctrl = { .name = "ssam:01:15:01:08:00", .parent = &ssam_node_root, }; @@ -241,12 +241,12 @@ static const struct software_node *ssam_node_group_sls[] = { &ssam_node_bat_main, &ssam_node_tmp_pprof, &ssam_node_pos_tablet_switch, - &ssam_node_hid_tid1_keyboard, - &ssam_node_hid_tid1_penstash, - &ssam_node_hid_tid1_touchpad, - &ssam_node_hid_tid1_sensors, - &ssam_node_hid_tid1_ucm_ucsi, - &ssam_node_hid_tid1_sysctrl, + &ssam_node_hid_sam_keyboard, + &ssam_node_hid_sam_penstash, + &ssam_node_hid_sam_touchpad, + &ssam_node_hid_sam_sensors, + &ssam_node_hid_sam_ucm_ucsi, + &ssam_node_hid_sam_sysctrl, NULL, }; From patchwork Wed Aug 10 14:41:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maximilian Luz X-Patchwork-Id: 12940629 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63D94C00140 for ; Wed, 10 Aug 2022 14:42:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232691AbiHJOmG (ORCPT ); Wed, 10 Aug 2022 10:42:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232689AbiHJOmE (ORCPT ); Wed, 10 Aug 2022 10:42:04 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C82215007D; Wed, 10 Aug 2022 07:41:43 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id y13so28041878ejp.13; Wed, 10 Aug 2022 07:41:43 -0700 (PDT) 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; bh=fTJ2OK/JmvWIS6+MCN0Vybn0C6WdQyyK6xBw94ER00Q=; b=P7U4vyZdOO9BJ7p33fKmRYXZGxvyUSoyamrQok4DgzSdTxYMmdMwkzggARBfTPdoPl 5msP9psUlBmyF1Pu7qT6IHgCF6s8ReBtG3UxOv50rRRFc9C/FHWhVHRWl638UfbGjWiB 61Vy243op7nnVK/Zh+CIqevSv9mKYeJfR8EtoYegteMB9a5OujeXqAa4Ksh+ONW1/SVn v1XRKCMTvKS2x4YQlFcaQMaRizOrmNQLoOVftXXuticHwQMaAtCNZfUsmGOgZImnlfCB DJ/9DADP6y2ArbGC7EP5cI8VJgKksiC9WdE9uW0BxSsx2TYA8WevsNQEW6gn/xJrIcix 9zSg== 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; bh=fTJ2OK/JmvWIS6+MCN0Vybn0C6WdQyyK6xBw94ER00Q=; b=xkUBHCMUytwzmKiRumwjZSKe5qH309LC4FDGgofIN/Hbcd/bYfnjpPJekG75s56WM/ hpMDbmzQ3C5F1cu2wm0o5TUBg/1a7yTiYMYGbqWLP1EWZxVyg+5+LkqLJJyIBUm/gYts rew4f5EJd1pz2Ov8d92zifDJMH41Pl5/c4++vkvApRYz53Ub6JsRnIzR4TYxLObpQMPS NLnZyLj21OopP5FP4YDFPswYWGdTTPFJEfCFF+uFXtieh+OOsOFclGk1ucnKw9EnYB0a +EfZqXh38n9P4WEETc31uVIlK0y7pQGyFlG4XD6I7gdiRxUYxef7mLdE9OFYV5pyZpTr pdmA== X-Gm-Message-State: ACgBeo3WFSnC1lg9l0W7evxKYyMGTTz9fnaGDYKuxFluvwEgRh7eVOER Zq6kHD7IRxdypmYWvK0PJE4= X-Google-Smtp-Source: AA6agR5RQoYGsFn4BW5A3CIqN+VDgk//460F/XCjMZfMfoMO0Bh+Rn/8QgRJGGcGO04V8y9vjqsz+A== X-Received: by 2002:a17:906:7e43:b0:72b:52de:b039 with SMTP id z3-20020a1709067e4300b0072b52deb039mr20979138ejr.198.1660142502388; Wed, 10 Aug 2022 07:41:42 -0700 (PDT) Received: from xws.localdomain ([37.120.217.162]) by smtp.gmail.com with ESMTPSA id d25-20020aa7d699000000b0043cedad30a5sm7778049edr.21.2022.08.10.07.41.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Aug 2022 07:41:42 -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/3] platform/surface: aggregator_registry: Add HID devices for sensors and UCSI client to SP8 Date: Wed, 10 Aug 2022 16:41:17 +0200 Message-Id: <20220810144117.493710-4-luzmaximilian@gmail.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220810144117.493710-1-luzmaximilian@gmail.com> References: <20220810144117.493710-1-luzmaximilian@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org Add software nodes for the HID sensor collection and the UCM UCSI HID client to the Surface Pro 8. In contrast to the type-cover devices, these devices are directly attached to the SAM controller, without any hub. This enables support for HID-based sensors, including the ones used for automatic screen rotation, on the Surface Pro 8. Signed-off-by: Maximilian Luz --- drivers/platform/surface/surface_aggregator_registry.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c index 805c7bd4b15e..cf6e213db223 100644 --- a/drivers/platform/surface/surface_aggregator_registry.c +++ b/drivers/platform/surface/surface_aggregator_registry.c @@ -279,6 +279,8 @@ static const struct software_node *ssam_node_group_sp8[] = { &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, };