2005-09-13 16:25:30 +08:00
|
|
|
/*
|
2006-01-06 04:44:55 +08: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 16:25:30 +08:00
|
|
|
*/
|
|
|
|
|
2009-03-28 23:18:51 +08:00
|
|
|
#include <mach/sharpsl_pm.h>
|
2006-01-06 04:44:55 +08:00
|
|
|
|
2005-11-11 01:42:29 +08:00
|
|
|
/*
|
|
|
|
* SharpSL Battery/PM Driver
|
|
|
|
*/
|
2006-01-06 04:44:55 +08:00
|
|
|
#define READ_GPIO_BIT(x) (GPLR(x) & GPIO_bit(x))
|
2005-11-11 01:42:29 +08:00
|
|
|
|
2006-01-06 04:44:55 +08:00
|
|
|
/* MAX1111 Channel Definitions */
|
|
|
|
#define MAX1111_BATT_VOLT 4u
|
|
|
|
#define MAX1111_BATT_TEMP 2u
|
|
|
|
#define MAX1111_ACIN_VOLT 6u
|
2005-11-11 01:42:29 +08:00
|
|
|
|
2009-10-23 04:16:34 +08:00
|
|
|
extern struct battery_thresh sharpsl_battery_levels_acin[];
|
|
|
|
extern struct battery_thresh sharpsl_battery_levels_noac[];
|
2006-01-06 04:44:55 +08:00
|
|
|
int sharpsl_pm_pxa_read_max1111(int channel);
|
2005-11-11 01:42:29 +08:00
|
|
|
|
|
|
|
|