devices.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * linux/arch/arm/mach-omap2/devices.c
  3. *
  4. * OMAP2 platform device setup/initialization
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. */
  11. #include <linux/kernel.h>
  12. #include <linux/init.h>
  13. #include <linux/platform_device.h>
  14. #include <linux/io.h>
  15. #include <linux/clk.h>
  16. #include <linux/err.h>
  17. #include <linux/slab.h>
  18. #include <linux/of.h>
  19. #include <linux/pinctrl/machine.h>
  20. #include <asm/mach-types.h>
  21. #include <asm/mach/map.h>
  22. #include <linux/omap-dma.h>
  23. #include "iomap.h"
  24. #include "omap_hwmod.h"
  25. #include "omap_device.h"
  26. #include "soc.h"
  27. #include "common.h"
  28. #include "control.h"
  29. #include "display.h"
  30. #define L3_MODULES_MAX_LEN 12
  31. #define L3_MODULES 3
  32. /*-------------------------------------------------------------------------*/
  33. #if IS_ENABLED(CONFIG_VIDEO_OMAP2_VOUT)
  34. #if IS_ENABLED(CONFIG_FB_OMAP2)
  35. static struct resource omap_vout_resource[3 - CONFIG_FB_OMAP2_NUM_FBS] = {
  36. };
  37. #else
  38. static struct resource omap_vout_resource[2] = {
  39. };
  40. #endif
  41. static struct platform_device omap_vout_device = {
  42. .name = "omap_vout",
  43. .num_resources = ARRAY_SIZE(omap_vout_resource),
  44. .resource = &omap_vout_resource[0],
  45. .id = -1,
  46. };
  47. int __init omap_init_vout(void)
  48. {
  49. return platform_device_register(&omap_vout_device);
  50. }
  51. #else
  52. int __init omap_init_vout(void) { return 0; }
  53. #endif