From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Subject: Re: [PATCH 5/8] video: vt8500: Add devicetree support for vt8500-fb and wm8505-fb Date: Wed, 08 Aug 2012 12:47:32 -0600 Message-ID: <5022B444.2020501@wwwdotorg.org> References: <1344389967-8465-1-git-send-email-linux@prisktech.co.nz> <1344389967-8465-6-git-send-email-linux@prisktech.co.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1344389967-8465-6-git-send-email-linux@prisktech.co.nz> Sender: linux-serial-owner@vger.kernel.org To: Tony Prisk Cc: vt8500-wm8505-linux-kernel@googlegroups.com, linux-fbdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-doc@vger.kernel.org, Russell King , rtc-linux@googlegroups.com, Florian Tobias Schandinat , Alan Stern , Eric Andersson , linux-serial@vger.kernel.org, Hauke Mehrtens , devicetree-discuss@lists.ozlabs.org, Rob Herring , Stephen Warren , Neil Zhang , linux-arm-kernel@lists.infradead.org, Alan Cox , Alessandro Zummo , Linus Walleij , Greg Kroah-Hartman , Mark Brown , linux-kernel@vger.kernel.org, Felipe Balbi List-Id: devicetree@vger.kernel.org On 08/07/2012 07:39 PM, Tony Prisk wrote: > Update vt8500-fb, wm8505-fb and wmt-ge-rops to support device > tree bindings. > Small change in wm8505-fb.c to support WM8650 framebuffer color > format. That might warrant a separate patch? > diff --git a/drivers/video/vt8500lcdfb.c b/drivers/video/vt8500lcdfb.c > + np = of_find_node_by_name(NULL, "display"); > + if (!np) { > + pr_err("%s: No display description in Device Tree\n", __func__); > + ret = -EINVAL; > + goto failed_free_res; > + } I believe that using hard-coded node names is frowned upon. Better would be to put a phandle into the display controller's node that points at the node representing the display, e.g.: fb@d800e400 { compatible = "via,vt8500-fb"; reg = <0xd800e400 0x400>; interrupts = <12>; via,display = <&display>; }; display: display { ... };