sharpsl.h 1.0 KB
Newer Older
1
/*
2 3 4 5 6 7
 * Copyright (c) 2004-2005 Richard Purdie
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
8 9
 */

10
#include <asm/hardware/sharpsl_pm.h>
11 12 13 14

/*
 * SharpSL SSP Driver
 */
15 16 17 18 19 20 21 22 23 24 25
struct corgissp_machinfo {
	int port;
	int cs_lcdcon;
	int cs_ads7846;
	int cs_max1111;
	int clk_lcdcon;
	int clk_ads7846;
	int clk_max1111;
};

void corgi_ssp_set_machinfo(struct corgissp_machinfo *machinfo);
26

27

28
/*
29
 * SharpSL/Corgi LCD Driver
30
 */
31 32
void corgi_lcdtg_suspend(void);
void corgi_lcdtg_hw_init(int mode);
33

34

35 36 37
/*
 * SharpSL Battery/PM Driver
 */
38
#define READ_GPIO_BIT(x)    (GPLR(x) & GPIO_bit(x))
39

40 41 42 43
/* MAX1111 Channel Definitions */
#define MAX1111_BATT_VOLT   4u
#define MAX1111_BATT_TEMP   2u
#define MAX1111_ACIN_VOLT   6u
44 45 46

extern struct battery_thresh spitz_battery_levels_acin[];
extern struct battery_thresh spitz_battery_levels_noac[];
47 48 49
void sharpsl_pm_pxa_init(void);
void sharpsl_pm_pxa_remove(void);
int sharpsl_pm_pxa_read_max1111(int channel);
50 51