public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] sunxi: video: Add support for Hitachi tx18d42vm LCD panels
Date: Thu, 08 Jan 2015 09:39:35 +0100	[thread overview]
Message-ID: <54AE4247.40003@redhat.com> (raw)
In-Reply-To: <1420705965.11796.46.camel@hellion.org.uk>

Hi,

On 08-01-15 09:32, Ian Campbell wrote:
> On Sun, 2015-01-04 at 21:05 +0100, Hans de Goede wrote:
>> Hitachi tx18d42vm LCD panels have an onboard controller which needs some
>> initialization via spi for the panel to become functional as a regular LVDS
>> panel.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>>   board/sunxi/Kconfig             |  3 ++
>>   drivers/video/Makefile          |  2 +-
>>   drivers/video/sunxi_display.c   |  9 ++++++
>>   drivers/video/sunxi_lcd_panel.c | 68 +++++++++++++++++++++++++++++++++++++++++
>>   drivers/video/sunxi_lcd_panel.h |  9 ++++++
>>   5 files changed, 90 insertions(+), 1 deletion(-)
>>   create mode 100644 drivers/video/sunxi_lcd_panel.c
>>   create mode 100644 drivers/video/sunxi_lcd_panel.h
>>
>> diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
>> index fdb18a4..e9f62b9 100644
>> --- a/board/sunxi/Kconfig
>> +++ b/board/sunxi/Kconfig
>> @@ -357,6 +357,9 @@ config VIDEO_LCD_PANEL_PARALLEL
>>   config VIDEO_LCD_PANEL_LVDS
>>   	bool "Generic lvds interface LCD panel"
>>
>> +config VIDEO_LCD_PANEL_HITACHI_TX18D42VM
>> +	bool "Hitachi tx18d42vm LCD panel"
>> +
>>   endchoice
>>
>>   config USB_KEYBOARD
>> diff --git a/drivers/video/Makefile b/drivers/video/Makefile
>> index 42b1eaa..d4fe1aa 100644
>> --- a/drivers/video/Makefile
>> +++ b/drivers/video/Makefile
>> @@ -39,7 +39,7 @@ obj-$(CONFIG_VIDEO_SANDBOX_SDL) += sandbox_sdl.o
>>   obj-$(CONFIG_VIDEO_SED13806) += sed13806.o
>>   obj-$(CONFIG_VIDEO_SM501) += sm501.o
>>   obj-$(CONFIG_VIDEO_SMI_LYNXEM) += smiLynxEM.o videomodes.o
>> -obj-$(CONFIG_VIDEO_SUNXI) += sunxi_display.o videomodes.o
>> +obj-$(CONFIG_VIDEO_SUNXI) += sunxi_display.o sunxi_lcd_panel.o videomodes.o
>>   obj-$(CONFIG_VIDEO_TEGRA) += tegra.o
>>   obj-$(CONFIG_VIDEO_VCXK) += bus_vcxk.o
>>   obj-$(CONFIG_VIDEO_X86) += x86_fb.o
>> diff --git a/drivers/video/sunxi_display.c b/drivers/video/sunxi_display.c
>> index 4b63b01..f087c2c 100644
>> --- a/drivers/video/sunxi_display.c
>> +++ b/drivers/video/sunxi_display.c
>> @@ -19,8 +19,13 @@
>>   #include <fdtdec.h>
>>   #include <fdt_support.h>
>>   #include <video_fb.h>
>> +#include "sunxi_lcd_panel.h"
>>   #include "videomodes.h"
>>
>> +#ifdef CONFIG_VIDEO_LCD_PANEL_HITACHI_TX18D42VM
>> +#define CONFIG_VIDEO_LCD_PANEL_LVDS
>> +#endif
>
> Your reply to 1/3 made me notice this, which I somehow missed before, I
> don't think this is the right way to go about this.
>
> It seems to me that LCD_PANEL_HITACHI does not belong under the PARALLEL
> vs LVDS Kconfig choice, rather it should be an independent bool option
> which depends on PANEL_LVDS.

Technically you are correct, but from a user pov it seems easier to tell
the user to select which panel he has, and then the user can chose between a
bunch of generic ones (generic parallel, generic lvds) and a bunch of specific
panels which need some extra setup.

If you insist I can live with doing things your way though, either way let
me know how you want to handle this.

Regards,

Hans

  reply	other threads:[~2015-01-08  8:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-04 20:05 [U-Boot] [PATCH 1/3] sunxi: video: Add lvds support Hans de Goede
2015-01-04 20:05 ` [U-Boot] [PATCH 2/3] sunxi: video: Add support for Hitachi tx18d42vm LCD panels Hans de Goede
2015-01-07 18:59   ` Ian Campbell
2015-01-07 20:04     ` Hans de Goede
2015-01-08  8:33       ` Ian Campbell
2015-01-08  8:32   ` Ian Campbell
2015-01-08  8:39     ` Hans de Goede [this message]
2015-01-08  9:04       ` Ian Campbell
2015-01-04 20:05 ` [U-Boot] [PATCH 3/3] sunxi: Add new Chuwi V7 CW0825 board / defconfig Hans de Goede
2015-01-07 19:00   ` Ian Campbell
2015-01-07 18:56 ` [U-Boot] [PATCH 1/3] sunxi: video: Add lvds support Ian Campbell
2015-01-07 19:58   ` Hans de Goede
2015-01-08  8:36     ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54AE4247.40003@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox