Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1598497pxu; Sun, 6 Dec 2020 01:00:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJz2qmsL9nuMBZqsOdAsy5spOAMQdsX640yrFVAqf7evOt/uZWi+wo39DJ94LpGOm6Q9uIrV X-Received: by 2002:a17:906:24c3:: with SMTP id f3mr14084838ejb.238.1607245202957; Sun, 06 Dec 2020 01:00:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607245202; cv=none; d=google.com; s=arc-20160816; b=I4g4akGulHw+SVdW7H2FxHa+HiZCNDVRdNhpA52hHTi7brhasQfVBRxv22e+mJCjan 1qm0600YM3Cez2ZqblTYMDd+hg5/QdpAvbbX5uPc0263AkxnbyILC9FpHlZtbeg/mXTL SNst0nzSYmXymxkjmbt6ezsDoPSADghx4SF5TDdgothotc5gP2ROHGGBm49vfB1appAR +Yp+E1Vo7hRLUR5iWGw+dabxzijmDZVGG0iUJC2ErlUyPBy50e7U7zkGpbeQ0jBd8oE6 0zeTBHN7+YTV+8f1XWxEQlh1Ptuaq7B0vHBMojJWkYBL3QLSu5weEKhL5zqUnGoyMbQT G5HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=MBvBl4V7x5Z1ixO1EtilANYhUO9czIK7q8UVkAUc+T0=; b=jcDXUajkaubVeXtyu6YKZkyjmBy30kWi/zQIBvlqzCM3iQSKOLvZ6r6S4Q45aVLGiw ZquqOlU1/r3I8EEoOA+KvG+XOlrR5YJvirFK2MU9rne3WmQl0y3RuoGvip1m0WAwH6cl 6TK6fqUpevJM4o6/gHgZHlFwykg6ST0GjMckgpaJNSh7SeU3s4MR7BdLkCef6wf5dqoS amIVEPfmvcPFH2QZ/f0BI/jPp41IAK2s3o8xpM6MtF+2pF1SqS14w6ULnk9+lOXtxCjO kfg37oN8yAGJ4LeMWGToVogwCml08Q6PLVhx8M7Tsfwr63gD9wBW7veQHymiGQUdxeJI l2EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="HFMYqeq/"; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f25si4747367ejh.37.2020.12.06.00.59.40; Sun, 06 Dec 2020 01:00:02 -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=@kernel.org header.s=k20201202 header.b="HFMYqeq/"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725945AbgLFI5T (ORCPT + 99 others); Sun, 6 Dec 2020 03:57:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:50084 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725767AbgLFI5T (ORCPT ); Sun, 6 Dec 2020 03:57:19 -0500 Date: Sun, 6 Dec 2020 10:56:31 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607244998; bh=LH+RKt1fSfmVnZq0s40gHs8KqDpkIxtCMOOy7KLFL1k=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=HFMYqeq/BpYg9rtXwFWcwQZnMr12OV2oUfJNF5M8sS3PyiOTq0dihhJ1ax0ZpOoGG jq48s8G8dP8+y7dzseb6Lc5reeib2Y1l38pPOUSroHtGOZlgsbu1RHsQQSeNXNlZmS q/ccmhY6yOo2M9erSi3vMwjoZxyN7+FaPA4GdINKxGOxZQMOcloK8a0MoSlmCIwEZU T86advb+nqhWlk+hlWlAyqDuwNktShaQxesW93a3kbkk15vyCPc5e0PYElwatBqDxT BMSu1nR/brpFzqrkar7BX/oRhA08GZZmxR86hHYdv1joob5HrYbVZKNbEr/tEuf/1o pS/Fis4lxVKvw== From: Leon Romanovsky To: Hans de Goede Cc: Maximilian Luz , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Mark Gross , Andy Shevchenko , =?utf-8?Q?Barnab=C3=A1s_P=C5=91cze?= , Arnd Bergmann , Rob Herring , Jiri Slaby , "Rafael J . Wysocki" , Len Brown , Steven Rostedt , Ingo Molnar , Masahiro Yamada , Michal Marek , Jonathan Corbet , =?utf-8?B?Qmxhxb4=?= 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 Subject: Re: [PATCH v2 0/9] Add support for Microsoft Surface System Aggregator Module Message-ID: <20201206085631.GE210929@unreal> References: <20201203212640.663931-1-luzmaximilian@gmail.com> <20201206070705.GA686270@unreal> <052ecf4d-9e08-2c08-8a06-c30ba2b28d82@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <052ecf4d-9e08-2c08-8a06-c30ba2b28d82@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 Surface devices. Initial support includes > >> the ACPI interface to the controller, via which battery and thermal > >> information is provided on some of these devices. > >> > >> The previous version and cover letter detailing what this series is > >> about can be found at > >> > >> https://lore.kernel.org/platform-driver-x86/20201115192143.21571-1-luzmaximilian@gmail.com/ > >> > >> 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/v2 > >> > >> Thank you all for the feedback to v1, I hope I have addressed all > >> comments. > > > > > > I think that it is too far fetched to attempt and expose UAPI headers > > for some obscure char device that we are all know won't be around in > > a couple of years from now due to the nature of how this embedded world > > works. > > This is not for an embedded device, but for the popular line of > Microsoft Surface laptops / 2-in-1s... It is the naming, we don't have char device for every "laptop" vendor. Why is Microsoft different here? > > > 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 protocol, > just like we provide raw access to USB devices and have hidraw devices. USB devices implement standard protocol, this surface hub is nothing even close to that. > > So this goes a litle beyond just debugging; and eventually the choice > may be made to implement some functionality with userspace drivers, > just like we do for some HID and USB devices. I don't know how it goes in device/platform area, but in other large subsystems, UAPI should be presented with working user-space part. > > Still I agree with you that adding new userspace API is something which > needs to be considered carefully. So I will look at this closely when > reviewing this set. > > > Also the idea that you are creating new bus just for this device doesn't > > really sound right. I recommend you to take a look on auxiliary bus and > > use it or come with very strong justifications why it is not fit yet. > > AFAIK the auxiliary bus is for sharing a single device between multiple > drivers, while the main device-driver also still offers functionality > (beyond the providing of access) itself. The idea behind auxiliary bus is to slice various functionalities into different sub-drivers, see it as a way to create subsystem inside one driver. > > This is more akin to how the WMI driver also models different WMI > functions as a bus + devices on the bus. > > Or how the SDIO driver multiplex a single SDIO device into its > functions by again using a bus + devices on the bus model. > > Also this has been in the works for quite a while now, the Linux on > Microsoft Surface devices community has been working on this out of > tree for a long time, see: > https://github.com/linux-surface/ It is not relevant, the code is merged than it is ready. > > And an RFC and a v1 have been posted a while ago, while auxiliary > bus support is not even in the mainline kernel yet. I would agree > with you that this should switch to auxiliary bus, despite the timing, > if that would lead to much better code. But ATM I don't really see > switching to auxiliary bus offering much benefits here. The auxiliary bus is merged and part of linux-next. https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/tag/?h=auxbus-5.11-rc1 > > > I'm sorry to say, but this series is not ready to be merged yet. > > > > NAK: Leon Romanovsky > > See above, I believe that this all is a bit harsh and I have not > really heard convincing arguments for not merging this. > > Moreover such a quick nack does not really promote working upstream, > where as we actually want people to work upstream as much as possible. > I know this is not a reason for taking bad code, but I'm not > convinced that this is bad code. I naked explicitly for two reasons: UAPI(chardev) and lack of rationale for the custom bus, never said "bad code". > > I have not reviewed this myself yet, but once I have reviewed > this and any review remarks have been addressed I do expect to > merge this series through the platform-drivers-x86 tree. > > Regards, > > Hans de Goede > (drivers/platform/x86 and drivers/platform/surface subsys maintainer) >