Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5446233imm; Wed, 12 Sep 2018 06:13:50 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY2jJmtFy9jAK10yDOYOW6Lp0LXq7e4GEUwp+e75z41Tp6ocTPCGmhaU1mGqFRHQ5DHvNT4 X-Received: by 2002:a62:455b:: with SMTP id s88-v6mr2257491pfa.203.1536758030696; Wed, 12 Sep 2018 06:13:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536758030; cv=none; d=google.com; s=arc-20160816; b=AVxpGttxk8sfOO/3c5/4xAxarCf+Gh9QCEYq4V9bnU4Vt/epcJKXK1pz7hvXKZU8aS hanMEqzlxDdOgJADfgAklD8qznxN89Fz7+bS0SV2ICAN8WuHIJqjpE3QFv6DKTWI057s ZwbCXfAn+2iKaVaXSY++Pb7Qp62xxGuz7PpgJGX3nn16SPm91LCppynJZfsxXXRTa6Ym Nn9+1c4VAa6o1yDB4uSUCW268lFkcJURfbsKe+dlORFSLr+66RXyIWZ4Mej9pQY7Talz 88ESO8yrDiX/ujqU/2RL1kfDnFiMmDOzzanv/ROASABm6sE3ZCXkPWZHRCNYrFzyIj7F MDvQ== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=U/KG1JqYn2ylXof+E4+9R1BS3i1AuvaO2suqKU/UYqI=; b=s5ZAEJ3rb17jAY52EJOsMYLCjjvuF4IOqOLK3T0aTyLmZl8bS1fnLDlhcpQrM2RlpE 1vxpwMXnD1prGtsNpI7ED1M8yC80M+BbOAge4HHFvluv7fnuF5bB3YnRp4TgHfZrkq1N EnwKjzel6JkD/DYVf1xMDTkl5PuFMjgyfZQCe8C+M/p3LoZjNlIr/E03X4ipvGp71dfy u3qD39/sbXPyM2ymvVGQa2fSpxJaUFf90u0Q22YdjxFmkmefHYGZF+bpHbnu10uuA436 zejDFG9DXaYTN+9ouN6kj0veROly1zNnvXjzy+fbSjUzwwQoJD5cfkUObB9sjniZZ+mg dZZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DQh0bilK; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l7-v6si1073431pgm.677.2018.09.12.06.13.27; Wed, 12 Sep 2018 06:13:50 -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; dkim=pass header.i=@linaro.org header.s=google header.b=DQh0bilK; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727051AbeILSR1 (ORCPT + 99 others); Wed, 12 Sep 2018 14:17:27 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:37679 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbeILSR1 (ORCPT ); Wed, 12 Sep 2018 14:17:27 -0400 Received: by mail-wr1-f66.google.com with SMTP id u12-v6so1995543wrr.4 for ; Wed, 12 Sep 2018 06:12:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=U/KG1JqYn2ylXof+E4+9R1BS3i1AuvaO2suqKU/UYqI=; b=DQh0bilKVmVWj4SFLvQfzBRB1Iu3qzMNs+AXiMFn89z5VRwNpnVwA8wXd9VllxCi6O d0Sc6SHfb5Ugt3Ki82lC4pAa5jj+hkUic006naLTDqPRbqft+ycCa2lDQaQ+90QBFG58 GghhKsA6qgjaZxmSnkfvGmCGXQhXLg4TldC84= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=U/KG1JqYn2ylXof+E4+9R1BS3i1AuvaO2suqKU/UYqI=; b=TvynodLx50EJFCYwdEraPjXBHaDdF0JPGBzrBiArZCMXk1I9GJD6DxNg81Gz+7za4y FDFcR7EW/tkZWQeSw+DHHhnSJo0KqvHJH/87jh4FCfH3tMYcDN1JvISHrthf+EP5EZ+g FD1WH5x7kEAKB8Dh5wzNrJJmb1isd7KuDRmaw6OZeJ4kOSAS7SSlPxpPayB3SCH5ex/6 GE/CAPaCPH7hhmBb6D02N3d7iQMdR3C+qLj/j7wvDdn5OtkVjX13XjgcVqf2olLGHM8t 38VHnAl3Rn8/KNyYDuE2BALV4eGcpt5V4I5pMpuDq3cqPFg/uiSp9Uc/A9jKB62pMRn/ 73Nw== X-Gm-Message-State: APzg51AZ17zYAhZMvpgVzbRzOITajOixMSmOnNHYhed7/iotNpxmJtJS dl544kpc2v2n8a3PL51OrrMrJQ== X-Received: by 2002:adf:a964:: with SMTP id u91-v6mr1607246wrc.140.1536757977793; Wed, 12 Sep 2018 06:12:57 -0700 (PDT) Received: from dell ([2.27.167.7]) by smtp.gmail.com with ESMTPSA id m68-v6sm2608406wmb.10.2018.09.12.06.12.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Sep 2018 06:12:56 -0700 (PDT) Date: Wed, 12 Sep 2018 14:12:48 +0100 From: Lee Jones To: Alexandre Belloni 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: <20180912131248.GA21544@dell> References: <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> <20180912121420.GE2760@piout.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180912121420.GE2760@piout.net> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 12 Sep 2018, Alexandre Belloni wrote: > 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. I care for the kernel in general, not just the areas I'm responsible for. I guess I'm just that kinda guy! ;) > > > > 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. Oh I see. My question was relating to whether the H/W is physically capable of changing modes on-the-fly, rather than how Linux would handle that. If this is something we'd wish to support, then it would have to be a single driver, which is why I was asking. By separating the drivers this way, we are blocking that as a possibility. Although I guess the OP has already thought about that and made the decision not to support it. > > 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. Other drivers already do this. -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog