From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans de Goede Date: Thu, 22 Jan 2015 20:43:56 +0100 Subject: [U-Boot] [PATCH v2 2/2] sunxi: video: Add support for Hitachi tx18d42vm LVDS LCD panels In-Reply-To: <20150122183720.60c5e906@crub> References: <1421762882-14066-1-git-send-email-hdegoede@redhat.com> <1421762882-14066-3-git-send-email-hdegoede@redhat.com> <20150122183720.60c5e906@crub> Message-ID: <54C152FC.1050706@redhat.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On 22-01-15 18:37, Anatolij Gustschin wrote: > On Tue, 20 Jan 2015 15:08:02 +0100 > Hans de Goede wrote: > ... >> @@ -976,6 +977,14 @@ static int sunxi_ssd2828_init(const struct ctfb_res_modes *mode) >> } >> #endif /* CONFIG_VIDEO_LCD_SSD2828 */ >> >> +#ifdef CONFIG_VIDEO_LCD_HITACHI_TX18D42VM >> +static void sunxi_hitachi_tx18d42vm_init(void) >> +{ >> + mdelay(50); /* Wait for lcd controller power on */ >> + hitachi_tx18d42vm_init(); >> +} >> +#endif > > Could you please test if > > #if IS_ENABLED(CONFIG_VIDEO_LCD_HITACHI_TX18D42VM) > > #endif > > works here around sunxi_hitachi_tx18d42vm_init() definition ? > > Now with Kconfig it should. I'd prefer this variant instead > of #ifdef. That won't work because then there will be no prototype declared for sunxi_hitachi_tx18d42vm_init(). > > ... >> @@ -1004,6 +1013,9 @@ static void sunxi_mode_set(const struct ctfb_res_modes *mode, >> break; >> case sunxi_monitor_lcd: >> sunxi_lcdc_panel_enable(); >> +#ifdef CONFIG_VIDEO_LCD_HITACHI_TX18D42VM >> + sunxi_hitachi_tx18d42vm_init(); >> +#endif > > And here, please try to use > > if (IS_ENABLED(CONFIG_VIDEO_LCD_HITACHI_TX18D42VM)) > sunxi_hitachi_tx18d42vm_init(); So I've changed this into: + if (IS_ENABLED(CONFIG_VIDEO_LCD_HITACHI_TX18D42VM)) { + mdelay(50); /* Wait for lcd controller power on */ + hitachi_tx18d42vm_init(); + } instead and completely dropped the sunxi wrapper around hitachi_tx18d42vm_init() this way the initialization flow is more clear too as an added bonus. I'll give this version a test spin and then send a v3. Thanks & Regards, Hans