From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946847AbdEAGCD (ORCPT ); Mon, 1 May 2017 02:02:03 -0400 Received: from mga07.intel.com ([134.134.136.100]:11965 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1166083AbdEAGCC (ORCPT ); Mon, 1 May 2017 02:02:02 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,399,1488873600"; d="scan'208";a="80958284" Date: Mon, 1 May 2017 11:33:53 +0530 From: Vinod Koul To: Pierre Yves MORDRET Cc: "M'boumba Cedric Madianga" , "mark.rutland@arm.com" , "devicetree@vger.kernel.org" , Alexandre TORGUE , "linux-kernel@vger.kernel.org" , "robh+dt@kernel.org" , "mcoquelin.stm32@gmail.com" , "dmaengine@vger.kernel.org" , "dan.j.williams@intel.com" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH 2/5] dmaengine: Add STM32 DMAMUX driver Message-ID: <20170501060353.GO6263@localhost> References: <1489414561-28912-1-git-send-email-cedric.madianga@gmail.com> <1489414561-28912-3-git-send-email-cedric.madianga@gmail.com> <20170406064046.GF4094@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 26, 2017 at 09:17:37AM +0000, Pierre Yves MORDRET wrote: > >> + > >> + ret = of_property_read_u32(node, "dma-channels", > >> + &dmamux->dmamux_channels); > > > > can we have property_xxx calls alone, that way driver is not strictly > > dependent on of > > Can you please explain what you are asking for ? Not sure to understand > correctly. Use device_property_read_u32() which is a generic property API. > >> +static int __init stm32_dmamux_init(void) > >> +{ > >> + return platform_driver_register(&stm32_dmamux_driver); > >> +} > >> +arch_initcall(stm32_dmamux_init); > > > > why not module init, wouldnt defer probe solve the dependencies > > > > The reason behind many devices (device_initcall level) rely on DMAs. If > init is deferred DMAMUX driver will be probed twice if dependents rely > on it. This sounds not a good call. This explains arch_initcall level. Why not deferred probe was introduced to help with dependencies... -- ~Vinod