Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp348079pxb; Wed, 18 Nov 2020 06:12:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJwGBRRIwi+Sos4Psc5krmKoIYTyVKCyhzb/R+h9Nm6H0xn1+jEFborDRoluFKKOJfRuPrae X-Received: by 2002:a17:906:580e:: with SMTP id m14mr23115757ejq.237.1605708766463; Wed, 18 Nov 2020 06:12:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605708766; cv=none; d=google.com; s=arc-20160816; b=VEzsjgiK533sttyv8A9dnuAF2+dk8TXfvytgqGm/v1XP67s1rgIH7J9y0Ex4pXkbJI cXbQjp1vVvByB571DunfVh1S2LHHnS15zuBZDAkA+6toHg1/gD+bJvurCvFe8lLFt/OC nbH1vVXB6Aix13J7mzob7Wrtmh/ULdFI/tNdejsjzcTV2Nbt8xO8vYnRkjQSJwojuhCR b50VlARwQbIQmw8VgsEOYapTu9dDHhJnrWfL0J6JeZ+jlKgD96vnkzmu6selQxRDpL/a TbX5ZOGBweXxYVlul+qlsRrFrzSXtqBiax3vs1Ww828lG+rBk0uZUouaW6K/MP96jx6D eARw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=wJyOa7T7ghw8FOCD7piwWUUmbc4S4QtQSF5ff8UA/Pc=; b=eXGElDZqVL/dvfw9J7pzzDE2ON1IoEw4t+0WYAb+fIfDWI/id/ny0K1LLwe0GIaenC wM1IHGXZxPDUl6Wxj+BVd9LF350zjDTi4Y1/NZuFhN/dtLtOgRdbg82mOnzDdsR432bj s89YJfC8g02QfiKUA1LE4nVicIjYlGl44pGwBLUFASWqGM+FQUEMj+c0WNsGtVbEiijp AkwqSkB72G1SbwbFSpp6AwJbC9u8XKc3YafTu0tr0liNph/o1a8deGJv3pF/6cYRDuQl QlkHIrHyH0s1VWEHN0FpszajnUSpEPjVDpvYxNFteiKZ0nSYKyCp5vUpRg+8lbtDZPh2 DGCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g16si5532139eds.167.2020.11.18.06.12.23; Wed, 18 Nov 2020 06:12:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726433AbgKROKs convert rfc822-to-8bit (ORCPT + 99 others); Wed, 18 Nov 2020 09:10:48 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:47025 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726216AbgKROKr (ORCPT ); Wed, 18 Nov 2020 09:10:47 -0500 Received: by mail-ed1-f65.google.com with SMTP id t11so2096960edj.13; Wed, 18 Nov 2020 06:10:46 -0800 (PST) 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; bh=dCaejjvBRfN9D5+bG0Al83hd61GejEfm84KJfE/0UCg=; b=Mw3hX1vlT6r5adqhgBM4Xv98OiHIY8Wsb+mr4I3UBPNM5eOfw2Uv0+VowR1u9Dzm0V VC7GPf9DVa5bcPLKJiy3KgdLMz7mhi9/QT611wou7zU66FgwC2NGiotSdCc8Kfj8Ifyd MIycLCHWvrJ+0HZwXlWNU/rASITXI9PschqOSUQRcqX6EplSgD1YGUJcD7POPSBNJiHY 2t4XlITpppVySZegSrl7wt8uVfBOSnQm4BtQ1GKQX77seUntXUjmlx4QqMSBi7hsaTlP 9T4BlBv7rEPvOL0uOfbgkwgujixV0fFowMQEq7Y569MJFv85x4D4HYvpjegm2ZThn7gn cT+w== X-Gm-Message-State: AOAM530JqV5/8K1u5IoKzpX8USZOJm5QHD1xCdw4Su9q6VaWmDKcqOQX PidpuovqApUVKG6d/d4LYLA= X-Received: by 2002:aa7:cc0e:: with SMTP id q14mr26071520edt.181.1605708645493; Wed, 18 Nov 2020 06:10:45 -0800 (PST) Received: from kozik-lap (adsl-84-226-167-205.adslplus.ch. [84.226.167.205]) by smtp.googlemail.com with ESMTPSA id i3sm1047604ejh.80.2020.11.18.06.10.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Nov 2020 06:10:44 -0800 (PST) Date: Wed, 18 Nov 2020 15:10:42 +0100 From: Krzysztof Kozlowski To: Alice Guo Cc: "robh+dt@kernel.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , dl-linux-imx , Peng Fan , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [EXT] Re: [PATCH v3 4/4] soc: imx8m: change to use platform driver Message-ID: <20201118141042.GA34654@kozik-lap> References: <20201113110409.13546-1-alice.guo@nxp.com> <20201113110409.13546-4-alice.guo@nxp.com> <20201114164128.GD14989@kozik-lap> <20201116161338.GB25108@kozik-lap> <20201118104226.GA23766@kozik-lap> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 18, 2020 at 02:07:41PM +0000, Alice Guo wrote: > > > > -----Original Message----- > > From: Krzysztof Kozlowski > > Sent: 2020年11月18日 18:42 > > To: Alice Guo > > Cc: robh+dt@kernel.org; shawnguo@kernel.org; s.hauer@pengutronix.de; > > dl-linux-imx ; Peng Fan ; > > devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; > > linux-arm-kernel@lists.infradead.org > > Subject: Re: [EXT] Re: [PATCH v3 4/4] soc: imx8m: change to use platform > > driver > > > > Caution: EXT Email > > > > On Wed, Nov 18, 2020 at 10:28:47AM +0000, Alice Guo wrote: > > > > > > > If it is properly explained and there is no other way then yes, you > > > > could. Here, for old DTBs, I would prefer to use > > > > of_platform_device_create() and bind to "soc" node (child of root). > > > > This way you would always have device and exactly one entry point > > > > for the probe. > > > > > > > > > > static struct platform_driver imx8_soc_init_driver = { > > > .probe = imx8_soc_init_probe, > > > .driver = { > > > .name = "soc@0", > > > }, > > > }; > > > Can I use "soc@0" to match this driver? It will not use > > > of_platform_device_create(). It will use of_find_property() to > > > determine whether and nvmem-cells can be used. If there is no nvmem-cells, > > it will use the old way, which supports old DTBS. There is no need to add new > > compatible. > > > > No, the soc@0 is not a proper name for the driver. > > I have no good idea, please give suggestion. Should I still add new compatible? > Should I still keep device_initcall? If use of_platform_device_create(), which > node should I use? I mentioned my idea in the email before - of_platform_device_create() to bind to the soc node. This will have to be in the initcall, you don't have a choice to avoid it, since there was no compatible before. Best regards, Krzysztof