From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Likely Subject: Re: [PATCH 1/4] OF: Add helper for matching against linux, stdout-path Date: Thu, 22 Nov 2012 15:31:52 +0000 Message-ID: <20121122153152.2B9CB3E129E@localhost> References: <20121121155312.GX4398@game.jcrosoft.org> <1353513428-25697-1-git-send-email-plagnioj@jcrosoft.com> <20121122054138.GY4398@game.jcrosoft.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20121122054138.GY4398-RQcB7r2h9QmfDR2tN2SG5Ni2O/JbrIOy@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: Jean-Christophe PLAGNIOL-VILLARD Cc: "linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Greg Kroah-Hartman , devicetree-discuss , Sascha Hauer , Sascha Hauer , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , Alan Cox List-Id: devicetree@vger.kernel.org On Thu, 22 Nov 2012 06:41:38 +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > On 18:03 Wed 21 Nov , Grant Likely wrote: > > On Wed, Nov 21, 2012 at 3:57 PM, Jean-Christophe PLAGNIOL-VILLARD > > wrote: > > > From: Sascha Hauer > > > > > > devicetrees may have a linux,stdout-path or stdout-path property > > > in the chosen node describing the console device. This adds a helper > > > function to match a device against this property and retrieve the options > > > so a driver can call add_preferred_console for a matching device. > > > > NIce. Looks like the right behaviour, but is a little inefficient. > > Since the stdout property doesn't change this code could be called > > once right after the tree is unflattened and then cache the pointer to > > the node anarguments. Can you add the code to of_alias_scan()? > do we assume that we can have only one stdout-path? > > I think we could have more serial, framebuffer console Nope. stdout-path as currently defined is only one device. Someone would need to propose an extension for multiple stdout's before I'd bother trying to support that. g.