Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5150534imm; Wed, 12 Sep 2018 01:43:34 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaiS7kQfwupitgGxGBMdWGL+PjbQIxkTj9sWRvr+cCzTaZwzhvrGUsNAG+IWcaPmXcAZdrx X-Received: by 2002:a62:2c53:: with SMTP id s80-v6mr985846pfs.154.1536741814767; Wed, 12 Sep 2018 01:43:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536741814; cv=none; d=google.com; s=arc-20160816; b=boIfRuuW5vzKkBAQvUSiX0YgMx+8xGnnKwLFWdt6PkRHRLtVf47Es7h00SDUmivnta yENvs8Au9MFJCYPae8feOoeZQkjQU+OdgMhOBK9d1ruw4nGchw5witMc5gZQjAYGH+jY Nl0i4mqAzWZ7whtAdUdxR6iaLLrMwfjuPu+zETdXMGAEThVXPyJObKdh/wH4tHitkxs5 YEdc8ryHIeShAmxPHxayHhHZG9KcaAFhepgz8lBCBVVjlPrUF9yK32NU7xV4u/MLJY/m EiT8fyKNwL8s2Z2Qp+B2+WqLnu3gQTvWmvoe1+nGkopjFE7BGin36XHyslopDUTaQ7HN WV9A== 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=cdzXHeIFeBzs41NLH9B+3flVQODuHYwCbb1mrqSVS24=; b=DTvC4ReggUGUUXWF3NDrFIk27i50OOlc+Lgv66hDgkpdsnK6SWERM3EWqkH+fn81qk myWsA46BKLsbqb/FLS+kB6TZqJCkyFRIvu2IzLNxMBE3FTPePmkTYns4QjbRudcvq00I f5TKSWNOptQjLu4ejBZkg2zuK9+0ed84UhcA+JHSR918+VsAnUYfsqhxt7+fAG/METXM Qjl1rZHllt+CVB/b0jjrKXc3nLaPTI6IFv3+yA+ZwUtlvZFCckDAVdy2ioc7JLmJT1gy gqa9doGPLenUVlrk84NDT6J3ZuioiElv8QzayGqUnptvlBY0QPZdlZJk5m24qBFTuqBd g3yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MAEn5N8v; 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 y3-v6si406506pgg.266.2018.09.12.01.43.20; Wed, 12 Sep 2018 01:43:34 -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=MAEn5N8v; 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 S1727739AbeILNpT (ORCPT + 99 others); Wed, 12 Sep 2018 09:45:19 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:37072 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726502AbeILNpS (ORCPT ); Wed, 12 Sep 2018 09:45:18 -0400 Received: by mail-wr1-f67.google.com with SMTP id u12-v6so1085517wrr.4 for ; Wed, 12 Sep 2018 01:41:47 -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=cdzXHeIFeBzs41NLH9B+3flVQODuHYwCbb1mrqSVS24=; b=MAEn5N8vJSJMOKNGUDQ/fuHs11uLucbW91K2SVIr9q8XUpIAVgLy59kwJ+h8y+UYSp oadZpD9yQdFmkLuePLivBd2JWe7JZTseG+MQprowtXVilF8Co4pYrucn5Bfj5JumkM/B bbpcoiNW8ra98W1dbSBsqFANVUJjp8ot0CXd4= 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=cdzXHeIFeBzs41NLH9B+3flVQODuHYwCbb1mrqSVS24=; b=dqTT9tHehMWAVDl6Q2JmNJ0cnljiRnstPOTJbVI+WdBnXOekeZjj0uRPZqMHjsmKNx cIpd1iIjuqyQ24fH0vLFB6YG0rrZ3x3EHHmFEbXV8nj8KIJC1FTuKp0Curl5RGANRkKL rCWLlyHHjmKV+bKmL000e8x2mzhio2kl5nSZqaQJQMfhgSGV7K2YLGik126E+2ArEq3K 6saWnO8b1VyrILvqqM4qu4tucpgbTKr3Z/GvJw7dt1AueR/OkRUulJaOQ6lpqfilcsmO buyBlgfj3+Nf3Xy9nH9K/IAgUSb+Za/PW7gocLmguHBMz9D1hDq2g8QIlscDShZ9eBNZ p2bw== X-Gm-Message-State: APzg51AfnAx8BfvqhfiIn/sd0TEoWJ1MX3UkvvUE+JsZFNVaVu2kIDr5 BJV+saSrxMO8ic5+oA0pKOhxZw== X-Received: by 2002:adf:f1cc:: with SMTP id z12-v6mr654025wro.214.1536741706618; Wed, 12 Sep 2018 01:41:46 -0700 (PDT) Received: from dell ([89.238.177.251]) by smtp.gmail.com with ESMTPSA id 94-v6sm657763wrc.10.2018.09.12.01.41.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Sep 2018 01:41:45 -0700 (PDT) Date: Wed, 12 Sep 2018 09:41:43 +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: <20180912084143.GN4185@dell> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180912073355.GB2557@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: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. > If you are not happy having that in MFD, I guess we can move it out > somewhere else. My issue isn't pertaining to where the hack lives, it's that there is a hack in the first place. -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog