Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5145151imm; Wed, 12 Sep 2018 01:37:26 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZL2Yl0Rb4d1E6Z2RgAp5u3itvYlSfx7xeLAfqRqjIBiZEZEbFMf8dz0YiWHWgAqPzp4EuC X-Received: by 2002:a65:668f:: with SMTP id b15-v6mr938614pgw.426.1536741446034; Wed, 12 Sep 2018 01:37:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536741446; cv=none; d=google.com; s=arc-20160816; b=Gu8KOAAW+tC0fU8WUBkK3xOQZDiyozG49E9wPR4+HrTXhcztyITr2r8FM1EGZbsw6B ucqtlrRE4DrWaScHOE1ETZUVP2GFUr+5xLvGmIHyyQR0/zHJNaIJ0KOhLOmL2Moz+fMg 6wonrg46oLJ0fL/38AzKrbXcjjOKO/PjAKtMcDh52Sqlx+XKDHtW5/mpqNqz7YbCedfU r075P1askWvmbx5FVgvGWaHOlOCO5uQSt0O5molTQV0jicYRQeNm3wUTJSgNvxwuiSUG cbSzuH5nu218v1UYb5fHBCJInNAKAK3cHcMLSR8UZlUbp5G3R80mPOz3OKd9umvkYzP3 w0SA== 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=Nkhl90VBzPRE+Sa/D/TLUPmqsk6jLZ4Z0SH8oazVW58=; b=fXpaQIRxS4T0bH8NaTRbtWHC/A2apvi1hWL1VLpxidP7DMVGcaSRVqfiTcKJG03jfL TQibbBOjOIca6sJ4d0/ZjXtp8UcYs3PJJ5m2cI7MzvptlK0Nou0JbvQ8udNJk9/pP8n3 16WGZqEMYYN8kp/2Dd99/cIVwJfpQO8IvSOBLA8b9KbcDNYOaTskdjYG2BBR/+CTZzXQ OVjTzIssLfJIM0QvIO2/DAxn0Eehu1xfgjuWgkOAPDprUpnIhNCmzYy2r7QphwNe7/B3 ikceYPWbphpKGjUTmjOC0fJLfWwdvFnrLVZ9/Sv7J5eHjt0EYZGWYJ5Uq72/+9ovWoja DIWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I3CMnAsQ; 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 t8-v6si346040plo.319.2018.09.12.01.37.10; Wed, 12 Sep 2018 01:37:25 -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=I3CMnAsQ; 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 S1727746AbeILNkP (ORCPT + 99 others); Wed, 12 Sep 2018 09:40:15 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:40153 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727693AbeILNkP (ORCPT ); Wed, 12 Sep 2018 09:40:15 -0400 Received: by mail-wm0-f68.google.com with SMTP id 207-v6so1375400wme.5 for ; Wed, 12 Sep 2018 01:36:45 -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=Nkhl90VBzPRE+Sa/D/TLUPmqsk6jLZ4Z0SH8oazVW58=; b=I3CMnAsQvlu1zX2MO+1liUXvmtBA5ELrDeEFTwfYb+XJkRBFUtVMpqbo0uxOuEaoOl nnPq0gfZwTovV1RCOs1i7ru+V7Qp/WarK6S8byxrlG+JkHP7gBjNimt9UBdpRCjnWv7l LQ1okXRCMQYR/zrAGH4HVYqlYhXgGa8mT9YWg= 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=Nkhl90VBzPRE+Sa/D/TLUPmqsk6jLZ4Z0SH8oazVW58=; b=ob3b10eUao6qd8/HVyTGCfzzJK5KUbpZ/vQ4LQBFemb0VPtXUjOKWpe7C+L09O/09Y pkYieQihRqHE94fKWLo+mVTEFpkXrhmkiAH8v52uDn+/6bvOTFxYh/2orjqtVyfDA/fy AvR6Ws/jo2beX8KS6/YKoQvacHEa4yrma2mKuKjqZqHuHbaEimycM2vGc2s5zyh6LpZG sYl7RLuH2LzPbiVuuSFQXdf6xG2zGEFAQkoSmwsdTU7HAZN/rDNngUMd1ktdeb7gnZHe ED5yy5FHdkcBvAdKwSLYZIN+rxIpCu5MtXQ27ETn8hpaHIir8hboUy5alvnOyxlJ4cxw u+Hg== X-Gm-Message-State: APzg51AGJyw6L4VQVZgBVRjFhthQKwrgJTIJtoH/73AP56mZ0kkZYYqg cnlMMz7suObjGe25xDavBmrRVX6FXs1GSBos X-Received: by 2002:a1c:168a:: with SMTP id 132-v6mr866877wmw.13.1536741404880; Wed, 12 Sep 2018 01:36:44 -0700 (PDT) Received: from dell ([89.238.177.251]) by smtp.gmail.com with ESMTPSA id 60-v6sm233718wre.82.2018.09.12.01.36.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Sep 2018 01:36:43 -0700 (PDT) Date: Wed, 12 Sep 2018 09:36:40 +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: <20180912083640.GM4185@dell> References: <20180904111310.4049-1-radu_nicolae.pirea@upb.ro> <20180911093356.GE4185@dell> <20180911093917.GL2494@piout.net> <20180911153621.GP2494@piout.net> <20180911181838.GI4185@dell> <20180911224302.GJ4185@dell> <20180912073056.GA2557@piout.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180912073056.GA2557@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 11/09/2018 23:43:02+0100, Lee Jones wrote: > > > I haven't read it, but I believe it's not unlike Renesas SCIF, which is > > > served by both drivers/tty/serial/sh-sci.c and drivers/spi/spi-sh-sci.c. > > > But the latter is not used from DT, so we haven't experienced (and solved) > > > the similar issue yet. > > > > > > Would it work if the UART driver and SPI driver would match against the > > > same compatible value, but the UART driver would do in its probe() > > > function: > > > > > > device_property_read_u32(&pdev->dev, "atmel,usart-mode", &opmode); > > > if (opmode != AT91_USART_MODE_SERIAL) > > > return ENODEV; > > > > > > while the SPI driver would do: > > > > > > device_property_read_u32(&pdev->dev, "atmel,usart-mode", &opmode); > > > if (opmode != AT91_USART_MODE_SPI) > > > return ENODEV; > > > > > > ? No MFD driver involved. > > > > I haven't looked at the code in a while, but if memory serves I > > believe platform code gives up once it has found its first match, so > > by doing this, one of the drivers will never be matched/probed. > > > > It's midnight here, so cracking out the datasheet isn't going to > > happen just now, but it's my current belief that if the IP serves 2 > > very different modes of operation, even if the registers are in a > > shared space, they could have their own compatible strings in DT. > > > > That is what the MFD driver provides after all. Why would it be okay > > to allocate different compatible strings from the MFD, but not in the > > Device Tree? > > > > It would be the easiest solution. > > > > Has Rob commented on this yet? > > V4 of the bindings were acked by Rob and you: > https://patchwork.kernel.org/patch/10428087/ We didn't Ack the bindings. We Acked the location change. I mean, has Rob specifically spoken out about using a compatible string for each function. -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog