aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/sharpsl_pm.c
diff options
context:
space:
mode:
authorEric Miao <eric.miao@marvell.com>2008-08-28 18:19:32 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-09-23 17:04:32 -0400
commitf16177c20c42e1bd780b35259a995f7718986dd4 (patch)
tree9da7910f1d41178ad0d4d112d5389253d8622201 /arch/arm/mach-pxa/sharpsl_pm.c
parent55b951e7e6b9f983286c40925e340124d79bb0f7 (diff)
hwmon: add max1111_read_channel() for use by sharpsl_pm
This is not generic, and is added here for backward compatibility. It is made an individual commit here to make it easier for revert once the sharpsl_pm gets generic enough. Signed-off-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/sharpsl_pm.c')
-rw-r--r--arch/arm/mach-pxa/sharpsl_pm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c
index e804ae09370c..9427d8088395 100644
--- a/arch/arm/mach-pxa/sharpsl_pm.c
+++ b/arch/arm/mach-pxa/sharpsl_pm.c
@@ -132,8 +132,17 @@ int sharpsl_pm_pxa_read_max1111(int channel)
132 if (machine_is_tosa()) // Ugly, better move this function into another module 132 if (machine_is_tosa()) // Ugly, better move this function into another module
133 return 0; 133 return 0;
134 134
135#ifdef CONFIG_SENSORS_MAX1111
136 extern int max1111_read_channel(int);
137
138 /* max1111 accepts channels from 0-3, however,
139 * it is encoded from 0-7 here in the code.
140 */
141 return max1111_read_channel(channel >> 1);
142#else
135 return corgi_ssp_max1111_get((channel << MAXCTRL_SEL_SH) | MAXCTRL_PD0 | MAXCTRL_PD1 143 return corgi_ssp_max1111_get((channel << MAXCTRL_SEL_SH) | MAXCTRL_PD0 | MAXCTRL_PD1
136 | MAXCTRL_SGL | MAXCTRL_UNI | MAXCTRL_STR); 144 | MAXCTRL_SGL | MAXCTRL_UNI | MAXCTRL_STR);
145#endif
137} 146}
138 147
139void sharpsl_pm_pxa_init(void) 148void sharpsl_pm_pxa_init(void)