summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRussell Robinson Jr <rrobinson@phytec.com>2013-07-16 16:08:06 -0700
committerAnthony Felice <tony.felice@timesys.com>2013-08-28 18:26:22 -0400
commit13ad0383ab52509b9a487f0f30bc01b54f930064 (patch)
tree2682210494847ea13565df78586a4717c669b2e0 /arch
parentaccdcb548f0d9779e77e18a62cb57be0e0133240 (diff)
mvf: dcu: move DCU_LCD_ENABLE_PIN into the platform_data struct
Signed-off-by: Russell Robinson Jr <rrobinson@phytec.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/plat-mxc/devices/platform-mvf-dcu.c7
-rwxr-xr-xarch/arm/plat-mxc/include/mach/devices-common.h3
-rw-r--r--arch/arm/plat-mxc/include/mach/mvf-dcu-fb.h7
3 files changed, 10 insertions, 7 deletions
diff --git a/arch/arm/plat-mxc/devices/platform-mvf-dcu.c b/arch/arm/plat-mxc/devices/platform-mvf-dcu.c
index 15f6f0dbe24e..df77714afec4 100644
--- a/arch/arm/plat-mxc/devices/platform-mvf-dcu.c
+++ b/arch/arm/plat-mxc/devices/platform-mvf-dcu.c
@@ -22,16 +22,17 @@
.init = dcu_init, \
}
-int __init mvf_dcu_init(int id)
+int __init mvf_dcu_init(int id,
+ struct mvf_dcu_platform_data *pdata)
{
int ret = 0;
- ret = gpio_request_one(DCU_LCD_ENABLE_PIN, GPIOF_OUT_INIT_LOW, "DCU");
+ ret = gpio_request_one(pdata->enable_pin, GPIOF_OUT_INIT_LOW, "DCU");
if (ret)
printk(KERN_ERR "DCU: failed to request GPIO 25\n");
msleep(2);
- gpio_set_value(DCU_LCD_ENABLE_PIN, 0);
+ gpio_set_value(pdata->enable_pin, 0);
writel(0x20000000, MVF_IO_ADDRESS(MVF_TCON0_BASE_ADDR));
return ret;
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h
index 0e2a2a1d13e9..fcfba8948f77 100755
--- a/arch/arm/plat-mxc/include/mach/devices-common.h
+++ b/arch/arm/plat-mxc/include/mach/devices-common.h
@@ -406,7 +406,8 @@ struct mvf_dcu_data {
resource_size_t iobase;
resource_size_t iosize;
resource_size_t irq;
- int (*init) (int);
+ int (*init) (int,
+ struct mvf_dcu_platform_data *pdata);
};
struct platform_device *__init mvf_add_dcu(
const int id,
diff --git a/arch/arm/plat-mxc/include/mach/mvf-dcu-fb.h b/arch/arm/plat-mxc/include/mach/mvf-dcu-fb.h
index 38fcdd4916bf..d4364f1bdd8b 100644
--- a/arch/arm/plat-mxc/include/mach/mvf-dcu-fb.h
+++ b/arch/arm/plat-mxc/include/mach/mvf-dcu-fb.h
@@ -19,9 +19,12 @@
struct mvf_dcu_platform_data {
char *mode_str;
int default_bpp;
- int (*init) (int);
+ int (*init) (int,
+ struct mvf_dcu_platform_data *pdata);
+ int enable_pin;
};
+
struct dfb_chroma_key {
int enable;
__u8 red_max;
@@ -32,8 +35,6 @@ struct dfb_chroma_key {
__u8 blue_min;
};
-#define DCU_LCD_ENABLE_PIN 25
-
#define MFB_SET_CHROMA_KEY _IOW('M', 1, struct mfb_chroma_key)
#define MFB_SET_BRIGHTNESS _IOW('M', 3, __u8)