Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751680AbbEZS5C (ORCPT ); Tue, 26 May 2015 14:57:02 -0400 Received: from mail-ie0-f182.google.com ([209.85.223.182]:33107 "EHLO mail-ie0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751207AbbEZS47 (ORCPT ); Tue, 26 May 2015 14:56:59 -0400 Date: Tue, 26 May 2015 11:56:54 -0700 From: Dmitry Torokhov To: Tomeu Vizoso Cc: linux-arm-kernel@lists.infradead.org, =?iso-8859-1?Q?St=E9phane?= Marchesin , Thierry Reding , Alexander Holler , Grant Likely , Rob Herring , Mark Rutland , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 06/21] of/platform: Add of_platform_device_ensure() Message-ID: <20150526185654.GE10571@dtor-ws> References: <1432565608-26036-1-git-send-email-tomeu.vizoso@collabora.com> <1432565608-26036-7-git-send-email-tomeu.vizoso@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1432565608-26036-7-git-send-email-tomeu.vizoso@collabora.com> 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 Content-Length: 1453 Lines: 33 Hi Tomeu, On Mon, May 25, 2015 at 04:53:10PM +0200, Tomeu Vizoso wrote: > This function ensures that the device that encloses the passed device > node is registered, and thus probed if the corresponding driver has been > registered already. Even if the driver has already been registered this code will not guarantee that the device has been probed if driver enabled asynchronous probing (async probing should appear in 4.2 and the end goal is to have async probing enabled by default for most drivers). Also, why are we concentrating on platform drivers only? What about other devices, for example a gpio expander behind i2c bus? I am also concerned about adding OF-specific hooks into every subsystem out there. Can we make process of instantiating OF devices iterative instead and add them only if their parent has been already probed and also devices corresponding to all phandles they reference have also been probed? We could repeat scanning of the device tree every time we bind a driver and bulk-add leftovers at late_initcall time. This would mean that we could keep all logic in OF code (and maybe ACPI will add their own implementation) and keep other subsystems unaware. Thanks. -- Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/