blob: 047909a76651fb377aca1a5e0677e4ca5a21f771 [file] [log] [blame]
Richard Purdie50a5de42005-09-13 01:25:30 -07001/*
Richard Purdieb7557de2006-01-05 20:44:55 +00002 * 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 *
Richard Purdie50a5de42005-09-13 01:25:30 -07008 */
9
Richard Purdie2c041f42006-01-07 11:12:26 +000010#include <asm/hardware/sharpsl_pm.h>
Richard Purdieb7557de2006-01-05 20:44:55 +000011
12/*
13 * SharpSL SSP Driver
14 */
Richard Purdie50a5de42005-09-13 01:25:30 -070015struct corgissp_machinfo {
16 int port;
17 int cs_lcdcon;
18 int cs_ads7846;
19 int cs_max1111;
20 int clk_lcdcon;
21 int clk_ads7846;
22 int clk_max1111;
23};
24
25void corgi_ssp_set_machinfo(struct corgissp_machinfo *machinfo);
Richard Purdie9fc78962005-09-13 01:25:32 -070026
Richard Purdieb7557de2006-01-05 20:44:55 +000027
Richard Purdie9fc78962005-09-13 01:25:32 -070028/*
Richard Purdieca4d6cf2008-01-02 01:09:54 +010029 * SharpSL/Corgi LCD Driver
Richard Purdie1351e6e2005-09-13 01:25:33 -070030 */
Richard Purdieca4d6cf2008-01-02 01:09:54 +010031void corgi_lcdtg_suspend(void);
32void corgi_lcdtg_hw_init(int mode);
Richard Purdie078abcf2005-11-10 17:42:29 +000033
Richard Purdieb7557de2006-01-05 20:44:55 +000034
Richard Purdie078abcf2005-11-10 17:42:29 +000035/*
36 * SharpSL Battery/PM Driver
37 */
Richard Purdie078abcf2005-11-10 17:42:29 +000038#define READ_GPIO_BIT(x) (GPLR(x) & GPIO_bit(x))
39
Richard Purdieb7557de2006-01-05 20:44:55 +000040/* MAX1111 Channel Definitions */
41#define MAX1111_BATT_VOLT 4u
42#define MAX1111_BATT_TEMP 2u
43#define MAX1111_ACIN_VOLT 6u
Richard Purdie078abcf2005-11-10 17:42:29 +000044
Richard Purdieb7557de2006-01-05 20:44:55 +000045extern struct battery_thresh spitz_battery_levels_acin[];
46extern struct battery_thresh spitz_battery_levels_noac[];
47void sharpsl_pm_pxa_init(void);
48void sharpsl_pm_pxa_remove(void);
49int sharpsl_pm_pxa_read_max1111(int channel);
50
51