Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1693982imj; Thu, 14 Feb 2019 10:25:44 -0800 (PST) X-Google-Smtp-Source: AHgI3IaY3xFLzBte+jVjuinJQbGeaQN0RsZcWGmS3A2A6LwBIC2mVlmR10qAMscb1gJlq814dK2d X-Received: by 2002:a17:902:aa07:: with SMTP id be7mr5575187plb.63.1550168744262; Thu, 14 Feb 2019 10:25:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550168744; cv=none; d=google.com; s=arc-20160816; b=ZSHThHMgDAyBVry5HIxcS86P3ml43HHdsa8CF2W8UtmaYBJsA9mD6YfpQOYT7pyd53 eN8iU1+w5+sZhUa7NyOPhiOJxNOjdUaSIE5ddWV0aoTYxQsYdT+/8S4ZKI7pTlgXZb9N ETsB2HOLgmRaAbwEUMOSFuM5YCzjmF6PfKKjLcDiVQ9NUGW4qBGvqoogiuy5dh7Seq8T BSWlTu+mf4rZWCHbeRk2FpvEdzfI0LHvHxNEXiK7vs140DPB9+OUGMVSspgOebg3XWZ2 4i6vxrJZCnxXiSvYGnWp013PitOHctadPjiap1fnVp/ylSZ3E7/1i5NfoqOxIGn+qh3R v6VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:references:cc:to:subject:dkim-signature; bh=8MGEOkp3CKKQ4Y/lKtdp9ntcnCekqC3jqFbG8lyNeDw=; b=jFGon50FVuM+kFB3lAOE48nDTQJ5ltFms1lscBtR6i9xtHZijnhMrpPNNLIhqUVWz7 eEX2Xz4yFrvPGPK+YVVJjFfLNFphMzNEM/hglNBQKZnGBmM+2FMKhPirtZUS9r6Pfywc XK8mPxlVxHpRBTAOU7hER4J8eskLBCUi4m5MxYvmP27ZcV65bPe0SSe9cmSJCUCc2k3i mLr8W4lr+x2y/r53B5tkWCvzcYdhrVDKojFWIRXuULMJcSZBmV8F2A8FmSx+yKZYSHTB wCJqAgQuX+IvtmTNb2t/wzHcc+pRcLCz5WVAsscRxrD/EbsywOeSVD/n28Dyeq4H64Zl GfAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BDjnHQu8; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e3si3126806pfe.203.2019.02.14.10.25.28; Thu, 14 Feb 2019 10:25:44 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=BDjnHQu8; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406756AbfBNKwa (ORCPT + 99 others); Thu, 14 Feb 2019 05:52:30 -0500 Received: from mail-wr1-f49.google.com ([209.85.221.49]:34429 "EHLO mail-wr1-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387932AbfBNKw3 (ORCPT ); Thu, 14 Feb 2019 05:52:29 -0500 Received: by mail-wr1-f49.google.com with SMTP id f14so5975013wrg.1; Thu, 14 Feb 2019 02:52:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:openpgp:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=8MGEOkp3CKKQ4Y/lKtdp9ntcnCekqC3jqFbG8lyNeDw=; b=BDjnHQu85ptFY5yKeuQOCo3cJXhqHvpvIpRt44A67SbAn6Xj+QiqQ/8Fh5hWzRgW4B kJIfu0Dnd4mBMJxSWOEzOqGcpkbDFWnm7QyBd9t17Bl2mT7D1RL4S6YAYJAEp4PUujtl aoIhrAiDUyn25pV/YldSvVlpEg1UbSFJemILWEFN4JNcA3oco0FLsiEaAaqpH62TDpUe qoK1rIAWqplWdVVw82S2zaq7C/Fc7R/cyjnlAVHRlVwBgMx5vVcjlqoUUmSkymPzIVsq cz5ckLlZxR6NV/AWDAsYrENew/dinTauA7fIUOPwhViBohXMMT/NGmu7l+xhlAyRIH/t SWLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8MGEOkp3CKKQ4Y/lKtdp9ntcnCekqC3jqFbG8lyNeDw=; b=hHHWMWmXE1PgvV0EITXnfePCkbbUlIeEPpk+2yo7LFUSqF2OUviLRzSCMsEmyW4eXz sQ5DQ0Aeu990WwjnXow9qMtS5yiE6qShUQFRQAy5CcWMi92Y2IYw4j/I+L0uv+hS6yuH +VPFc1hIy2CqgonE5FoR0OH8CPOaBNE52vRFmLZuKGUFSe4NU0ft3RdL0jYQWaYRvB5M oNslxJCrZ3dXlca5JT4K78SVSbpmktdP5xNao1NPaDz2Z/2pENtvkk2k5E+B0C0Barlo jvNCjJQFS8ReXHmxf8x2aXbQdcF0eCtMVpBK5t9ZJ+ZM1gyb69438u9svtlOSlkymPHt +hug== X-Gm-Message-State: AHQUAuYYLD+sLbWCPHfkTPyyVP84uwD87jl7S818fPRtlOGmSWQOFSn6 JTyBStSo9TOc1Scov5eq1AlYphK8 X-Received: by 2002:a5d:550f:: with SMTP id b15mr2445223wrv.251.1550141547144; Thu, 14 Feb 2019 02:52:27 -0800 (PST) Received: from [192.168.1.4] (ip-86-49-110-70.net.upcbroadband.cz. [86.49.110.70]) by smtp.gmail.com with ESMTPSA id z16sm1105342wrr.66.2019.02.14.02.52.25 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 14 Feb 2019 02:52:26 -0800 (PST) Subject: Re: Applied "spi: Add Renesas R-Car Gen3 RPC-IF SPI controller driver" to the spi tree To: masonccyang@mxic.com.tw, Mark Brown Cc: bbrezillon@kernel.org, Geert Uytterhoeven , Simon Horman , juliensu@mxic.com.tw, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-spi@vger.kernel.org, Sergei Shtylyov , zhengxunli@mxic.com.tw References: <20190212142236.2807D1128113@debutante.sirena.org.uk> <4f91497a-96ee-4c10-436f-4d011edb3834@gmail.com> <20190212144359.GD20635@sirena.org.uk> <20190212164940.GI20635@sirena.org.uk> <20190213121635.GD7540@sirena.org.uk> From: Marek Vasut Openpgp: preference=signencrypt Message-ID: <0f26ffa5-e517-742f-ebd3-0093eda27145@gmail.com> Date: Thu, 14 Feb 2019 11:52:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=big5 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/14/19 10:12 AM, masonccyang@mxic.com.tw wrote: > Hi, Hi, >> "Marek Vasut" >> 2019/02/13 ?U?? 08:37 >> >> On 2/13/19 1:16 PM, Mark Brown wrote: >> > On Wed, Feb 13, 2019 at 04:25:32PM +0800, masonccyang@mxic.com.tw wrote: >> > >> >> From current mainline branch, MFD seems support the device which is on >> >> the same hardware bus(i.e, I2C, SPI, MMIO and SPMI)for multi-function >> >> by Read/Write the common same registers. >> > >> > That's most MFDs but there are some that do some level of enumeration >> > (even if it's just looking at the device ID that got registered) to >> > decide what subdevices get registered, that's what people are suggesting >> > here I think. >> >> Right. Although I think some of the code could be shared between the SPI >> and HF modes. > > If it is right that MFD is based on the same hardware bus for multi > function > device,i.e,. based on SPI/I2C/PCI bus to register device by > mfd_add_devices(). > > For a multi function device works on different hardware bus, it has nothing > to do with mfd-core.c(MFD framework) even though their driver are in > drivers/mfd directory, i.e,. mcp-core.x, sm501.c. > > Since RPC-IF works on different hardware bus for SPI bus or CFI > HyperFlash bus, > is it a good idea to implement MFD framework for RPC-IF ? > Or we just separate RPC-IF driver by spi mode and cfi mode ? > > any comments/opinions on RPC-IF/MFD-framework is welcome! Mark mentioned it before, you can use the MFD for MMIO too. The goal here is to have some common code which is shared by the SPI and HF part of the driver, and then a separate SPI handling code and HF handling code. The common code should determine which part to activate based on the DT. -- Best regards, Marek Vasut