blob: 1439785d39799426ade2f033f23695e1fcfa8d45 [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
Dmitry Eremin-Solenikov78731d32009-03-28 18:18:51 +030010#include <mach/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
Pavel Machek0ba01eb2009-10-22 22:16:34 +020045extern struct battery_thresh sharpsl_battery_levels_acin[];
46extern struct battery_thresh sharpsl_battery_levels_noac[];
Richard Purdieb7557de2006-01-05 20:44:55 +000047int sharpsl_pm_pxa_read_max1111(int channel);
48
49