aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-sa1100
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-sa1100')
-rw-r--r--arch/arm/mach-sa1100/h3600.c38
-rw-r--r--arch/arm/mach-sa1100/include/mach/h3600.h46
2 files changed, 0 insertions, 84 deletions
diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
index 4920b89d149c..9f13f5bd57a2 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3600.c
@@ -227,12 +227,6 @@ static void __init h3xxx_map_io(void)
227 sa1100fb_lcd_power = h3xxx_lcd_power; 227 sa1100fb_lcd_power = h3xxx_lcd_power;
228} 228}
229 229
230static __inline__ void do_blank(int setp)
231{
232 if (ipaq_model_ops.blank_callback)
233 ipaq_model_ops.blank_callback(1-setp);
234}
235
236/************************* H3100 *************************/ 230/************************* H3100 *************************/
237 231
238#ifdef CONFIG_SA1100_H3100 232#ifdef CONFIG_SA1100_H3100
@@ -250,7 +244,6 @@ static void h3100_control_egpio(enum ipaq_egpio_type x, int setp)
250 case IPAQ_EGPIO_LCD_POWER: 244 case IPAQ_EGPIO_LCD_POWER:
251 egpio |= EGPIO_H3600_LCD_ON; 245 egpio |= EGPIO_H3600_LCD_ON;
252 gpio |= GPIO_H3100_LCD_3V_ON; 246 gpio |= GPIO_H3100_LCD_3V_ON;
253 do_blank(setp);
254 break; 247 break;
255 case IPAQ_EGPIO_LCD_ENABLE: 248 case IPAQ_EGPIO_LCD_ENABLE:
256 break; 249 break;
@@ -304,23 +297,8 @@ static void h3100_control_egpio(enum ipaq_egpio_type x, int setp)
304 } 297 }
305} 298}
306 299
307static unsigned long h3100_read_egpio(void)
308{
309 return h3100_egpio;
310}
311
312static int h3100_pm_callback(int req)
313{
314 if (ipaq_model_ops.pm_callback_aux)
315 return ipaq_model_ops.pm_callback_aux(req);
316 return 0;
317}
318
319static struct ipaq_model_ops h3100_model_ops __initdata = { 300static struct ipaq_model_ops h3100_model_ops __initdata = {
320 .generic_name = "3100",
321 .control = h3100_control_egpio, 301 .control = h3100_control_egpio,
322 .read = h3100_read_egpio,
323 .pm_callback = h3100_pm_callback
324}; 302};
325 303
326#define H3100_DIRECT_EGPIO (GPIO_H3100_BT_ON \ 304#define H3100_DIRECT_EGPIO (GPIO_H3100_BT_ON \
@@ -381,7 +359,6 @@ static void h3600_control_egpio(enum ipaq_egpio_type x, int setp)
381 EGPIO_H3600_LCD_PCI | 359 EGPIO_H3600_LCD_PCI |
382 EGPIO_H3600_LCD_5V_ON | 360 EGPIO_H3600_LCD_5V_ON |
383 EGPIO_H3600_LVDD_ON; 361 EGPIO_H3600_LVDD_ON;
384 do_blank(setp);
385 break; 362 break;
386 case IPAQ_EGPIO_LCD_ENABLE: 363 case IPAQ_EGPIO_LCD_ENABLE:
387 break; 364 break;
@@ -432,23 +409,8 @@ static void h3600_control_egpio(enum ipaq_egpio_type x, int setp)
432 } 409 }
433} 410}
434 411
435static unsigned long h3600_read_egpio(void)
436{
437 return h3600_egpio;
438}
439
440static int h3600_pm_callback(int req)
441{
442 if (ipaq_model_ops.pm_callback_aux)
443 return ipaq_model_ops.pm_callback_aux(req);
444 return 0;
445}
446
447static struct ipaq_model_ops h3600_model_ops __initdata = { 412static struct ipaq_model_ops h3600_model_ops __initdata = {
448 .generic_name = "3600",
449 .control = h3600_control_egpio, 413 .control = h3600_control_egpio,
450 .read = h3600_read_egpio,
451 .pm_callback = h3600_pm_callback
452}; 414};
453 415
454static void __init h3600_map_io(void) 416static void __init h3600_map_io(void)
diff --git a/arch/arm/mach-sa1100/include/mach/h3600.h b/arch/arm/mach-sa1100/include/mach/h3600.h
index e692ab3dd79f..8e8ccfc2f463 100644
--- a/arch/arm/mach-sa1100/include/mach/h3600.h
+++ b/arch/arm/mach-sa1100/include/mach/h3600.h
@@ -94,21 +94,11 @@ enum ipaq_egpio_type {
94}; 94};
95 95
96struct ipaq_model_ops { 96struct ipaq_model_ops {
97 const char *generic_name;
98 void (*control)(enum ipaq_egpio_type, int); 97 void (*control)(enum ipaq_egpio_type, int);
99 unsigned long (*read)(void);
100 void (*blank_callback)(int blank);
101 int (*pm_callback)(int req); /* Primary model callback */
102 int (*pm_callback_aux)(int req); /* Secondary callback (used by HAL modules) */
103}; 98};
104 99
105extern struct ipaq_model_ops ipaq_model_ops; 100extern struct ipaq_model_ops ipaq_model_ops;
106 101
107static __inline__ const char * h3600_generic_name(void)
108{
109 return ipaq_model_ops.generic_name;
110}
111
112static __inline__ void assign_h3600_egpio(enum ipaq_egpio_type x, int level) 102static __inline__ void assign_h3600_egpio(enum ipaq_egpio_type x, int level)
113{ 103{
114 if (ipaq_model_ops.control) 104 if (ipaq_model_ops.control)
@@ -127,42 +117,6 @@ static __inline__ void set_h3600_egpio(enum ipaq_egpio_type x)
127 ipaq_model_ops.control(x,1); 117 ipaq_model_ops.control(x,1);
128} 118}
129 119
130static __inline__ unsigned long read_h3600_egpio(void)
131{
132 if (ipaq_model_ops.read)
133 return ipaq_model_ops.read();
134 return 0;
135}
136
137static __inline__ int h3600_register_blank_callback(void (*f)(int))
138{
139 ipaq_model_ops.blank_callback = f;
140 return 0;
141}
142
143static __inline__ void h3600_unregister_blank_callback(void (*f)(int))
144{
145 ipaq_model_ops.blank_callback = NULL;
146}
147
148
149static __inline__ int h3600_register_pm_callback(int (*f)(int))
150{
151 ipaq_model_ops.pm_callback_aux = f;
152 return 0;
153}
154
155static __inline__ void h3600_unregister_pm_callback(int (*f)(int))
156{
157 ipaq_model_ops.pm_callback_aux = NULL;
158}
159
160static __inline__ int h3600_power_management(int req)
161{
162 if (ipaq_model_ops.pm_callback)
163 return ipaq_model_ops.pm_callback(req);
164 return 0;
165}
166 120
167#endif /* ASSEMBLY */ 121#endif /* ASSEMBLY */
168 122