Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9488890imu; Wed, 5 Dec 2018 05:43:32 -0800 (PST) X-Google-Smtp-Source: AFSGD/UFBmtKaHsONqR7cZnv2sSKyCmES02Vb74p6mxCHl8vosfcX8c1KTqhBHt9TRB80hKinoUM X-Received: by 2002:a62:3a04:: with SMTP id h4mr24201982pfa.119.1544017412194; Wed, 05 Dec 2018 05:43:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544017412; cv=none; d=google.com; s=arc-20160816; b=uIbZLQ66hGGNeqdP6MaTBJ5LI60xnb4NaJJcnI6UOnn9GMSh9WkJd6kOdx39OhpJZ3 fbXJ324VkhyMiS+4fYZECtzEAcE4nKP97514MgNyOO+q2fsvtdX6GIx1/msE2ctFNM/D 2t7FWaKfPay5z+m5668JKWVU3jgpvgUmXPoCcEuNR2EIv80X9h3niRuhu2huwddeJW5a 2P+WwE9PoJjrs9VCI57mFcd3Kp+x0pc+gSkq++XFybQ/WayfzIUW5bnBjX5ElvZt1grk bf1iCYi8pwXzZVZ9hkMkIGCvVz4FBYpUJRg2wpqF765PZMNb1LNCxMJaXYWCmg8H5J0C PfuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=/zZKVU23mR+As+6sngm/nq6PtK43FsTgQJf4S7rstBE=; b=jk6W1E3ZuNO7Mzu4m4hL7MU9AYlyAF5njvr/GoCEVWpTBSfIW/RE6YAZcn6IqA+TWG oOoRYs984oY1Th94I9t2ab1jE1+9yNw0GiTOjWYzs1cESVOTfh2Gwb9PfhyyExKXBM14 zCWJUNODvaEMbovTdd6rqE+LmJTz3+uZF+IfazK7gqujQ04I9BF0Ulgjfs6xXKvWG3dZ zS6hOp4x//BhBkaMbYIzR24wCZzIduyd6q7MGoqJmnvU7QNEqb9xx81mYhNRh9v4GdlB lxKAW5bUwcQlXrnWZZY5nrCnKbUM4rVzktnkVcl+KnwK8e1SZL9g/Vy5FudsGBuUc7/s NeIQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cirrus.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x32si17897288pgk.309.2018.12.05.05.43.16; Wed, 05 Dec 2018 05:43:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727539AbeLENmV (ORCPT + 99 others); Wed, 5 Dec 2018 08:42:21 -0500 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:45058 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727025AbeLENmV (ORCPT ); Wed, 5 Dec 2018 08:42:21 -0500 Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id wB5DcdiF024547; Wed, 5 Dec 2018 07:40:20 -0600 Authentication-Results: ppops.net; spf=none smtp.mailfrom=ckeepax@opensource.cirrus.com Received: from mail4.cirrus.com ([87.246.98.35]) by mx0b-001ae601.pphosted.com with ESMTP id 2p3qktq6uk-1; Wed, 05 Dec 2018 07:40:20 -0600 Received: from EX17.ad.cirrus.com (unknown [172.20.9.81]) by mail4.cirrus.com (Postfix) with ESMTP id 1FF10611C8B6; Wed, 5 Dec 2018 07:43:57 -0600 (CST) Received: from imbe.wolfsonmicro.main (198.61.95.81) by EX17.ad.cirrus.com (172.20.9.81) with Microsoft SMTP Server id 14.3.408.0; Wed, 5 Dec 2018 13:40:19 +0000 Received: from imbe.wolfsonmicro.main (imbe.wolfsonmicro.main [198.61.95.81]) by imbe.wolfsonmicro.main (8.14.4/8.14.4) with ESMTP id wB5DeGC0002184; Wed, 5 Dec 2018 13:40:16 GMT Date: Wed, 5 Dec 2018 13:40:16 +0000 From: Charles Keepax To: Linus Walleij CC: Paul Gortmaker , Lee Jones , "linux-kernel@vger.kernel.org" , Arnd Bergmann , Cory Maccarrone , David Dajun Chen , Dong Aisheng , Eric Miao , Graeme Gregory , Guennadi Liakhovetski , Haojian Zhuang , , Jorge Eduardo Candelaria , Laxman Dewangan , Mark Brown , Mattias NILSSON , Michael Hennerich , Mike Rapoport , ext Tony Lindgren , Venu Byravarasu , Linux-OMAP , , Support Opensource Subject: Re: [PATCH v2 00/22] mfd: demodularization of non-modular drivers Message-ID: <20181205134016.GE16508@imbe.wolfsonmicro.main> References: <1543811009-15112-1-git-send-email-paul.gortmaker@windriver.com> <20181205113535.GX16508@imbe.wolfsonmicro.main> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-12-10) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812050125 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 05, 2018 at 12:48:47PM +0100, Linus Walleij wrote: > On Wed, Dec 5, 2018 at 12:36 PM Charles Keepax > wrote: > > On Sun, Dec 02, 2018 at 11:23:07PM -0500, Paul Gortmaker wrote: > > > The solution to #4 is similar - we delete the ".remove" function and > > > the binding into the platform_driver struct. However, since the same > > > ".remove" function could also be triggered by an "unbind" (such as for > > > pass-through of a device to a guest instance) - so we also explicitly > > > disable any unbind for the driver. > > > > > > The unbind mask allows us to ensure we will see if there was some odd > > > corner case out there that was relying on it. Typically it would be a > > > multi-port ethernet card passing a port through to a guest, so a > > > sensible use case in MFD drivers seems highly unlikely. This same > > > solution has already been used in multiple other mainline subsystems. > > > > > > > I guess if this is a general direction thing, but it does seem > > that module unload is not the only reason one might ever unbind a > > driver. So are we sure we want to remove the option to unbind > > these drivers? Certainly for testing it is sometimes useful. > > I personally never understood why these attributes are even > present on non-modular drivers. > > If testing is about exercising unbind/bind to reintialize > the code through a new call to .probe(), why would the developer > not take it all the way through and make it a module? > It just looks like a half-measure. > Well I guess in someways it is a half-measure. I vaguely seem to remember some dependency nightmare that can make it really hard to have the MFD allowed as a module in some cases, I can't remember the exact details but probably why some of these are not modules. I certainly don't strongly object to removing the ability to unbind these drivers, just wanted to make sure everyone is aligned that it's a good thing to do. Does kinda remove a couple of debugging options (debugging things like drivers interfering with each other) and the last chance restart the driver and see if that helps rescue something. Thanks, Charles