Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5372714imm; Wed, 12 Sep 2018 05:14:54 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYAh0tU8AS94CMMEWfQwKbtg8NeVTKjFUHmQqp9JMhYH8Jy689THcUAs9pNslZbWPvzX9FA X-Received: by 2002:a17:902:6b89:: with SMTP id p9-v6mr1914615plk.272.1536754494645; Wed, 12 Sep 2018 05:14:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536754494; cv=none; d=google.com; s=arc-20160816; b=e5ZFS4tar940VWkj72T4zogb+oXKIfyHCuAYGwt2GfX+Bv1vZ1nZ2ZOXaZE3Arcqpa VLLGONrbtKYtNtCoPblqFvn/dpQmKk4yKHF5ZAaTs+1S6My+C1QgBnKmkDy4xvObbZUr qQu0yUaGttlK/7QEWGcKCJYnvjyRxmv81WQMYV435dqo6Qdd6Ie9yDLQwWAu4fFmC7nM 3JYlHwAcoHt10jGQQs7LW5N58aWlrm2bVDLC/JVoYkhGWqg1rHzAaW7FevIBEl+FzCWW 7zT+u4TlyhPC6EnpwGxeT8q3lWR02LA4jkHEPIOY2PSo2khsDfH+hyL4w/2JQIWCMYQj 7U3w== 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=Pu9VzCK5LJGYq3//j+LzDF4/snRtbxZx2UKzr1GFHAs=; b=hXbrkRD4Xg+oRb/vtLpzmafLGOXq2fL65VI++KT6+QvGbPmUt8Q+s0PCC/KIE7X5dG 98nmgTdKkgz43BjNXQWUbqbhrflXHQEL+6FCBlYhVL80LYWEBX4m1X1d8P6ytorbVuCq V2pSGIaf4qT6bmuT62Y9g9x6FxSzQF+RJmSHuuG0F3s/4nn7aaek4OcqZJW3jpOXsNnm 035Z08pwE4IyIwAw1tQpH74sENChbSr75QzqT5pRmi1NhS8NYFG9OmRiPK5mz8Cb+k9E XGcmDe0Mc6URyWWyoByDOvJ4fO0q8BA0xhy6PcaAVpjaZ0BDRhY3SOXTsJwhmKFPjbgB WW1Q== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x3-v6si869469pgo.542.2018.09.12.05.14.38; Wed, 12 Sep 2018 05:14:54 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726854AbeILRSs (ORCPT + 99 others); Wed, 12 Sep 2018 13:18:48 -0400 Received: from mail.bootlin.com ([62.4.15.54]:51303 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726359AbeILRSr (ORCPT ); Wed, 12 Sep 2018 13:18:47 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 0F4E320720; Wed, 12 Sep 2018 14:14:31 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (242.171.71.37.rev.sfr.net [37.71.171.242]) by mail.bootlin.com (Postfix) with ESMTPSA id D8364203DA; Wed, 12 Sep 2018 14:14:20 +0200 (CEST) Date: Wed, 12 Sep 2018 14:14:20 +0200 From: Alexandre Belloni To: Lee Jones Cc: Geert Uytterhoeven , radu_nicolae.pirea@upb.ro, Rob Herring , Mark Rutland , Nicolas Ferre , Greg KH , Mark Brown , Jiri Slaby , Richard Genoud , "David S. Miller" , Mauro Carvalho Chehab , Andrew Morton , Arnd Bergmann , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux ARM , Linux Kernel Mailing List , "open list:SERIAL DRIVERS" , linux-spi Subject: Re: [PATCH v12 0/6] Driver for at91 usart in spi mode Message-ID: <20180912121420.GE2760@piout.net> References: <20180911181838.GI4185@dell> <20180911185839.GA25212@piout.net> <20180911224418.GK4185@dell> <20180911225440.GL4185@dell> <20180912073355.GB2557@piout.net> <20180912084143.GN4185@dell> <20180912105407.GR4185@dell> <20180912111757.GC2760@piout.net> <20180912114352.GT4185@dell> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180912114352.GT4185@dell> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/09/2018 12:43:52+0100, Lee Jones wrote: > > > But ... we can't have it both ways. *Either* it's a true MFD, in > > > which case it can/should have 2 separate compatible strings which can > > > be specified directly from the DT. *Or* it's not an MFD. In the > > > latter case, which I think we're all agreeing on (else we'd have 2 > > > compatible strings), MFD is not the place to handle this (my original > > > point). > > > > > > > If that is what bothers you, then let's move it out of mfd. > > As I've already mentioned. I don't just want it moved out of MFD and > shoved somewhere else. My aim is to fix this properly. > If it is out of MFD, then I'm not sure why you would care too much about it as you won't be maintaining that code. And I still this what was done was correct but I'm open to test what you suggest. > > > So ... this is a USART device which can do SPI, right? > > > > > > My current thinking is that; as this is a USART device first & > > > foremost, the USART should be probed in the first instance regardless, > > > then if SPI mode is specified it (the USART driver) registers the SPI > > > platform driver (as MFD does currently) and exits gracefully, allowing > > > the SPI driver to take over. > > > > > > Spanner in the works: is it physically possible to change the mode at > > > run-time? :s > > > > Yes it is possible but on Linux that will not happen without probing > > the drivers again. > > Not sure I understand what you mean. > I was just commenting on changing the mode at runtime. > I'm suggesting that you use the same platform_* interfaces MFD uses to > register the SPI driver if SPI mode has been selected. Only do so > from the appropriate driver i.e. USART. > Yeah, I understood that but I didn't comment because I'm not sure this will work yet. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com