board-halibut-panel.c 1.4 KB

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