Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1578271pxu; Tue, 24 Nov 2020 04:02:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzO9dxfcvfKPxfJ9TUtfBeVA37gaLpeFrS+d3JfS4QY83ylillTrFK8DhA4MrIE2icgH7p9 X-Received: by 2002:a17:906:29db:: with SMTP id y27mr3749453eje.179.1606219374647; Tue, 24 Nov 2020 04:02:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606219374; cv=none; d=google.com; s=arc-20160816; b=PUgc78kmWbTc6ZkOdEFfCN4fuaCXrSQFwgE0+zQB/dhCcExnO9g0sen6okdQWYy+zR 6mlPXNLjk0jAv4PliNzABMYBUqC3wjqF5DEJQLa/PesARWbt5LDshWZEnLn2P9ghpxYM KYNUOmHve/98YdEGlLWau6o4jb4lBqJOUBI3AKJQFuWXwOZh8+IoGBh6z6vR4oZb00sC Bj7CIIjD3vhcF3K2cQaL9S1nUwkbPO9fmd1Yqa3fR6KFnEEjUehx0MhUVq81p8V6knaA Nn4VmF/rykUDzIkNV5FlwirnEaa1a2Vvh+7bNc3Bu8UOp/unjmGpYyh5jxnXAD5eaujt dF0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=HqLKkdSNa/eGdRcb+JU0V3lhIwGJU8Y7t6iuocEiAMc=; b=IZVvWfUDiQAce/9Pw5xR580lTX5+INix0baWIhxhEc0ZBzfpY0WDrBn3sOSw+e+ToD RCgp5b0Gqy96o0z/fqvwggcjtmQs2n43cqcexpl+OQ6k8cdJ0ssiZ/D4a9TUY2EQ/wCh +e3kEEs5frV9dMcuQwzva/47Y7Hev2qFDpIyUrMnF41+g41GR05XcNe0UuGPN6eVvptx mI6GOek6j4b7J+EtfS3xTFWqozgSbSHDvCCSSo5Q0ccjXTi2lwe40AKCLUAzyRDAcaMD h6hKiZ6cwY654RvtUjrhtsRngr8BRO5wGK/Rz7uEwkHOb1hk39tXKSRZbPLJgFVX3TMv xHCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KA4Y2Zuo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bi25si8943202edb.487.2020.11.24.04.02.31; Tue, 24 Nov 2020 04:02:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KA4Y2Zuo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732859AbgKXMAD (ORCPT + 99 others); Tue, 24 Nov 2020 07:00:03 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:23238 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732630AbgKXMAB (ORCPT ); Tue, 24 Nov 2020 07:00:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606219200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HqLKkdSNa/eGdRcb+JU0V3lhIwGJU8Y7t6iuocEiAMc=; b=KA4Y2ZuohBcJmD+gwd+4+Me8IV9+tvB1fd04JQRuHyTxvTST5tthr8/Gnwx8KDAIkTFIrH 0Ofavhrusr9ebvzW4a5AknHcq097stdXOX+LVeU0HWLAmMt643EgJ5/MdFqzdwHC6zzimX gvyH3eqx6He+C/C0Np4Lj/d75+J86/4= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-124-urEcQY7dO2-fsiEyvPVUeA-1; Tue, 24 Nov 2020 06:59:56 -0500 X-MC-Unique: urEcQY7dO2-fsiEyvPVUeA-1 Received: by mail-ej1-f72.google.com with SMTP id e7so6804452eja.15 for ; Tue, 24 Nov 2020 03:59:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HqLKkdSNa/eGdRcb+JU0V3lhIwGJU8Y7t6iuocEiAMc=; b=byLTLM2530VU+28wCuTZtA2QKUTyEiQ9WC+DN2DkO+QgdFUYfCu2r9g4jIBds9PX0B t4kDmi8wkgsK7zNGLc4xDV6xYyVJ0BpCYqD65WXCdMCTobMI21CowE9PGdmGXl2C5Ap3 OaootROKsKGUht4+PCcD8xM5LJ7hc7dsKx1H/hPdd/MQDKpOt9AAZ3XgJcOwMewQx7K5 Jp7p/VQ4ZFNhTn6JScmnmkTG0HE2PdDI9y9PJ5MBQD2DxL78+Y9yJ7TGwTIOys2d1k6A Xh69k1Hxe08UCEh1SHfHdbpsJI/Qj1MgtjW2odQ8xhQVmpnJ9sQOwlZ+ucJn5m/nOnI5 3e0A== X-Gm-Message-State: AOAM531+p3Z4CmbZfwCRciqCF+lwOsJq05kf/+3E/W4PxYU8PzVnytYS IfqqaVz8ibgRb5Ja3egZRXADsomIbvQJWLPWAuE1VzHXvTFexDU2ZSqZyzx6TAwHYGa3C99aC/5 7oAh1QD2HpFFO/8lW9fS9hAEc X-Received: by 2002:a17:907:aaf:: with SMTP id bz15mr621844ejc.199.1606219195465; Tue, 24 Nov 2020 03:59:55 -0800 (PST) X-Received: by 2002:a17:907:aaf:: with SMTP id bz15mr621817ejc.199.1606219195126; Tue, 24 Nov 2020 03:59:55 -0800 (PST) Received: from x1.localdomain (2001-1c00-0c0c-fe00-6c10-fbf3-14c4-884c.cable.dynamic.v6.ziggo.nl. [2001:1c00:c0c:fe00:6c10:fbf3:14c4:884c]) by smtp.gmail.com with ESMTPSA id c8sm6843427edr.29.2020.11.24.03.59.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Nov 2020 03:59:54 -0800 (PST) Subject: Re: [PATCH 0/9] Add support for Microsoft Surface System Aggregator Module To: Maximilian Luz , linux-kernel@vger.kernel.org Cc: Mark Gross , Arnd Bergmann , Greg Kroah-Hartman , Rob Herring , Jiri Slaby , "Rafael J . Wysocki" , Len Brown , Steven Rostedt , Ingo Molnar , Masahiro Yamada , Michal Marek , Jonathan Corbet , =?UTF-8?Q?Bla=c5=be_Hrastnik?= , Dorian Stoll , platform-driver-x86@vger.kernel.org, linux-serial@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org References: <20201115192143.21571-1-luzmaximilian@gmail.com> From: Hans de Goede Message-ID: <059069df-c972-5060-1b26-2ddcc842810d@redhat.com> Date: Tue, 24 Nov 2020 12:59:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201115192143.21571-1-luzmaximilian@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 11/15/20 8:21 PM, Maximilian Luz wrote: > Hello, > > N.B.: the following text is mostly a repeat of cover letter from the > previous RFC for the uninitiated, which can be found at > > https://lore.kernel.org/linux-serial/20200923151511.3842150-1-luzmaximilian@gmail.com/ > > See "Changes" below for an overview of differences between the RFC and > this patchset. I hope I have addressed all comments from that in this > version, thank you again for those. > > The Surface System Aggregator Module (we'll refer to it as Surface > Aggregator or SAM below) is an embedded controller (EC) found on various > Microsoft Surface devices. Specifically, all 4th and later generation > Surface devices, i.e. Surface Pro 4, Surface Book 1 and later, with the > exception of the Surface Go series and the Surface Duo. Notably, it > seems like this EC can also be found on the ARM-based Surface Pro X [1]. > This patch-set can also be found at the following repository and > reference, if you prefer to look at a kernel tree instead of these > emails: > > https://github.com/linux-surface/kernel tags/s/surface-aggregator/v1 > > Thanks, > Max Thank you for your work on this. It would be great if we can get better support for the Surface line in the mainline kernel. Since a lot of people have already commented on this series I think that you have enough feedback to do a v2 addressing that feedback right? For now I'm going to assume that you will do a v2 addressing the initial round of comments and not review this myself (IOW I'll review this when v2 is posted). Let me know if you see things differently. Regards, Hans > [1]: The Surface Pro X is, however, currently considered unsupported due > to a lack of test candidates and, as it seems, general lack of > Linux support on other parts. AFAIK there is an issue preventing > serial devices from being registered, on which the core driver in > this series is build on, thus there is no way to even test that at > this point. I'd be happy to work out any issues regarding SAM on > the Pro X at some point in the future, provided someone can/wants > to actually test it. > > [2]: https://github.com/linux-surface/surface-aggregator-module > [3]: https://github.com/linux-surface/linux-surface > > > Note: This patch depends on > > [PATCH v4] platform/surface: Create a platform subdirectory for > Microsoft Surface devices > > which can be found at > > https://lore.kernel.org/platform-driver-x86/20201009141128.683254-1-luzmaximilian@gmail.com/ > > and is currently in platform-drivers-x86/for-next. > > > Changes from the previous RFC (overview): > - move to platform/surface > - add copyright lines > - change SPDX identifier to GPL-2.0+ (was GPL-2.0-or-later) > - change user-space interface from debugfs to misc-device > - address issues in user-space interface > - fix typos in commit messages and documentation > - fix some bugs, address other issues > > Changes regarding specific patches (and more details) can be found on > the individual patch. > > > Maximilian Luz (9): > platform/surface: Add Surface Aggregator subsystem > platform/surface: aggregator: Add control packet allocation caching > platform/surface: aggregator: Add event item allocation caching > platform/surface: aggregator: Add trace points > platform/surface: aggregator: Add error injection capabilities > platform/surface: aggregator: Add dedicated bus and device type > docs: driver-api: Add Surface Aggregator subsystem documentation > platform/surface: Add Surface Aggregator user-space interface > platform/surface: Add Surface ACPI Notify driver > > Documentation/driver-api/index.rst | 1 + > .../surface_aggregator/client-api.rst | 38 + > .../driver-api/surface_aggregator/client.rst | 394 +++ > .../surface_aggregator/clients/cdev.rst | 85 + > .../surface_aggregator/clients/index.rst | 21 + > .../surface_aggregator/clients/san.rst | 44 + > .../driver-api/surface_aggregator/index.rst | 21 + > .../surface_aggregator/internal-api.rst | 67 + > .../surface_aggregator/internal.rst | 50 + > .../surface_aggregator/overview.rst | 76 + > .../driver-api/surface_aggregator/ssh.rst | 343 +++ > MAINTAINERS | 13 + > drivers/platform/surface/Kconfig | 39 + > drivers/platform/surface/Makefile | 3 + > drivers/platform/surface/aggregator/Kconfig | 65 + > drivers/platform/surface/aggregator/Makefile | 17 + > drivers/platform/surface/aggregator/bus.c | 424 +++ > drivers/platform/surface/aggregator/bus.h | 27 + > .../platform/surface/aggregator/controller.c | 2557 +++++++++++++++++ > .../platform/surface/aggregator/controller.h | 288 ++ > drivers/platform/surface/aggregator/core.c | 831 ++++++ > .../platform/surface/aggregator/ssh_msgb.h | 201 ++ > .../surface/aggregator/ssh_packet_layer.c | 2009 +++++++++++++ > .../surface/aggregator/ssh_packet_layer.h | 175 ++ > .../platform/surface/aggregator/ssh_parser.c | 229 ++ > .../platform/surface/aggregator/ssh_parser.h | 157 + > .../surface/aggregator/ssh_request_layer.c | 1254 ++++++++ > .../surface/aggregator/ssh_request_layer.h | 142 + > drivers/platform/surface/aggregator/trace.h | 625 ++++ > .../platform/surface/surface_acpi_notify.c | 884 ++++++ > .../surface/surface_aggregator_cdev.c | 299 ++ > include/linux/mod_devicetable.h | 18 + > include/linux/surface_acpi_notify.h | 39 + > include/linux/surface_aggregator/controller.h | 832 ++++++ > include/linux/surface_aggregator/device.h | 430 +++ > include/linux/surface_aggregator/serial_hub.h | 659 +++++ > include/uapi/linux/surface_aggregator/cdev.h | 58 + > scripts/mod/devicetable-offsets.c | 8 + > scripts/mod/file2alias.c | 23 + > 39 files changed, 13446 insertions(+) > create mode 100644 Documentation/driver-api/surface_aggregator/client-api.rst > create mode 100644 Documentation/driver-api/surface_aggregator/client.rst > create mode 100644 Documentation/driver-api/surface_aggregator/clients/cdev.rst > create mode 100644 Documentation/driver-api/surface_aggregator/clients/index.rst > create mode 100644 Documentation/driver-api/surface_aggregator/clients/san.rst > create mode 100644 Documentation/driver-api/surface_aggregator/index.rst > create mode 100644 Documentation/driver-api/surface_aggregator/internal-api.rst > create mode 100644 Documentation/driver-api/surface_aggregator/internal.rst > create mode 100644 Documentation/driver-api/surface_aggregator/overview.rst > create mode 100644 Documentation/driver-api/surface_aggregator/ssh.rst > create mode 100644 drivers/platform/surface/aggregator/Kconfig > create mode 100644 drivers/platform/surface/aggregator/Makefile > create mode 100644 drivers/platform/surface/aggregator/bus.c > create mode 100644 drivers/platform/surface/aggregator/bus.h > create mode 100644 drivers/platform/surface/aggregator/controller.c > create mode 100644 drivers/platform/surface/aggregator/controller.h > create mode 100644 drivers/platform/surface/aggregator/core.c > create mode 100644 drivers/platform/surface/aggregator/ssh_msgb.h > create mode 100644 drivers/platform/surface/aggregator/ssh_packet_layer.c > create mode 100644 drivers/platform/surface/aggregator/ssh_packet_layer.h > create mode 100644 drivers/platform/surface/aggregator/ssh_parser.c > create mode 100644 drivers/platform/surface/aggregator/ssh_parser.h > create mode 100644 drivers/platform/surface/aggregator/ssh_request_layer.c > create mode 100644 drivers/platform/surface/aggregator/ssh_request_layer.h > create mode 100644 drivers/platform/surface/aggregator/trace.h > create mode 100644 drivers/platform/surface/surface_acpi_notify.c > create mode 100644 drivers/platform/surface/surface_aggregator_cdev.c > create mode 100644 include/linux/surface_acpi_notify.h > create mode 100644 include/linux/surface_aggregator/controller.h > create mode 100644 include/linux/surface_aggregator/device.h > create mode 100644 include/linux/surface_aggregator/serial_hub.h > create mode 100644 include/uapi/linux/surface_aggregator/cdev.h >