diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2006-06-19 14:58:52 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-06-19 14:58:52 -0400 |
commit | f8703dc8cb10eca7f6fe6ef364d8e106fe07f034 (patch) | |
tree | 371f01b78f7fa205128b9ba9127b30904dfdd7b7 /arch/arm/mach-pxa/sharpsl_pm.c | |
parent | 88660351cb6daa85baf9700f12dff3af564dc14a (diff) |
[ARM] 3564/1: sharpsl_pm: Abstract some machine specific parameters
Patch from Richard Purdie
Abstract some machine specific parameters from the sharpsl_pm core
into the machine specific drivers. This allows the core to support
tosa/poodle.
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
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.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c index 6d402b262d8a..0f1648780c41 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.c +++ b/arch/arm/mach-pxa/sharpsl_pm.c | |||
@@ -128,6 +128,9 @@ struct battery_thresh spitz_battery_levels_noac[] = { | |||
128 | */ | 128 | */ |
129 | int sharpsl_pm_pxa_read_max1111(int channel) | 129 | int sharpsl_pm_pxa_read_max1111(int channel) |
130 | { | 130 | { |
131 | if (machine_is_tosa()) // Ugly, better move this function into another module | ||
132 | return 0; | ||
133 | |||
131 | return corgi_ssp_max1111_get((channel << MAXCTRL_SEL_SH) | MAXCTRL_PD0 | MAXCTRL_PD1 | 134 | return corgi_ssp_max1111_get((channel << MAXCTRL_SEL_SH) | MAXCTRL_PD0 | MAXCTRL_PD1 |
132 | | MAXCTRL_SGL | MAXCTRL_UNI | MAXCTRL_STR); | 135 | | MAXCTRL_SGL | MAXCTRL_UNI | MAXCTRL_STR); |
133 | } | 136 | } |
@@ -156,7 +159,7 @@ void sharpsl_pm_pxa_init(void) | |||
156 | else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal),IRQT_FALLING); | 159 | else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal),IRQT_FALLING); |
157 | } | 160 | } |
158 | 161 | ||
159 | if (!machine_is_corgi()) | 162 | if (sharpsl_pm.machinfo->batfull_irq) |
160 | { | 163 | { |
161 | /* Register interrupt handler. */ | 164 | /* Register interrupt handler. */ |
162 | if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr, SA_INTERRUPT, "CO", sharpsl_chrg_full_isr)) { | 165 | if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr, SA_INTERRUPT, "CO", sharpsl_chrg_full_isr)) { |
@@ -174,6 +177,6 @@ void sharpsl_pm_pxa_remove(void) | |||
174 | if (sharpsl_pm.machinfo->gpio_fatal) | 177 | if (sharpsl_pm.machinfo->gpio_fatal) |
175 | free_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal), sharpsl_fatal_isr); | 178 | free_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal), sharpsl_fatal_isr); |
176 | 179 | ||
177 | if (!machine_is_corgi()) | 180 | if (sharpsl_pm.machinfo->batfull_irq) |
178 | free_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr); | 181 | free_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr); |
179 | } | 182 | } |