display.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * OMAP2plus display device setup / initialization.
  3. *
  4. * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
  5. * Senthilvadivu Guruswamy
  6. * Sumit Semwal
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. *
  12. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  13. * kind, whether express or implied; without even the implied warranty
  14. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. */
  17. #include <linux/kernel.h>
  18. #include <linux/init.h>
  19. #include <linux/platform_device.h>
  20. #include <linux/io.h>
  21. #include <linux/clk.h>
  22. #include <linux/err.h>
  23. #include <plat/display.h>
  24. static struct platform_device omap_display_device = {
  25. .name = "omapdss",
  26. .id = -1,
  27. .dev = {
  28. .platform_data = NULL,
  29. },
  30. };
  31. int __init omap_display_init(struct omap_dss_board_info *board_data)
  32. {
  33. int r = 0;
  34. omap_display_device.dev.platform_data = board_data;
  35. r = platform_device_register(&omap_display_device);
  36. if (r < 0)
  37. printk(KERN_ERR "Unable to register OMAP-Display device\n");
  38. return r;
  39. }