sharpsl.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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/Corgi LCD Driver
  25. */
  26. void corgi_lcdtg_suspend(void);
  27. void corgi_lcdtg_hw_init(int mode);
  28. /*
  29. * SharpSL Battery/PM Driver
  30. */
  31. #define READ_GPIO_BIT(x) (GPLR(x) & GPIO_bit(x))
  32. /* MAX1111 Channel Definitions */
  33. #define MAX1111_BATT_VOLT 4u
  34. #define MAX1111_BATT_TEMP 2u
  35. #define MAX1111_ACIN_VOLT 6u
  36. extern struct battery_thresh spitz_battery_levels_acin[];
  37. extern struct battery_thresh spitz_battery_levels_noac[];
  38. void sharpsl_pm_pxa_init(void);
  39. void sharpsl_pm_pxa_remove(void);
  40. int sharpsl_pm_pxa_read_max1111(int channel);