diff options
author | Eric Miao <eric.miao@marvell.com> | 2008-10-21 09:42:29 +0800 |
---|---|---|
committer | Eric Miao <eric.miao@marvell.com> | 2008-10-21 09:42:29 +0800 |
commit | 25af3b0f757d4ce833c1df9b64b7357a9fc8f4a5 (patch) | |
tree | 64f1b3c1d9c7ce9f80daa34c44257e4f8746ac24 /arch/arm/mach-pxa/sharpsl_pm.c | |
parent | 0cfd81031a26717fe14380d18275f8e217571615 (diff) | |
download | linux-3.10-25af3b0f757d4ce833c1df9b64b7357a9fc8f4a5.tar.gz linux-3.10-25af3b0f757d4ce833c1df9b64b7357a9fc8f4a5.tar.bz2 linux-3.10-25af3b0f757d4ce833c1df9b64b7357a9fc8f4a5.zip |
Revert "[ARM] pxa/corgi: remove now unused corgi_ssp.c and corgi_lcd.c"
This reverts commit 68677ab3d08ed6d57be0c1ae4e4d364bb2d104b6.
A smoother migration path would be making corgi_ts.c and other drivers
depending on corgi_ssp.c and corgi_lcd.c to depend on BROKEN instead,
and still allows those to exist around for some time.
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Diffstat (limited to 'arch/arm/mach-pxa/sharpsl_pm.c')
-rw-r--r-- | arch/arm/mach-pxa/sharpsl_pm.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c index 15c2f1a8623..9427d808839 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_SENSORS_MAX1111 + 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); +#else + return corgi_ssp_max1111_get((channel << MAXCTRL_SEL_SH) | MAXCTRL_PD0 | MAXCTRL_PD1 + | MAXCTRL_SGL | MAXCTRL_UNI | MAXCTRL_STR); +#endif } void sharpsl_pm_pxa_init(void) |