memoryCall.c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*
  2. * am200epd.c -- Platform device for AM200 EPD kit
  3. *
  4. * Copyright (C) 2008, Jaya Kumar
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file COPYING in the main directory of this archive for
  8. * more details.
  9. *
  10. * Layout is based on skeletonfb.c by James Simmons and Geert Uytterhoeven.
  11. *
  12. * This work was made possible by help and equipment support from E-Ink
  13. * Corporation. http://support.eink.com/community
  14. *
  15. * This driver is written to be used with the Metronome display controller.
  16. * on the AM200 EPD prototype kit/development kit with an E-Ink 800x600
  17. * Vizplex EPD on a Gumstix board using the Lyre interface board.
  18. *
  19. */
  20. #include <linux/module.h>
  21. #include <linux/kernel.h>
  22. #include <linux/errno.h>
  23. #include <linux/string.h>
  24. #include <linux/delay.h>
  25. #include <linux/interrupt.h>
  26. #include <linux/fb.h>
  27. #include <linux/init.h>
  28. #include <linux/platform_device.h>
  29. #include <linux/irq.h>
  30. #include <linux/gpio.h>
  31. #include <mach/pxa25x.h>
  32. #include <mach/gumstix.h>
  33. #include <linux/platform_data/video-pxafb.h>
  34. #include "generic.h"
  35. #include <video/metronomefb.h>
  36. static unsigned int panel_type = 6;
  37. static struct platform_device *am200_device;
  38. static struct metronome_board am200_board;
  39. static struct pxafb_mode_info am200_fb_mode_9inch7 = {
  40. .pixclock = 40000,
  41. .xres = 1200,
  42. .yres = 842,
  43. .bpp = 16,
  44. .hsync_len = 2,
  45. .left_margin = 2,
  46. .right_margin = 2,
  47. .vsync_len = 1,
  48. .upper_margin = 2,
  49. .lower_margin = 25,
  50. .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
  51. };
  52. static struct pxafb_mode_info am200_fb_mode_8inch = {
  53. .pixclock = 40000,
  54. .xres = 1088,
  55. .yres = 791,
  56. .bpp = 16,
  57. .hsync_len = 28,
  58. .left_margin = 8,
  59. .right_margin = 30,
  60. .vsync_len = 8,
  61. .upper_margin = 10,
  62. .lower_margin = 8,
  63. .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
  64. };
  65. static struct pxafb_mode_info am200_fb_mode_6inch = {
  66. .pixclock = 40189,
  67. .xres = 832,
  68. .yres = 622,
  69. .bpp = 16,
  70. .hsync_len = 28,
  71. .left_margin = 34,
  72. .right_margin = 34,
  73. .vsync_len = 25,
  74. .upper_margin = 0,
  75. .lower_margin = 2,