Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1 | /* linux/arch/arm/mach-msm/board-halibut-mddi.c |
| 2 | ** Author: Brian Swetland <swetland@google.com> |
| 3 | */ |
| 4 | |
| 5 | #include <linux/kernel.h> |
| 6 | #include <linux/init.h> |
| 7 | #include <linux/platform_device.h> |
| 8 | #include <linux/delay.h> |
| 9 | #include <linux/leds.h> |
| 10 | #include <linux/clk.h> |
| 11 | #include <linux/err.h> |
| 12 | #include <linux/bootmem.h> |
| 13 | |
| 14 | #include <asm/io.h> |
| 15 | #include <asm/gpio.h> |
| 16 | #include <asm/mach-types.h> |
| 17 | |
| 18 | #include <mach/msm_fb.h> |
| 19 | #include <mach/vreg.h> |
| 20 | |
| 21 | #include "proc_comm.h" |
| 22 | #include "devices.h" |
| 23 | #include "board-halibut.h" |
| 24 | |
| 25 | static void halibut_mddi_power_client(struct msm_mddi_client_data *mddi, |
| 26 | int on) |
| 27 | { |
| 28 | } |
| 29 | |
| 30 | static struct resource resources_msm_fb = { |
| 31 | .start = MSM_FB_BASE, |
| 32 | .end = MSM_FB_BASE + MSM_FB_SIZE - 1, |
| 33 | .flags = IORESOURCE_MEM, |
| 34 | }; |
| 35 | |
| 36 | static struct msm_fb_data fb_data = { |
| 37 | .xres = 800, |
| 38 | .yres = 480, |
| 39 | .output_format = 0, |
| 40 | }; |
| 41 | |
| 42 | static struct msm_mddi_platform_data mddi_pdata = { |
| 43 | .clk_rate = 122880000, |
| 44 | .power_client = halibut_mddi_power_client, |
| 45 | .fb_resource = &resources_msm_fb, |
| 46 | .num_clients = 1, |
| 47 | .client_platform_data = { |
| 48 | { |
| 49 | .product_id = (0x4474 << 16 | 0xc065), |
| 50 | .name = "mddi_c_dummy", |
| 51 | .id = 0, |
| 52 | .client_data = &fb_data, |
| 53 | .clk_rate = 0, |
| 54 | }, |
| 55 | }, |
| 56 | }; |
| 57 | |
| 58 | int __init halibut_init_panel(void) |
| 59 | { |
| 60 | int rc; |
| 61 | |
| 62 | if (!machine_is_halibut()) |
| 63 | return 0; |
| 64 | |
| 65 | rc = platform_device_register(&msm_device_mdp); |
| 66 | if (rc) |
| 67 | return rc; |
| 68 | |
| 69 | msm_device_mddi0.dev.platform_data = &mddi_pdata; |
| 70 | return platform_device_register(&msm_device_mddi0); |
| 71 | } |
| 72 | |
| 73 | device_initcall(halibut_init_panel); |