From f16177c20c42e1bd780b35259a995f7718986dd4 Mon Sep 17 00:00:00 2001 From: Eric Miao Date: Fri, 29 Aug 2008 06:19:32 +0800 Subject: 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 Signed-off-by: Russell King --- arch/arm/mach-pxa/sharpsl_pm.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'arch/arm/mach-pxa/sharpsl_pm.c') 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) 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) -- cgit v1.2.1 From 68677ab3d08ed6d57be0c1ae4e4d364bb2d104b6 Mon Sep 17 00:00:00 2001 From: Eric Miao Date: Wed, 3 Sep 2008 14:50:23 +0800 Subject: [ARM] pxa/corgi: remove now unused corgi_ssp.c and corgi_lcd.c Now poodle/corgi/spitz have been been converted to use SPI-based drivers, remove the now unused corgi_ssp.c and corgi_lcd.c. And as well as the unused reference of {corgi,spitz}ssp_device. Signed-off-by: Eric Miao Signed-off-by: Russell King --- arch/arm/mach-pxa/sharpsl_pm.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'arch/arm/mach-pxa/sharpsl_pm.c') diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c index 9427d8088395..15c2f1a8623b 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.c +++ b/arch/arm/mach-pxa/sharpsl_pm.c @@ -116,33 +116,20 @@ 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) -- cgit v1.2.1