| Richard Purdie | 50a5de4 | 2005-09-13 01:25:30 -0700 | [diff] [blame] | 1 | /* | 
| Richard Purdie | b7557de | 2006-01-05 20:44:55 +0000 | [diff] [blame] | 2 | * 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 Purdie | 50a5de4 | 2005-09-13 01:25:30 -0700 | [diff] [blame] | 8 | */ | 
|  | 9 |  | 
| Dmitry Eremin-Solenikov | 78731d3 | 2009-03-28 18:18:51 +0300 | [diff] [blame] | 10 | #include <mach/sharpsl_pm.h> | 
| Richard Purdie | b7557de | 2006-01-05 20:44:55 +0000 | [diff] [blame] | 11 |  | 
|  | 12 | /* | 
| Richard Purdie | 078abcf | 2005-11-10 17:42:29 +0000 | [diff] [blame] | 13 | * SharpSL Battery/PM Driver | 
|  | 14 | */ | 
| Richard Purdie | 078abcf | 2005-11-10 17:42:29 +0000 | [diff] [blame] | 15 | #define READ_GPIO_BIT(x)    (GPLR(x) & GPIO_bit(x)) | 
|  | 16 |  | 
| Richard Purdie | b7557de | 2006-01-05 20:44:55 +0000 | [diff] [blame] | 17 | /* MAX1111 Channel Definitions */ | 
|  | 18 | #define MAX1111_BATT_VOLT   4u | 
|  | 19 | #define MAX1111_BATT_TEMP   2u | 
|  | 20 | #define MAX1111_ACIN_VOLT   6u | 
| Richard Purdie | 078abcf | 2005-11-10 17:42:29 +0000 | [diff] [blame] | 21 |  | 
| Pavel Machek | 0ba01eb | 2009-10-22 22:16:34 +0200 | [diff] [blame] | 22 | extern struct battery_thresh sharpsl_battery_levels_acin[]; | 
|  | 23 | extern struct battery_thresh sharpsl_battery_levels_noac[]; | 
| Richard Purdie | b7557de | 2006-01-05 20:44:55 +0000 | [diff] [blame] | 24 | int sharpsl_pm_pxa_read_max1111(int channel); | 
|  | 25 |  | 
|  | 26 |  |