12 #include <linux/module.h>
13 #include <linux/stat.h>
15 #include <linux/kernel.h>
26 #include <mach/hardware.h>
34 #define SHARPSL_CHARGE_ON_VOLT 0x99
35 #define SHARPSL_CHARGE_ON_TEMP 0xe0
36 #define SHARPSL_CHARGE_ON_ACIN_HIGH 0x9b
37 #define SHARPSL_CHARGE_ON_ACIN_LOW 0x34
38 #define SHARPSL_FATAL_ACIN_VOLT 182
39 #define SHARPSL_FATAL_NOACIN_VOLT 170
41 static struct gpio charger_gpios[] = {
50 static void corgi_charger_init(
void)
55 static void corgi_measure_temp(
int on)
60 static void corgi_charge(
int on)
76 static void corgi_discharge(
int on)
81 static void corgi_presuspend(
void)
85 static void corgi_postsuspend(
void)
93 static int corgi_should_wakeup(
unsigned int resume_on_alarm)
98 "GPIO_CHRG_FULL = %d, GPIO_KEY_INT = %d, GPIO_WAKEUP = %d\n",
134 static unsigned long corgi_charger_wakeup(
void)
168 .init = corgi_charger_init,
173 .discharge = corgi_discharge,
174 .charge = corgi_charge,
175 .measure_temp = corgi_measure_temp,
176 .presuspend = corgi_presuspend,
177 .postsuspend = corgi_postsuspend,
179 .charger_wakeup = corgi_charger_wakeup,
180 .should_wakeup = corgi_should_wakeup,
181 #if defined(CONFIG_LCD_CORGI)
193 .status_high_acin = 188,
194 .status_low_acin = 178,
195 .status_high_noac = 185,
196 .status_low_noac = 175,
205 if (!machine_is_corgi() && !machine_is_shepherd()
206 && !machine_is_husky())
213 if (!machine_is_corgi())
216 corgipm_device->
dev.platform_data = &corgi_pm_machinfo;
225 static void corgipm_exit(
void)