From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757419AbcKBUzg (ORCPT ); Wed, 2 Nov 2016 16:55:36 -0400 Received: from mail-yw0-f182.google.com ([209.85.161.182]:36003 "EHLO mail-yw0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757360AbcKBUze (ORCPT ); Wed, 2 Nov 2016 16:55:34 -0400 Message-ID: <581A52C1.1010907@linaro.org> Date: Thu, 03 Nov 2016 04:55:29 +0800 From: Hanjun Guo User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Lukas Wunner , Hanjun Guo CC: "Rafael J. Wysocki" , Linux PM list , Greg Kroah-Hartman , Alan Stern , Linux Kernel Mailing List , Tomeu Vizoso , Mark Brown , Marek Szyprowski , Kevin Hilman , Ulf Hansson , "Luis R. Rodriguez" Subject: Re: [PATCH v5 0/5] Functional dependencies between devices References: <27296716.H9VWo8ShOm@vostro.rjw.lan> <13957403.ZrB4mMbICz@vostro.rjw.lan> <5811F0CF.5000204@huawei.com> <20161028093959.GA7889@wunner.de> In-Reply-To: <20161028093959.GA7889@wunner.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/28/2016 05:39 PM, Lukas Wunner wrote: > On Thu, Oct 27, 2016 at 08:19:27PM +0800, Hanjun Guo wrote: >> I'm trying to using this patch set to solve the functional dependency >> between devices and irqchip, which are both ACPI platform devices. >> irqchip needs to be probed before the devices connecting to them, >> which specifically, it's the mbi-gen support I send out recently: >> >> https://lkml.org/lkml/2016/10/25/453 >> >> But I didn't see an example to do so in this patch set, and seems that >> some extra code needs to be added for that purpose, could you give me >> some suggestions for how to do that then I can work on and test against >> your patch set? > > If the consumers can detect that there's a consumer on which they depend, > you could call device_link_add() from their ->probe hook. > > Generally the earliest point in time when device links can be added is > after device_initialize() has been called for the consumer and device_add() > has been called for the supplier. (At least that's my understanding.) Thank you, currently I'm on travailing and will take a deep look to see if it works (or adding things on top) on my case. Thanks Hanjun