Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5208955imm; Wed, 12 Sep 2018 02:44:28 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbdekm3uwvhAFhosO8B28GhteiOt/KcNfNn3zHdKtwb8EeIYGmwI6yQv/gllaZh5BpR//w5 X-Received: by 2002:a65:4b88:: with SMTP id t8-v6mr1219458pgq.239.1536745468750; Wed, 12 Sep 2018 02:44:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536745468; cv=none; d=google.com; s=arc-20160816; b=gbQD12bWaRwjqE/OHhJFqPt2V8WN97xDHdiUNjwOlexZpYOGSIzh/mRW35EjKGXKIM y8vkYkB+FnGPzKN1ySNkHCUOYw56UYzfGMy9o5YpwTzTwiG6K3RTlpxWFdjHF1UckaKv NKTOvCcaoWBmpFdjDlhjjqnqJS25D0YPW9kq3IJEDm2aAQxFEA1U+9TBc0oPQApq4BgG yFGT524mVs5AElej8Dvv2Xm7guu9wAgf/fGcJPajgMKbXVWIqanDaUEjzprMcmQ9uBJc 0msMrMh34gJM4RA0Spv12k4/n9zjnHnvSy38pMZr5j3/r9+wd18YDpYGUxyikccwLsjD frgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=PsVr4sMc5u1H6qyUpWjEGx4ml2cK+pL3vf4B6HBhpHo=; b=XQs+g5h6jqX6fbZ0twnKaClJ6TXc0dKHvT0LeaYi3ZT0g29ug0kTAmO+wCvsBZUKmo Kc+76wyKOqqh6l/qqpELOEErJhFUt3D/K7piH4F7cBgvJ+kLHqxjLaDttekB9ZWYc2gQ WlecsnEC+d0d1IrySSkqYCs9tgiwiVvexJSLQ3G8/qVBltrGiDm2uwB/mBDpPA0DzCLc AKfqcktwsin7w1n+Q8zcuXSJ50HKCjeNdHbwAXsscjLiWhXHhGIsUOFGYJ9EPEGKp6Yl 5lcV7x/bAAy+aMSINwQjwOO1KLz2p0uODccSkqTULVEvZ2RkGAV5UZO/qvMbSEqnSzPj W5pg== 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 23-v6si538494pgr.493.2018.09.12.02.44.13; Wed, 12 Sep 2018 02:44:28 -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 S1726672AbeILOrv (ORCPT + 99 others); Wed, 12 Sep 2018 10:47:51 -0400 Received: from mail-ua1-f65.google.com ([209.85.222.65]:43930 "EHLO mail-ua1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726359AbeILOrv (ORCPT ); Wed, 12 Sep 2018 10:47:51 -0400 Received: by mail-ua1-f65.google.com with SMTP id f4-v6so1159646uao.10; Wed, 12 Sep 2018 02:44:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PsVr4sMc5u1H6qyUpWjEGx4ml2cK+pL3vf4B6HBhpHo=; b=lgGYruThmR1HFaxUlbTnMt9/UMvW+9Ep7NE6zIirK6Biv7wxfRZc7j2G1JyP8eGNTQ yQFVqwy3Cj9URAM7SbnZ9H5PNTgA/rODE4SUQTvVF4QRHMmQsaR5SzUTIFkQZ9gqnpPM I01UtwgPNZ6Im3GFdcp8w3cSseGGG+37Gg4SxNfxr2pzPf0k1h5B9FF+DZbvQVdBADBm WyGmk8/SOKr6BSbKQyHf2NfV7qivryUkv84Ez3RJN/Bvxd3Zw72JE/lbBpQAD55Pg2Hg Oe7faa2jPfgK3VGj8Wuqi/0TvxW/GQkxgbMlGDU+ZzcA/mkqPtAShFbM/NLTL48BtGk9 yYtA== X-Gm-Message-State: APzg51DYcRJfSKTWzzdj4zicfh/h6NVTCy3wLfIG5I+5cvrdio3YCJBq jWXQItheqsKmIuWc1k0IAj2+8bG5dxjoX7njyFM= X-Received: by 2002:ab0:51ac:: with SMTP id g41-v6mr414037uaa.155.1536745445441; Wed, 12 Sep 2018 02:44:05 -0700 (PDT) MIME-Version: 1.0 References: <20180911093356.GE4185@dell> <20180911093917.GL2494@piout.net> <20180911153621.GP2494@piout.net> <20180911181838.GI4185@dell> <20180911185839.GA25212@piout.net> <20180911224418.GK4185@dell> <20180911225440.GL4185@dell> <20180912073355.GB2557@piout.net> <20180912084143.GN4185@dell> In-Reply-To: <20180912084143.GN4185@dell> From: Geert Uytterhoeven Date: Wed, 12 Sep 2018 11:43:53 +0200 Message-ID: Subject: Re: [PATCH v12 0/6] Driver for at91 usart in spi mode To: Lee Jones Cc: Alexandre Belloni , 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Lee, On Wed, Sep 12, 2018 at 10:41 AM Lee Jones wrote: > On Wed, 12 Sep 2018, Alexandre Belloni wrote: > > On 11/09/2018 23:54:40+0100, Lee Jones wrote: > > > > > http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-6438-32-bit-ARM926-Embedded-Microprocessor-SAM9G45_Datasheet.pdf > > > > > > > > > > USART doc starting p572, registers p621. > > > > > > After looking at the datasheet, I don't see any reason why one of the > > > two drivers can't be selected using different compatible strings. > > > > Because there is only one IP and we don't use the device tree to selecet > > linux specific drivers. > > We do it all the time. There are loads of MFDs (def: same IP, with > different functions) which have separate compatibles for their various > functions. If you wish this IP to operate as an SPI controller, it > should have an SPI compatible, if you wish it to operate as a U(S)ART, > then it should have a UART compatible. It's what we do for most of > the other MFDs in the kernel. There is a big difference: MFD functions are(more or less) independent functions, which can be used at the same time. It makes perfect sense for a single IP block that has both SPI and UART interfaces, that can be used at the same time. In this case, there is a single piece of hardware that can perform different functions, but not at the same time. Performing a different function means configuring the hardware for that function, hence using a different driver (from a different subsystem). Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds