Skip to content

Commit

Permalink
davinci: Add support for Sharp LCD035Q3DG01 graphical LCD
Browse files Browse the repository at this point in the history
Add support for the Sharp LCD035Q3DG01 graphical LCD.  This
requires a minor interface change to da8xx_register_lcdc()
so that the board code can pass in the platform_data which
describes the lcd controller that's to be used.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
  • Loading branch information
Mark A. Greer authored and Kevin Hilman committed Nov 25, 2009
1 parent 2eb30c8 commit b9e6342
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-davinci/board-da850-evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ static __init void da850_evm_init(void)
pr_warning("da850_evm_init: lcd initialization failed: %d\n",
ret);

ret = da8xx_register_lcdc();
ret = da8xx_register_lcdc(&sharp_lk043t1dg01_pdata);
if (ret)
pr_warning("da850_evm_init: lcdc registration failed: %d\n",
ret);
Expand Down
25 changes: 14 additions & 11 deletions arch/arm/mach-davinci/devices-da8xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <mach/common.h>
#include <mach/time.h>
#include <mach/da8xx.h>
#include <video/da8xx-fb.h>

#include "clock.h"

Expand Down Expand Up @@ -381,10 +380,16 @@ static struct lcd_ctrl_config lcd_cfg = {
.raster_order = 0,
};

static struct da8xx_lcdc_platform_data da850_evm_lcdc_pdata = {
.manu_name = "sharp",
.controller_data = &lcd_cfg,
.type = "Sharp_LK043T1DG01",
struct da8xx_lcdc_platform_data sharp_lcd035q3dg01_pdata = {
.manu_name = "sharp",
.controller_data = &lcd_cfg,
.type = "Sharp_LCD035Q3DG01",
};

struct da8xx_lcdc_platform_data sharp_lk043t1dg01_pdata = {
.manu_name = "sharp",
.controller_data = &lcd_cfg,
.type = "Sharp_LK043T1DG01",
};

static struct resource da8xx_lcdc_resources[] = {
Expand All @@ -400,19 +405,17 @@ static struct resource da8xx_lcdc_resources[] = {
},
};

static struct platform_device da850_lcdc_device = {
static struct platform_device da8xx_lcdc_device = {
.name = "da8xx_lcdc",
.id = 0,
.num_resources = ARRAY_SIZE(da8xx_lcdc_resources),
.resource = da8xx_lcdc_resources,
.dev = {
.platform_data = &da850_evm_lcdc_pdata,
}
};

int __init da8xx_register_lcdc(void)
int __init da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata)
{
return platform_device_register(&da850_lcdc_device);
da8xx_lcdc_device.dev.platform_data = pdata;
return platform_device_register(&da8xx_lcdc_device);
}

static struct resource da8xx_mmcsd0_resources[] = {
Expand Down
6 changes: 5 additions & 1 deletion arch/arm/mach-davinci/include/mach/da8xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#ifndef __ASM_ARCH_DAVINCI_DA8XX_H
#define __ASM_ARCH_DAVINCI_DA8XX_H

#include <video/da8xx-fb.h>

#include <mach/serial.h>
#include <mach/edma.h>
#include <mach/i2c.h>
Expand Down Expand Up @@ -76,12 +78,14 @@ int da8xx_register_edma(void);
int da8xx_register_i2c(int instance, struct davinci_i2c_platform_data *pdata);
int da8xx_register_watchdog(void);
int da8xx_register_emac(void);
int da8xx_register_lcdc(void);
int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata);
int da8xx_register_mmcsd0(struct davinci_mmc_config *config);
void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata);

extern struct platform_device da8xx_serial_device;
extern struct emac_platform_data da8xx_emac_pdata;
extern struct da8xx_lcdc_platform_data sharp_lcd035q3dg01_pdata;
extern struct da8xx_lcdc_platform_data sharp_lk043t1dg01_pdata;

extern const short da830_emif25_pins[];
extern const short da830_spi0_pins[];
Expand Down

0 comments on commit b9e6342

Please sign in to comment.