e400_lcd.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * e400_lcd.c
  3. *
  4. * (c) 2005 Ian Molton <spyro@f2s.com>
  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 version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. */
  11. #include <linux/kernel.h>
  12. #include <linux/init.h>
  13. #include <linux/module.h>
  14. #include <asm/mach-types.h>
  15. #include <asm/arch/pxa-regs.h>
  16. #include <asm/arch/pxafb.h>
  17. static struct pxafb_mode_info e400_pxafb_mode_info = {
  18. .pixclock = 140703,
  19. .xres = 240,
  20. .yres = 320,
  21. .bpp = 16,
  22. .hsync_len = 4,
  23. .left_margin = 28,
  24. .right_margin = 8,
  25. .vsync_len = 3,
  26. .upper_margin = 5,
  27. .lower_margin = 6,
  28. .sync = 0,
  29. };
  30. static struct pxafb_mach_info e400_pxafb_mach_info = {
  31. .modes = &e400_pxafb_mode_info,
  32. .num_modes = 1,
  33. .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
  34. .lccr3 = 0,
  35. .pxafb_backlight_power = NULL,
  36. };
  37. static int __init e400_lcd_init(void)
  38. {
  39. if (!machine_is_e400())
  40. return -ENODEV;
  41. set_pxa_fb_info(&e400_pxafb_mach_info);
  42. return 0;
  43. }
  44. module_init(e400_lcd_init);
  45. MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
  46. MODULE_DESCRIPTION("e400 lcd driver");
  47. MODULE_LICENSE("GPLv2");