X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Farm%2Fmach-pxa%2Fsharpsl_pm.c;h=f0845c1b001c8a94fca44dbb93df2edf621ecbd8;hb=5579a782ad7ffa162b1060993e4a298dd50e7a33;hp=15c2f1a8623ba8b547dea59b9dcc6ab97e18adef;hpb=3f30a09a612bac2b531a206c2a58a292dd7ff182;p=linux-2.6-omap-h63xx.git diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c index 15c2f1a8623..f0845c1b001 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.c +++ b/arch/arm/mach-pxa/sharpsl_pm.c @@ -116,20 +116,33 @@ struct battery_thresh spitz_battery_levels_noac[] = { { 0, 0}, }; +/* MAX1111 Commands */ +#define MAXCTRL_PD0 1u << 0 +#define MAXCTRL_PD1 1u << 1 +#define MAXCTRL_SGL 1u << 2 +#define MAXCTRL_UNI 1u << 3 +#define MAXCTRL_SEL_SH 4 +#define MAXCTRL_STR 1u << 7 + /* * Read MAX1111 ADC */ -extern int max1111_read_channel(int); - int sharpsl_pm_pxa_read_max1111(int channel) { if (machine_is_tosa()) // Ugly, better move this function into another module return 0; +#ifdef CONFIG_CORGI_SSP_DEPRECATED + return corgi_ssp_max1111_get((channel << MAXCTRL_SEL_SH) | MAXCTRL_PD0 | MAXCTRL_PD1 + | MAXCTRL_SGL | MAXCTRL_UNI | MAXCTRL_STR); +#else + extern int max1111_read_channel(int); + /* max1111 accepts channels from 0-3, however, * it is encoded from 0-7 here in the code. */ return max1111_read_channel(channel >> 1); +#endif } void sharpsl_pm_pxa_init(void)