sharpsl.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * Copyright (c) 2004-2005 Richard Purdie
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. *
  8. */
  9. #include <asm/hardware/sharpsl_pm.h>
  10. /*
  11. * SharpSL SSP Driver
  12. */
  13. struct corgissp_machinfo {
  14. int port;
  15. int cs_lcdcon;
  16. int cs_ads7846;
  17. int cs_max1111;
  18. int clk_lcdcon;
  19. int clk_ads7846;
  20. int clk_max1111;
  21. };
  22. void corgi_ssp_set_machinfo(struct corgissp_machinfo *machinfo);
  23. /*
  24. * SharpSL Backlight
  25. */
  26. void corgi_bl_set_intensity(int intensity);
  27. void spitz_bl_set_intensity(int intensity);
  28. void akita_bl_set_intensity(int intensity);
  29. /*
  30. * SharpSL Touchscreen Driver
  31. */
  32. unsigned long corgi_get_hsync_len(void);
  33. unsigned long spitz_get_hsync_len(void);
  34. void corgi_put_hsync(void);
  35. void spitz_put_hsync(void);
  36. void corgi_wait_hsync(void);
  37. void spitz_wait_hsync(void);
  38. /*
  39. * SharpSL Battery/PM Driver
  40. */
  41. #define READ_GPIO_BIT(x) (GPLR(x) & GPIO_bit(x))
  42. /* MAX1111 Channel Definitions */
  43. #define MAX1111_BATT_VOLT 4u
  44. #define MAX1111_BATT_TEMP 2u
  45. #define MAX1111_ACIN_VOLT 6u
  46. extern struct battery_thresh spitz_battery_levels_acin[];
  47. extern struct battery_thresh spitz_battery_levels_noac[];
  48. void sharpsl_pm_pxa_init(void);
  49. void sharpsl_pm_pxa_remove(void);
  50. int sharpsl_pm_pxa_read_max1111(int channel);