[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAObsKCBRPLDLztJE4up45KWB+T86td7-wuskBN-iaEdvnacDA@mail.gmail.com>
Date: Thu, 7 Jan 2016 15:55:43 +0100
From: Tomeu Vizoso <tomeu.vizoso@...labora.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>,
Linux PM list <linux-pm@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Alan Stern <stern@...land.harvard.edu>,
Grant Likely <grant.likely@...aro.org>,
Mark Brown <broonie@...nel.og>, Rob Herring <robh@...nel.org>,
Thierry Reding <treding@...dia.com>,
Dmitry Torokhov <dtor@...gle.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Michael Turquette <mturquette@...libre.com>
Subject: Re: [RFD] Functional dependencies between devices
On 30 October 2015 at 23:52, Greg Kroah-Hartman
<gregkh@...uxfoundation.org> wrote:
> On Tue, Oct 27, 2015 at 04:24:14PM +0100, Rafael J. Wysocki wrote:
>> My idea is to represent a supplier-consumer dependency between devices (or
>> more precisely between device+driver combos) as a "link" object containing
>> pointers to the devices in question, a list node for each of them and some
>> additional information related to the management of those objects, ie.
>> something like:
>>
>> struct device_link {
>> struct device *supplier;
>> struct list_head supplier_node;
>> struct device *consumer;
>> struct list_head consumer_node;
>> <flags, status etc>
>> };
>>
>> In general, there will be two lists of those things per device, one list
>> of links to consumers and one list of links to suppliers.
>>
>> In that picture, links will be created by calling, say:
>>
>> int device_add_link(struct device *me, struct device *my_supplier, unsigned int flags);
>
> At first glance, I like this, nice. Now to see how well it can be
> implemented :)
Hi Greg,
what's your opinion on using this to order device probes so we don't
try to probe a device that we know it has unfulfilled dependencies?
Regards,
Tomeu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists