aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd/glamo/glamo-core.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2009-06-15 01:21:30 +0100
committerThomas White <taw@bitwiz.org.uk>2009-06-15 01:21:30 +0100
commitef859741e8baf985777015207041860cc42a2939 (patch)
tree721439661832949e8de79481da5d6c18f432a095 /drivers/mfd/glamo/glamo-core.c
parent2f5a2688d9f19a9ea2b1162829e46e03cd7856d8 (diff)
Just backing up progress (again)
Nearly there... Signed-off-by: Thomas White <taw@bitwiz.org.uk>
Diffstat (limited to 'drivers/mfd/glamo/glamo-core.c')
-rw-r--r--drivers/mfd/glamo/glamo-core.c53
1 files changed, 19 insertions, 34 deletions
diff --git a/drivers/mfd/glamo/glamo-core.c b/drivers/mfd/glamo/glamo-core.c
index 075b9a05a0e..9e690b5db4b 100644
--- a/drivers/mfd/glamo/glamo-core.c
+++ b/drivers/mfd/glamo/glamo-core.c
@@ -175,7 +175,7 @@ static inline void glamo_vmem_read(struct glamo_core *glamo, u_int16_t *buf,
/***********************************************************************
* resources of sibling devices
***********************************************************************/
-static struct resource glamo_cmdq_resources[] = {
+static struct resource glamo_graphics_resources[] = {
{
.name = "glamo-cmdq-regs",
.start = GLAMO_REGOFS_CMDQUEUE,
@@ -193,22 +193,7 @@ static struct resource glamo_cmdq_resources[] = {
.end = GLAMO_MEM_BASE + GLAMO_OFFSET_FB +
GLAMO_FB_SIZE - 1,
.flags = IORESOURCE_MEM,
- },
-};
-
-static struct platform_device glamo_cmdq_dev = {
- .name = "glamo-cmdq",
- .resource = glamo_cmdq_resources,
- .num_resources = ARRAY_SIZE(glamo_cmdq_resources),
-};
-
-static struct platform_device glamo_spigpio_dev = {
- .name = "glamo-spi-gpio",
-};
-
-static struct resource glamo_fb_resources[] = {
- /* FIXME: those need to be incremented by parent base */
- {
+ }, {
.name = "glamo-fb-regs",
.start = GLAMO_REGOFS_LCD,
.end = GLAMO_REGOFS_MMC - 1,
@@ -216,12 +201,17 @@ static struct resource glamo_fb_resources[] = {
}
};
-static struct platform_device glamo_fb_dev = {
- .name = "glamo-fb",
- .resource = glamo_fb_resources,
- .num_resources = ARRAY_SIZE(glamo_fb_resources),
+static struct platform_device glamo_graphics_dev = {
+ .name = "glamo-graphics",
+ .resource = glamo_graphics_resources,
+ .num_resources = ARRAY_SIZE(glamo_graphics_resources),
+};
+
+static struct platform_device glamo_spigpio_dev = {
+ .name = "glamo-spi-gpio",
};
+
static struct resource glamo_mmc_resources[] = {
{
/* FIXME: those need to be incremented by parent base */
@@ -1253,18 +1243,11 @@ static int __init glamo_probe(struct platform_device *pdev)
glamo->pdata->glamo = glamo;
/* Command queue device (for DRM) */
- glamo_cmdq_dev.dev.parent = &pdev->dev;
- glamo_cmdq_dev.dev.platform_data = glamo;
- mangle_mem_resources(glamo_cmdq_dev.resource,
- glamo_cmdq_dev.num_resources, glamo->mem);
- platform_device_register(&glamo_cmdq_dev);
-
- /* Frambuffer device */
- glamo_fb_dev.dev.parent = &pdev->dev;
- glamo_fb_dev.dev.platform_data = glamo->pdata;
- mangle_mem_resources(glamo_fb_dev.resource,
- glamo_fb_dev.num_resources, glamo->mem);
- platform_device_register(&glamo_fb_dev);
+ glamo_graphics_dev.dev.parent = &pdev->dev;
+ glamo_graphics_dev.dev.platform_data = glamo;
+ mangle_mem_resources(glamo_graphics_dev.resource,
+ glamo_graphics_dev.num_resources, glamo->mem);
+ platform_device_register(&glamo_graphics_dev);
/* GPIO */
glamo->pdata->spigpio_info->glamo = glamo;
@@ -1325,8 +1308,10 @@ static int glamo_remove(struct platform_device *pdev)
}
platform_set_drvdata(pdev, NULL);
- platform_device_unregister(&glamo_fb_dev);
platform_device_unregister(glamo->pdata->mmc_dev);
+ /* FIXME: Don't we need to unregister these as well?
+ * platform_device_unregister(glamo->pdata->graphics_dev);
+ * platform_device_unregister(glamo->pdata->gpio_dev); */
iounmap(glamo->base);
release_mem_region(glamo->mem->start, GLAMO_REGOFS_VIDCAP);
glamo_handle = NULL;