Re: [PATCH v2 1/9] platform/surface: Add Surface Aggregator subsystem

2020-12-08 Thread Maximilian Luz
On 12/8/20 2:01 PM, Hans de Goede wrote: Hi, Thank you for your patch series. Full review done, I have a couple of minor review remarks inline below. Note these are really all suggestions and not must fix for this to be merged items. Thank you! I will try to address and fix them. [...]

Re: [PATCH v2 0/9] Add support for Microsoft Surface System Aggregator Module

2020-12-06 Thread Maximilian Luz
On 12/6/20 8:07 AM, Leon Romanovsky wrote: On Thu, Dec 03, 2020 at 10:26:31PM +0100, Maximilian Luz wrote: Hello, Here is version two of the Surface System Aggregator Module (SAM/SSAM) driver series, adding initial support for the embedded controller on 5th and later generation Microsoft

Re: [PATCH v2 0/9] Add support for Microsoft Surface System Aggregator Module

2020-12-06 Thread Maximilian Luz
On 12/6/20 12:41 PM, Leon Romanovsky wrote: On Sun, Dec 06, 2020 at 11:41:46AM +0100, Hans de Goede wrote: Hi, On 12/6/20 11:33 AM, Leon Romanovsky wrote: On Sun, Dec 06, 2020 at 11:04:06AM +0100, Hans de Goede wrote: But there is a difference between being careful and just nacking it

Re: [PATCH v2 0/9] Add support for Microsoft Surface System Aggregator Module

2020-12-06 Thread Maximilian Luz
On 12/6/20 12:30 PM, Leon Romanovsky wrote: On Sun, Dec 06, 2020 at 11:33:40AM +0100, Maximilian Luz wrote: On 12/6/20 10:06 AM, Leon Romanovsky wrote:> On Sun, Dec 06, 2020 at 05:58:32PM +0900, Blaž Hrastnik wrote: More on that, the whole purpose of proposed interface is to de

Re: [PATCH v2 0/9] Add support for Microsoft Surface System Aggregator Module

2020-12-06 Thread Maximilian Luz
On 12/6/20 9:32 AM, Greg Kroah-Hartman wrote: On Sun, Dec 06, 2020 at 09:07:05AM +0200, Leon Romanovsky wrote: On Thu, Dec 03, 2020 at 10:26:31PM +0100, Maximilian Luz wrote: Hello, Here is version two of the Surface System Aggregator Module (SAM/SSAM) driver series, adding initial support

Re: [PATCH v2 0/9] Add support for Microsoft Surface System Aggregator Module

2020-12-06 Thread Maximilian Luz
On 12/6/20 11:43 AM, Hans de Goede wrote: Hi, On 12/6/20 11:33 AM, Maximilian Luz wrote: On 12/6/20 10:06 AM, Leon Romanovsky wrote:> On Sun, Dec 06, 2020 at 05:58:32PM +0900, Blaž Hrastnik wrote: More on that, the whole purpose of proposed interface is to debug and not intended to be u

Re: [PATCH v2 0/9] Add support for Microsoft Surface System Aggregator Module

2020-12-06 Thread Maximilian Luz
On 12/6/20 11:04 AM, Hans de Goede wrote: Hi, On 12/6/20 9:56 AM, Leon Romanovsky wrote: On Sun, Dec 06, 2020 at 09:41:21AM +0100, Hans de Goede wrote: Hi Leon, On 12/6/20 8:07 AM, Leon Romanovsky wrote: On Thu, Dec 03, 2020 at 10:26:31PM +0100, Maximilian Luz wrote: Hello, Here

Re: [PATCH v2 0/9] Add support for Microsoft Surface System Aggregator Module

2020-12-06 Thread Maximilian Luz
On 12/6/20 10:06 AM, Leon Romanovsky wrote:> On Sun, Dec 06, 2020 at 05:58:32PM +0900, Blaž Hrastnik wrote: More on that, the whole purpose of proposed interface is to debug and not intended to be used by any user space code. The purpose is to provide raw access to the Surface Serial Hub

[PATCH v2 9/9] platform/surface: Add Surface ACPI Notify driver

2020-12-03 Thread Maximilian Luz
corresponding notifications (e.g. battery information change) from it. This interface is therefore required to provide said functionality on those devices. Signed-off-by: Maximilian Luz --- Changes in v1 (from RFC): - add copyright lines - change SPDX identifier to GPL-2.0+ (was GPL-2.0-or-later) - fix

[PATCH v2 6/9] platform/surface: aggregator: Add dedicated bus and device type

2020-12-03 Thread Maximilian Luz
devices). Signed-off-by: Maximilian Luz --- Changes in v1 (from RFC): - add copyright lines - change SPDX identifier to GPL-2.0+ (was GPL-2.0-or-later) - remove unnecessary READ_ONCE on multiple occasions - improve documentation of special values for SSAM_DEVICE() - add NULL checks

[PATCH v2 7/9] docs: driver-api: Add Surface Aggregator subsystem documentation

2020-12-03 Thread Maximilian Luz
Add documentation for the Surface Aggregator subsystem and its client drivers, giving an overview of the subsystem, its use-cases, its internal structure and internal API, as well as its external API for writing client drivers. Signed-off-by: Maximilian Luz --- Changes in v1 (from RFC

[PATCH v2 8/9] platform/surface: Add Surface Aggregator user-space interface

2020-12-03 Thread Maximilian Luz
by a pseudo platform-device and corresponding driver to avoid dependence on the dedicated bus, allowing it to be loaded in a minimal configuration. Signed-off-by: Maximilian Luz --- Changes in v1 (from RFC): - add copyright lines - change SPDX identifier to GPL-2.0+ (was GPL-2.0-or-later) - move

[PATCH v2 4/9] platform/surface: aggregator: Add trace points

2020-12-03 Thread Maximilian Luz
commit. Signed-off-by: Maximilian Luz --- Changes in v1 (from RFC): - add copyright line - change SPDX identifier to GPL-2.0+ (was GPL-2.0-or-later) - pack tracing structs Changes in v2: - add compiletime check on SSAM_PTR_UID_LEN - fix ssam_trace_get_command_field_u8() macro - use dedicated

[PATCH v2 5/9] platform/surface: aggregator: Add error injection capabilities

2020-12-03 Thread Maximilian Luz
as - inject invalid data into submitted and received packets. Together with the trace points introduced in the previous commit, these facilities are intended to aid in testing, validation, and debugging of the Surface Aggregator communication layer. Signed-off-by: Maximilian Luz --- Changes in v1

[PATCH v2 3/9] platform/surface: aggregator: Add event item allocation caching

2020-12-03 Thread Maximilian Luz
-by: Maximilian Luz --- .../platform/surface/aggregator/controller.c | 86 +-- .../platform/surface/aggregator/controller.h | 9 ++ drivers/platform/surface/aggregator/core.c| 16 +++- 3 files changed, 101 insertions(+), 10 deletions(-) diff --git a/drivers/platform/surface

[PATCH v2 0/9] Add support for Microsoft Surface System Aggregator Module

2020-12-03 Thread Maximilian Luz
checkpatch --strict, fix these and other style 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

[PATCH v2 2/9] platform/surface: aggregator: Add control packet allocation caching

2020-12-03 Thread Maximilian Luz
. Signed-off-by: Maximilian Luz --- drivers/platform/surface/aggregator/core.c| 27 ++- .../surface/aggregator/ssh_packet_layer.c | 47 +++ .../surface/aggregator/ssh_packet_layer.h | 3 ++ 3 files changed, 67 insertions(+), 10 deletions(-) diff --git a/drivers

Re: [PATCH 0/9] Add support for Microsoft Surface System Aggregator Module

2020-11-24 Thread Maximilian Luz
On 11/24/20 12:59 PM, Hans de Goede wrote: 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

Re: [PATCH 1/9] platform/surface: Add Surface Aggregator subsystem

2020-11-19 Thread Maximilian Luz
On 11/19/20 4:54 PM, Barnabás Pőcze wrote: Hi [...] +enum ssam_ssh_tc { + /* Known SSH/EC target categories. */ + // category 0x00 is invalid for EC use + SSAM_SSH_TC_SAM = 0x01, // generic system functionality, real-time clock +

Re: [PATCH] PCI: Add sysfs attribute for PCI device power state

2020-11-18 Thread Maximilian Luz
On 11/18/20 6:49 PM, Bjorn Helgaas wrote: On Sun, Nov 15, 2020 at 10:19:22PM +0100, Maximilian Luz wrote: On 11/15/20 9:27 PM, Bjorn Helgaas wrote: [...] I think something read from sysfs is a snapshot with no guarantee about how long it will remain valid, so I don't see a problem

Re: [PATCH 1/9] platform/surface: Add Surface Aggregator subsystem

2020-11-18 Thread Maximilian Luz
On 11/18/20 1:28 AM, Barnabás Pőcze wrote: Hi I have attached some thoughts and comments inline. Thanks! 2020. november 15., vasárnap 20:21 keltezéssel, Maximilian Luz írta: [...] +/* -- Event notifier/callbacks. - */ +/* + * The notifier

Re: [PATCH 8/9] platform/surface: Add Surface Aggregator user-space interface

2020-11-17 Thread Maximilian Luz
On 11/17/20 9:36 PM, Randy Dunlap wrote: On 11/15/20 11:21 AM, Maximilian Luz wrote: +#define SSAM_CDEV_REQUEST _IOWR(0xA5, 1, struct ssam_cdev_request) All ioctl major numbers (0xA5) should be documented in Documentation/userspace-api/ioctl/ioctl-number.rst Apologies if I missed

Re: [PATCH 9/9] platform/surface: Add Surface ACPI Notify driver

2020-11-17 Thread Maximilian Luz
On 11/17/20 9:09 PM, Randy Dunlap wrote: On 11/15/20 11:21 AM, Maximilian Luz wrote: diff --git a/drivers/platform/surface/Kconfig b/drivers/platform/surface/Kconfig index cecad7a0cb7b..3b0da86546fa 100644 --- a/drivers/platform/surface/Kconfig +++ b/drivers/platform/surface/Kconfig @@ -40,6

Re: [PATCH 4/9] platform/surface: aggregator: Add trace points

2020-11-17 Thread Maximilian Luz
On 11/17/20 5:44 PM, Steven Rostedt wrote: On Sun, 15 Nov 2020 20:21:38 +0100 Maximilian Luz wrote: [...] /* * Lock packet and commit with memory barrier. If this packet has * already been locked, it's going to be removed and completed by @@ -1154,6 +1167,8

Re: [PATCH 1/9] platform/surface: Add Surface Aggregator subsystem

2020-11-16 Thread Maximilian Luz
On 11/16/20 6:03 PM, Maximilian Luz wrote: On 11/16/20 2:33 PM, Andy Shevchenko wrote: On Sun, Nov 15, 2020 at 9:25 PM Maximilian Luz wrote: [...] READ_ONCE and WRITE_ONCE are used to ensure proper access to state that can be changed outside of the queue/pending locks (or under any one

Re: [PATCH 1/9] platform/surface: Add Surface Aggregator subsystem

2020-11-16 Thread Maximilian Luz
On 11/16/20 2:33 PM, Andy Shevchenko wrote: On Sun, Nov 15, 2020 at 9:25 PM Maximilian Luz wrote: Add Surface System Aggregator Module core and Surface Serial Hub driver, required for the embedded controller found on Microsoft Surface devices. The Surface System Aggregator Module (SSAM, SAM

Re: [PATCH] PCI: Add sysfs attribute for PCI device power state

2020-11-15 Thread Maximilian Luz
On 11/15/20 9:27 PM, Bjorn Helgaas wrote: [...] I think something read from sysfs is a snapshot with no guarantee about how long it will remain valid, so I don't see a problem with the value being stale by the time userspace consumes it. I agree on this, and the READ_ONCE won't protect

[PATCH 3/9] platform/surface: aggregator: Add event item allocation caching

2020-11-15 Thread Maximilian Luz
-by: Maximilian Luz --- .../platform/surface/aggregator/controller.c | 84 +-- .../platform/surface/aggregator/controller.h | 9 ++ drivers/platform/surface/aggregator/core.c| 16 +++- 3 files changed, 100 insertions(+), 9 deletions(-) diff --git a/drivers/platform/surface

[PATCH 6/9] platform/surface: aggregator: Add dedicated bus and device type

2020-11-15 Thread Maximilian Luz
devices). Signed-off-by: Maximilian Luz --- Changes from RFC: - add copyright lines - change SPDX identifier to GPL-2.0+ (was GPL-2.0-or-later) - remove unnecessary READ_ONCE on multiple occasions - improve documentation of special values for SSAM_DEVICE() - add NULL checks for ssam_device_get

[PATCH 7/9] docs: driver-api: Add Surface Aggregator subsystem documentation

2020-11-15 Thread Maximilian Luz
Add documentation for the Surface Aggregator subsystem and its client drivers, giving an overview of the subsystem, its use-cases, its internal structure and internal API, as well as its external API for writing client drivers. Signed-off-by: Maximilian Luz --- Changes from RFC: - change SPDX

[PATCH 8/9] platform/surface: Add Surface Aggregator user-space interface

2020-11-15 Thread Maximilian Luz
by a pseudo platform-device and corresponding driver to avoid dependence on the dedicated bus, allowing it to be loaded in a minimal configuration. Signed-off-by: Maximilian Luz --- Changes from RFC: - add copyright lines - change SPDX identifier to GPL-2.0+ (was GPL-2.0-or-later) - move from

[PATCH 0/9] Add support for Microsoft Surface System Aggregator Module

2020-11-15 Thread Maximilian Luz
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:

[PATCH 2/9] platform/surface: aggregator: Add control packet allocation caching

2020-11-15 Thread Maximilian Luz
. Signed-off-by: Maximilian Luz --- drivers/platform/surface/aggregator/core.c| 27 ++- .../surface/aggregator/ssh_packet_layer.c | 47 +++ .../surface/aggregator/ssh_packet_layer.h | 3 ++ 3 files changed, 67 insertions(+), 10 deletions(-) diff --git a/drivers

[PATCH 4/9] platform/surface: aggregator: Add trace points

2020-11-15 Thread Maximilian Luz
commit. Signed-off-by: Maximilian Luz --- Changes from RFC: - add copyright line - change SPDX identifier to GPL-2.0+ (was GPL-2.0-or-later) - pack tracing structs --- drivers/platform/surface/aggregator/Makefile | 3 + .../platform/surface/aggregator/controller.c | 5 + drivers/platform

[PATCH 5/9] platform/surface: aggregator: Add error injection capabilities

2020-11-15 Thread Maximilian Luz
as - inject invalid data into submitted and received packets. Together with the trace points introduced in the previous commit, these facilities are intended to aid in testing, validation, and debugging of the Surface Aggregator communication layer. Signed-off-by: Maximilian Luz --- Changes from

[PATCH 9/9] platform/surface: Add Surface ACPI Notify driver

2020-11-15 Thread Maximilian Luz
corresponding notifications (e.g. battery information change) from it. This interface is therefore required to provide said functionality on those devices. Signed-off-by: Maximilian Luz --- Changes from RFC: - add copyright lines - change SPDX identifier to GPL-2.0+ (was GPL-2.0-or-later) - fix invalid

Re: [PATCH] PCI: Add sysfs attribute for PCI device power state

2020-11-15 Thread Maximilian Luz
On 11/15/20 7:08 AM, Krzysztof Wilczyński wrote: Hi Maximilian, On 20-11-02 15:15:20, Maximilian Luz wrote: While most PCI power-states can be queried from user-space via lspci, this has some limits. Specifically, lspci fails to provide an accurate value when the device is in D3cold as it has

[PATCH] platform/surface: gpe: Add support for 15" Intel version of Surface Laptop 3

2020-11-13 Thread Maximilian Luz
In addition to a 13" version, there is also a 15" (business) version of the Surface Laptop 3 based on Intel CPUs. This version also handles wakeup by lid via (unmarked) GPEs, so add support for it as well. Signed-off-by: Maximilian Luz --- drivers/platform/surface/surface_

[PATCH v2] ACPI: Fix whitespace inconsistencies

2020-11-04 Thread Maximilian Luz
Replaces spaces with tabs where spaces have been (inconsistently) used for indentation and removes trailing whitespaces. Signed-off-by: Maximilian Luz --- Was previously: ACPI: Remove trailing whitespace Changes in v2: - Use checkpatch to scan for inconsistent indentations and fix them too

Re: [PATCH] ACPI: Remove trailing whitespace

2020-11-04 Thread Maximilian Luz
On 11/4/20 6:12 PM, Joe Perches wrote: [...] I'm not too sure about the comments, but I can find the time to look over the output and adjust that if that's something you'd want me to do. Up to you. I hardly looked at the output. I'd generally prefer to use a single line comment like /* AC

Re: [PATCH] ACPI: Remove trailing whitespace

2020-11-04 Thread Maximilian Luz
On 11/4/20 6:13 AM, Joe Perches wrote: [...] Yes. I scanned drivers/acpi for trailing whitespaces after I noticed a couple of them. I did not explicitly scan for other stuff like spaces where there should be tabs, mostly because I haven't found a quick and reliable solution for that. I only

Re: [PATCH] ACPI: Remove trailing whitespace

2020-11-03 Thread Maximilian Luz
On 11/3/20 10:12 PM, Bjorn Helgaas wrote: On Mon, Nov 02, 2020 at 02:36:41PM +0100, Maximilian Luz wrote: Remove trailing whitespace and fix some whitespace inconsitencies while at it. I'm OK with this as long as somebody fixes the s/inconsitencies/inconsistencies/ Sorry about that, I can

[PATCH] PCI: Add sysfs attribute for PCI device power state

2020-11-02 Thread Maximilian Luz
power state as seen by the kernel. Signed-off-by: Maximilian Luz --- Documentation/ABI/testing/sysfs-bus-pci | 9 + drivers/pci/pci-sysfs.c | 12 2 files changed, 21 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI

[PATCH] ACPI: Remove trailing whitespace

2020-11-02 Thread Maximilian Luz
Remove trailing whitespace and fix some whitespace inconsitencies while at it. Signed-off-by: Maximilian Luz --- drivers/acpi/pci_irq.c | 2 +- drivers/acpi/pci_link.c | 12 ++-- drivers/acpi/power.c | 4 ++-- drivers/acpi/processor_perflib.c | 4

Re: [PATCH -next] platform/surface: remove status assignment without reading

2020-10-29 Thread Maximilian Luz
On 10/29/20 12:47 PM, Zou Wei wrote: The status local variable is assigned but never read: [...] static int s3_wmi_query_block(const char *guid, int instance, int *ret) { struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL }; - acpi_status status; union

[PATCH v5] platform/surface: Add Driver to set up lid GPEs on MS Surface device

2020-10-28 Thread Maximilian Luz
iver which, based on some DMI matching, marks the corresponding GPE of the lid device for wake and enables it during suspend. The behavior of this driver models the behavior of the ACPI/PM core for normal wakeup GPEs, properly declared via the _PRW field. Signed-off-by: Maximilian Luz --- Note:

Re: [PATCH v4] platform/surface: Add Driver to set up lid GPEs on MS Surface device

2020-10-28 Thread Maximilian Luz
On 10/23/20 4:08 PM, Maximilian Luz wrote: diff --git a/MAINTAINERS b/MAINTAINERS index 8ff126ced757..31271180dae3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11532,6 +11532,12 @@ F: drivers/scsi/smartpqi/smartpqi*.[ch] F:include/linux/cciss*.h F:include/uapi/linux/cciss*.h

[PATCH v4] platform/surface: Add Driver to set up lid GPEs on MS Surface device

2020-10-23 Thread Maximilian Luz
iver which, based on some DMI matching, marks the corresponding GPE of the lid device for wake and enables it during suspend. The behavior of this driver models the behavior of the ACPI/PM core for normal wakeup GPEs, properly declared via the _PRW field. Signed-off-by: Maximilian Luz --- Note:

[PATCH v4 5/5] platform/surface: Move Surface Pro 3 Button driver to platform/surface

2020-10-09 Thread Maximilian Luz
Move the Surface Pro 3 Button driver from platform/x86 to the newly created platform/surface directory. Signed-off-by: Maximilian Luz Reviewed-by: Andy Shevchenko Acked-by: Chen Yu --- MAINTAINERS| 2 +- drivers/platform/surface/Kconfig

[PATCH v4 0/5] platform/surface: Create a platform subdirectory for Microsoft Surface devices

2020-10-09 Thread Maximilian Luz
changes in Maintainer file. Changes in v3: - Add separate MAINTAINERS entry for platform/surface - Add Maximilian Luz as reviewer for platform/surface Changes in v4: - Rebase onto platform-drivers-x86/for-next. - Restructure MAINTAINERS entry and Kconfig option to be more similar to platform

[PATCH v4 1/5] platform: Add Surface platform directory

2020-10-09 Thread Maximilian Luz
MAINTAINERS entry is added for this directory. Patches to files in this directory will be taken up by the platform-drivers-x86 team (i.e. Hans de Goede and Mark Gross) after they have been reviewed by Maximilian Luz. Signed-off-by: Maximilian Luz --- Changes in v2: - Do not create a separate

[PATCH v4 3/5] platform/surface: Move Surface 3 Button driver to platform/surface

2020-10-09 Thread Maximilian Luz
Move the Surface 3 Button driver from platform/x86 to the newly created platform/surface directory. Signed-off-by: Maximilian Luz Reviewed-by: Andy Shevchenko --- drivers/platform/surface/Kconfig| 6 ++ drivers/platform/surface/Makefile | 1 + drivers

[PATCH v4 2/5] platform/surface: Move Surface 3 WMI driver to platform/surface

2020-10-09 Thread Maximilian Luz
Move the Surface 3 WMI driver from platform/x86 to the newly created platform/surface directory. Signed-off-by: Maximilian Luz --- drivers/platform/surface/Kconfig | 16 drivers/platform/surface/Makefile| 2 ++ drivers/platform/{x86 => surf

[PATCH v4 4/5] platform/surface: Move Surface 3 Power OpRegion driver to platform/surface

2020-10-09 Thread Maximilian Luz
Move the Surface 3 Power operation region driver from platform/x86 to the newly created platform/surface directory. Signed-off-by: Maximilian Luz Reviewed-by: Andy Shevchenko --- drivers/platform/surface/Kconfig | 7 +++ drivers/platform/surface/Makefile

Re: [PATCH v3 2/5] platform/surface: Move Surface 3 WMI driver to platform/surface

2020-10-08 Thread Maximilian Luz
On 10/8/20 4:54 PM, Andy Shevchenko wrote: On Thu, Oct 8, 2020 at 5:35 PM Maximilian Luz wrote: Move the Surface 3 WMI driver from platform/x86 to the newly created platform/surface directory. -# place Microsoft Surface platform drivers here -# place Microsoft Surface platform drivers

Re: [PATCH v3 1/5] platform: Add Surface platform directory

2020-10-08 Thread Maximilian Luz
On 10/8/20 4:52 PM, Andy Shevchenko wrote: On Thu, Oct 8, 2020 at 5:35 PM Maximilian Luz wrote: It may make sense to split the Microsoft Surface hardware platform drivers out to a separate subdirectory, since some of it may be shared between ARM and x86 in the future (regarding devices like

[PATCH v3 1/5] platform: Add Surface platform directory

2020-10-08 Thread Maximilian Luz
MAINTAINERS entry is added for this directory. Patches to files in this directory will be taken up by the platform-drivers-x86 team (i.e. Hans de Goede and Mark Gross) after they have been reviewed by Maximilian Luz. Signed-off-by: Maximilian Luz --- Changes in v2: - Do not create a separate

[PATCH v3 3/5] platform/surface: Move Surface 3 Button driver to platform/surface

2020-10-08 Thread Maximilian Luz
Move the Surface 3 Button driver from platform/x86 to the newly created platform/surface directory. Signed-off-by: Maximilian Luz --- drivers/platform/surface/Kconfig| 6 ++ drivers/platform/surface/Makefile | 1 + drivers/platform/{x86 => surf

[PATCH v3 5/5] platform/surface: Move Surface Pro 3 Button driver to platform/surface

2020-10-08 Thread Maximilian Luz
Move the Surface Pro 3 Button driver from platform/x86 to the newly created platform/surface directory. Signed-off-by: Maximilian Luz --- MAINTAINERS| 2 +- drivers/platform/surface/Kconfig | 6 ++ drivers/platform/surface

[PATCH v3 4/5] platform/surface: Move Surface 3 Power OpRegion driver to platform/surface

2020-10-08 Thread Maximilian Luz
Move the Surface 3 Power operation region driver from platform/x86 to the newly created platform/surface directory. Signed-off-by: Maximilian Luz --- drivers/platform/surface/Kconfig | 7 +++ drivers/platform/surface/Makefile | 1 + drivers/platform/{x86

[PATCH v3 2/5] platform/surface: Move Surface 3 WMI driver to platform/surface

2020-10-08 Thread Maximilian Luz
Move the Surface 3 WMI driver from platform/x86 to the newly created platform/surface directory. Signed-off-by: Maximilian Luz --- drivers/platform/surface/Kconfig | 12 +++- drivers/platform/surface/Makefile| 2 +- drivers/platform/{x86 => surf

[PATCH v3 0/5] platform/surface: Create a platform subdirectory for Microsoft Surface devices

2020-10-08 Thread Maximilian Luz
changes in Maintainer file. Changes in v3: - Add separate MAINTAINERS entry for platform/surface - Add Maximilian Luz as reviewer for platform/surface For more details regarding changes, refer to the individual patches. Maximilian Luz (5): platform: Add Surface platform directory platform

Re: [PATCH v2 0/5] platform/surface: Create a platform subdirectory for Microsoft Surface devices

2020-10-08 Thread Maximilian Luz
On 10/8/20 3:38 PM, Hans de Goede wrote: Hi, On 10/8/20 2:32 PM, Maximilian Luz wrote: On 10/8/20 1:44 PM, Hans de Goede wrote: Hi Maximilian, On 10/5/20 6:03 PM, Maximilian Luz wrote: As has come up in the discussion around    [RFC PATCH] Add support for Microsoft Surface System

Re: [PATCH v2 0/5] platform/surface: Create a platform subdirectory for Microsoft Surface devices

2020-10-08 Thread Maximilian Luz
On 10/8/20 1:44 PM, Hans de Goede wrote: Hi Maximilian, On 10/5/20 6:03 PM, Maximilian Luz wrote: As has come up in the discussion around [RFC PATCH] Add support for Microsoft Surface System Aggregator Module it may make sense to add a Microsoft Surface specific platform subdirectory

[PATCH v2 2/5] platform/surface: Move Surface 3 WMI driver to platform/surface

2020-10-05 Thread Maximilian Luz
Move the Surface 3 WMI driver from platform/x86 to the newly created platform/surface directory. Signed-off-by: Maximilian Luz --- drivers/platform/surface/Kconfig | 12 +++- drivers/platform/surface/Makefile| 2 +- drivers/platform/{x86 => surf

[PATCH v2 0/5] platform/surface: Create a platform subdirectory for Microsoft Surface devices

2020-10-05 Thread Maximilian Luz
/cahp75vfp86h38rd-veger7asaddmz5ymakuhvd0q6wpdqzb...@mail.gmail.com/ Cc: Andy Shevchenko Changes in v2: - Rebase onto linux-platform-drivers-x86/for-next to incorporate changes in Maintainer file. For more details regarding changes, refer to the individual patches. Maximilian Luz (5): platform: Add

[PATCH v2 3/5] platform/surface: Move Surface 3 Button driver to platform/surface

2020-10-05 Thread Maximilian Luz
Move the Surface 3 Button driver from platform/x86 to the newly created platform/surface directory. Signed-off-by: Maximilian Luz --- drivers/platform/surface/Kconfig| 6 ++ drivers/platform/surface/Makefile | 1 + drivers/platform/{x86 => surf

[PATCH v2 4/5] platform/surface: Move Surface 3 Power OpRegion driver to platform/surface

2020-10-05 Thread Maximilian Luz
Move the Surface 3 Power operation region driver from platform/x86 to the newly created platform/surface directory. Signed-off-by: Maximilian Luz --- drivers/platform/surface/Kconfig | 7 +++ drivers/platform/surface/Makefile | 1 + drivers/platform/{x86

[PATCH v2 5/5] platform/surface: Move Surface Pro 3 Button driver to platform/surface

2020-10-05 Thread Maximilian Luz
Move the Surface Pro 3 Button driver from platform/x86 to the newly created platform/surface directory. Signed-off-by: Maximilian Luz --- MAINTAINERS| 2 +- drivers/platform/surface/Kconfig | 6 ++ drivers/platform/surface

[PATCH v2 1/5] platform: Add Surface platform directory

2020-10-05 Thread Maximilian Luz
-off-by: Maximilian Luz --- Changes in v2: - Do not create a separate MAINTAINERS entry for platform/surface. Instead add drivers/platform/surface to x86 platform drivers entry. This incorporates recent changes in the x86 platform driver MAINTAINERS entry. - Fix typo in commit message

Re: [PATCH v3] platform/x86: Add Driver to set up lid GPEs on MS Surface devices

2020-09-26 Thread Maximilian Luz
I suggest delaying this patch until [PATCH] platform/surface: Create a platform subdirectory for Microsoft Surface devices has been resolved. If accepted, I would then submit a v4 directly against the new platform/surface subdirectory. Regards, Max

[PATCH 1/5] platform: Add Surface platform directory

2020-09-26 Thread Maximilian Luz
-off-by: Maximilian Luz Cc: Andy Shevchenko --- MAINTAINERS | 8 drivers/platform/Kconfig | 2 ++ drivers/platform/Makefile | 1 + drivers/platform/surface/Kconfig | 20 drivers/platform/surface/Makefile | 7 +++ 5 files

[PATCH 5/5] platform/surface: Move Surface Pro 3 Button driver to platform/surface

2020-09-26 Thread Maximilian Luz
Move the Surface Pro 3 Button driver from platform/x86 to the newly created platform/surface directory. Signed-off-by: Maximilian Luz Cc: Andy Shevchenko --- MAINTAINERS| 2 +- drivers/platform/surface/Kconfig | 6

[PATCH 4/5] platform/surface: Move Surface 3 Power OpRegion driver to platform/surface

2020-09-26 Thread Maximilian Luz
Move the Surface 3 Power operation region driver from platform/x86 to the newly created platform/surface directory. Signed-off-by: Maximilian Luz Cc: Andy Shevchenko --- drivers/platform/surface/Kconfig | 7 +++ drivers/platform/surface/Makefile | 1

[PATCH 2/5] platform/surface: Move Surface 3 WMI driver to platform/surface

2020-09-26 Thread Maximilian Luz
Move the Surface 3 WMI driver from platform/x86 to the newly created platform/surface directory. Signed-off-by: Maximilian Luz Cc: Andy Shevchenko --- drivers/platform/surface/Kconfig | 12 +++- drivers/platform/surface/Makefile| 2 +- drivers/platform

[PATCH 3/5] platform/surface: Move Surface 3 Button driver to platform/surface

2020-09-26 Thread Maximilian Luz
Move the Surface 3 Button driver from platform/x86 to the newly created platform/surface directory. Signed-off-by: Maximilian Luz Cc: Andy Shevchenko --- drivers/platform/surface/Kconfig| 6 ++ drivers/platform/surface/Makefile | 1 + drivers/platform

[PATCH 0/5] platform/surface: Create a platform subdirectory for Microsoft Surface devices

2020-09-26 Thread Maximilian Luz
/cahp75vfp86h38rd-veger7asaddmz5ymakuhvd0q6wpdqzb...@mail.gmail.com/ Cc: Andy Shevchenko Maximilian Luz (5): platform: Add Surface platform directory platform/surface: Move Surface 3 WMI driver to platform/surface platform/surface: Move Surface 3 Button driver to platform/surface platform/surface: Move

Re: [RFC PATCH 0/9] Add support for Microsoft Surface System Aggregator Module

2020-09-25 Thread Maximilian Luz
On 9/25/20 4:58 PM, Andy Shevchenko wrote: On Thu, Sep 24, 2020 at 10:17 PM Maximilian Luz wrote: On 9/24/20 10:30 AM, Andy Shevchenko wrote: On Wed, Sep 23, 2020 at 6:32 PM Arnd Bergmann wrote: On Wed, Sep 23, 2020 at 5:15 PM Maximilian Luz wrote: ... I think this should go to drivers

Re: [RFC PATCH 0/9] Add support for Microsoft Surface System Aggregator Module

2020-09-24 Thread Maximilian Luz
On 9/24/20 9:38 PM, Arnd Bergmann wrote: On Thu, Sep 24, 2020 at 8:59 PM Maximilian Luz wrote: On 9/24/20 10:26 AM, Arnd Bergmann wrote: On Thu, Sep 24, 2020 at 1:28 AM Maximilian Luz wrote: Note that drivers that connect to the bus typically don't live in the same subdirectory

Re: [RFC PATCH 0/9] Add support for Microsoft Surface System Aggregator Module

2020-09-24 Thread Maximilian Luz
On 9/24/20 10:30 AM, Andy Shevchenko wrote: On Wed, Sep 23, 2020 at 6:32 PM Arnd Bergmann wrote: On Wed, Sep 23, 2020 at 5:15 PM Maximilian Luz wrote: Hello, The Surface System Aggregator Module (we'll refer to it as Surface Aggregator or SAM below) is an embedded controller (EC) found

Re: [RFC PATCH 0/9] Add support for Microsoft Surface System Aggregator Module

2020-09-24 Thread Maximilian Luz
On 9/24/20 10:26 AM, Arnd Bergmann wrote: On Thu, Sep 24, 2020 at 1:28 AM Maximilian Luz wrote: On 9/23/20 9:43 PM, Arnd Bergmann wrote: On Wed, Sep 23, 2020 at 5:43 PM Maximilian Luz wrote: On 9/23/20 5:30 PM, Arnd Bergmann wrote: On Wed, Sep 23, 2020 at 5:15 PM Maximilian Luz wrote

Re: [RFC PATCH 8/9] surface_aggregator: Add DebugFS interface

2020-09-24 Thread Maximilian Luz
On 9/24/20 9:41 AM, Arnd Bergmann wrote: On Thu, Sep 24, 2020 at 12:23 AM Maximilian Luz wrote: On 9/23/20 8:51 PM, Arnd Bergmann wrote: On Wed, Sep 23, 2020 at 8:29 PM Maximilian Luz wrote: On 9/23/20 6:48 PM, Arnd Bergmann wrote: The version I showed avoids the pointers

Re: [RFC PATCH 8/9] surface_aggregator: Add DebugFS interface

2020-09-24 Thread Maximilian Luz
On 9/24/20 8:46 AM, Greg Kroah-Hartman wrote: On Thu, Sep 24, 2020 at 12:06:54AM +0200, Maximilian Luz wrote: On 9/23/20 8:29 PM, Greg Kroah-Hartman wrote: On Wed, Sep 23, 2020 at 08:03:38PM +0200, Maximilian Luz wrote: On 9/23/20 6:14 PM, Greg Kroah-Hartman wrote: [...] So the -EFAULT

Re: [RFC PATCH 1/9] misc: Add Surface Aggregator subsystem

2020-09-24 Thread Maximilian Luz
On 9/24/20 8:48 AM, Greg Kroah-Hartman wrote: On Wed, Sep 23, 2020 at 10:34:23PM +0200, Maximilian Luz wrote: In short: Concurrent execution of the counter functions works, as far as I can tell at least, and, as you see by the long answer, I have to spend some time and think about the duplicate

Re: [RFC PATCH 6/9] surface_aggregator: Add dedicated bus and device type

2020-09-24 Thread Maximilian Luz
On 9/24/20 9:12 AM, Greg Kroah-Hartman wrote: On Wed, Sep 23, 2020 at 11:12:49PM +0200, Maximilian Luz wrote: On 9/23/20 7:33 PM, Greg Kroah-Hartman wrote: On Wed, Sep 23, 2020 at 05:15:08PM +0200, Maximilian Luz wrote: [...] Overall, nice work on this patch, the integration to the driver

Re: [RFC PATCH 4/9] surface_aggregator: Add trace points

2020-09-23 Thread Maximilian Luz
On 9/23/20 10:07 PM, Steven Rostedt wrote: On Wed, 23 Sep 2020 17:15:06 +0200 Maximilian Luz wrote: Add trace points to the Surface Aggregator subsystem core. These trace points can be used to track packets, requests, and allocations. They are further intended for debugging and testing

Re: [RFC PATCH 0/9] Add support for Microsoft Surface System Aggregator Module

2020-09-23 Thread Maximilian Luz
On 9/23/20 9:43 PM, Arnd Bergmann wrote: On Wed, Sep 23, 2020 at 5:43 PM Maximilian Luz wrote: On 9/23/20 5:30 PM, Arnd Bergmann wrote: On Wed, Sep 23, 2020 at 5:15 PM Maximilian Luz wrote: Hello, The Surface System Aggregator Module (we'll refer to it as Surface Aggregator or SAM below

Re: [RFC PATCH 8/9] surface_aggregator: Add DebugFS interface

2020-09-23 Thread Maximilian Luz
On 9/23/20 8:51 PM, Arnd Bergmann wrote: On Wed, Sep 23, 2020 at 8:29 PM Maximilian Luz wrote: On 9/23/20 6:48 PM, Arnd Bergmann wrote: + * struct ssam_debug_request - Controller request IOCTL argument. + * @target_category: Target category of the SAM request. + * @target_id: Target ID

Re: [RFC PATCH 8/9] surface_aggregator: Add DebugFS interface

2020-09-23 Thread Maximilian Luz
On 9/23/20 8:29 PM, Greg Kroah-Hartman wrote: On Wed, Sep 23, 2020 at 08:03:38PM +0200, Maximilian Luz wrote: On 9/23/20 6:14 PM, Greg Kroah-Hartman wrote: [...] So the -EFAULT returned by put_user should have precedence? I was aiming for "in case it fails, return with the first

Re: [RFC PATCH 5/9] surface_aggregator: Add error injection capabilities

2020-09-23 Thread Maximilian Luz
On 9/23/20 7:45 PM, Greg Kroah-Hartman wrote: On Wed, Sep 23, 2020 at 05:15:07PM +0200, Maximilian Luz wrote: This commit adds error injection hooks to the Surface Serial Hub communication protocol implementation, to: - simulate simple serial transmission errors, - drop packets, requests

Re: [RFC PATCH 6/9] surface_aggregator: Add dedicated bus and device type

2020-09-23 Thread Maximilian Luz
On 9/23/20 7:33 PM, Greg Kroah-Hartman wrote: On Wed, Sep 23, 2020 at 05:15:08PM +0200, Maximilian Luz wrote: [...] Overall, nice work on this patch, the integration to the driver core looks totally correct. Great job. Thanks! A few minor nits below: --- /dev/null +++ b/drivers/misc

Re: [RFC PATCH 1/9] misc: Add Surface Aggregator subsystem

2020-09-23 Thread Maximilian Luz
On 9/23/20 6:57 PM, Greg Kroah-Hartman wrote: On Wed, Sep 23, 2020 at 05:15:03PM +0200, Maximilian Luz wrote: +/* -- Safe counters. */ + +/** + * ssh_seq_reset() - Reset/initialize sequence ID counter. + * @c: The counter to reset

Re: [RFC PATCH 8/9] surface_aggregator: Add DebugFS interface

2020-09-23 Thread Maximilian Luz
On 9/23/20 6:48 PM, Arnd Bergmann wrote: Versioned interfaces are basically always a mess, try to avoid them. I'd much rather see this done in one of two ways: a) make it a proper documented interface, in this case probably a misc character device, and then maintain the interface forever,

Re: [RFC PATCH 8/9] surface_aggregator: Add DebugFS interface

2020-09-23 Thread Maximilian Luz
On 9/23/20 6:14 PM, Greg Kroah-Hartman wrote: On Wed, Sep 23, 2020 at 05:15:10PM +0200, Maximilian Luz wrote: [...] +// SPDX-License-Identifier: GPL-2.0-or-later Are you sure about -or-later? I have to ask. Fairly, unless there are any complications with integration of this code that I'm

Re: [RFC PATCH 0/9] Add support for Microsoft Surface System Aggregator Module

2020-09-23 Thread Maximilian Luz
On 9/23/20 5:30 PM, Arnd Bergmann wrote: On Wed, Sep 23, 2020 at 5:15 PM Maximilian Luz wrote: Hello, 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

[RFC PATCH 9/9] surface_aggregator: Add Surface ACPI Notify client driver

2020-09-23 Thread Maximilian Luz
corresponding notifications (e.g. battery information change) from it. This interface is therefore required to provide said functionality on those devices. Signed-off-by: Maximilian Luz --- .../surface_aggregator/clients/index.rst | 1 + .../surface_aggregator/clients/san.rst| 44

[RFC PATCH 8/9] surface_aggregator: Add DebugFS interface

2020-09-23 Thread Maximilian Luz
is managed by a pseudo platform-device and corresponding driver to avoid dependence on the dedicated bus, allowing it to be loaded in a minimal configuration. Signed-off-by: Maximilian Luz --- .../surface_aggregator/clients/dbgdev.rst | 130 .../surface_aggregator/clients/index.rst

[RFC PATCH 5/9] surface_aggregator: Add error injection capabilities

2020-09-23 Thread Maximilian Luz
as - inject invalid data into submitted and received packets. Together with the trace points introduced in the previous commit, these facilities are intended to aid in testing, validation, and debugging of the Surface Aggregator communication layer. Signed-off-by: Maximilian Luz --- drivers/misc

[RFC PATCH 7/9] docs: driver-api: Add Surface Aggregator subsystem documentation

2020-09-23 Thread Maximilian Luz
Add documentation for the Surface Aggregator subsystem and its client drivers, giving an overview of the subsystem, its use-cases, its internal structure and internal API, as well as its external API for writing client drivers. Signed-off-by: Maximilian Luz --- Documentation/driver-api

[RFC PATCH 3/9] surface_aggregator: Add event item allocation chaching

2020-09-23 Thread Maximilian Luz
-by: Maximilian Luz --- drivers/misc/surface_aggregator/controller.c | 84 ++-- drivers/misc/surface_aggregator/controller.h | 9 +++ drivers/misc/surface_aggregator/core.c | 16 +++- 3 files changed, 100 insertions(+), 9 deletions(-) diff --git a/drivers/misc

<    1   2   3   >