2005-09-13 04:25:30 -04:00
|
|
|
/*
|
2006-01-05 15:44:55 -05:00
|
|
|
* 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.
|
|
|
|
*
|
2005-09-13 04:25:30 -04:00
|
|
|
*/
|
|
|
|
|
2009-03-28 11:18:51 -04:00
|
|
|
#include <mach/sharpsl_pm.h>
|
2006-01-05 15:44:55 -05:00
|
|
|
|
|
|
|
/*
|
|
|
|
* SharpSL SSP Driver
|
|
|
|
*/
|
2005-09-13 04:25:30 -04:00
|
|
|
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);
|
2005-09-13 04:25:32 -04:00
|
|
|
|
2006-01-05 15:44:55 -05:00
|
|
|
|
2005-09-13 04:25:33 -04:00
|
|
|
/*
|
2008-01-01 19:09:54 -05:00
|
|
|
* SharpSL/Corgi LCD Driver
|
2005-09-13 04:25:33 -04:00
|
|
|
*/
|
2008-01-01 19:09:54 -05:00
|
|
|
void corgi_lcdtg_suspend(void);
|
|
|
|
void corgi_lcdtg_hw_init(int mode);
|
2005-11-10 12:42:29 -05:00
|
|
|
|
2006-01-05 15:44:55 -05:00
|
|
|
|
2005-11-10 12:42:29 -05:00
|
|
|
/*
|
|
|
|
* SharpSL Battery/PM Driver
|
|
|
|
*/
|
2006-01-05 15:44:55 -05:00
|
|
|
#define READ_GPIO_BIT(x) (GPLR(x) & GPIO_bit(x))
|
2005-11-10 12:42:29 -05:00
|
|
|
|
2006-01-05 15:44:55 -05:00
|
|
|
/* MAX1111 Channel Definitions */
|
|
|
|
#define MAX1111_BATT_VOLT 4u
|
|
|
|
#define MAX1111_BATT_TEMP 2u
|
|
|
|
#define MAX1111_ACIN_VOLT 6u
|
2005-11-10 12:42:29 -05:00
|
|
|
|
|
|
|
extern struct battery_thresh spitz_battery_levels_acin[];
|
|
|
|
extern struct battery_thresh spitz_battery_levels_noac[];
|
2006-01-05 15:44:55 -05:00
|
|
|
int sharpsl_pm_pxa_read_max1111(int channel);
|
2005-11-10 12:42:29 -05:00
|
|
|
|
|
|
|
|