pxa27x.c (f43dc23d5ea91fca257be02138a255f02d98e806) pxa27x.c (a3f4c927d379cfaa597bc8ff75dc9d28f8d9200e)
1/*
2 * linux/arch/arm/mach-pxa/pxa27x.c
3 *
4 * Author: Nicolas Pitre
5 * Created: Nov 05, 2002
6 * Copyright: MontaVista Software Inc.
7 *
8 * Code specific to PXA27x aka Bulverde.

--- 4 unchanged lines hidden (view full) ---

13 */
14#include <linux/module.h>
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/suspend.h>
18#include <linux/platform_device.h>
19#include <linux/sysdev.h>
20#include <linux/io.h>
1/*
2 * linux/arch/arm/mach-pxa/pxa27x.c
3 *
4 * Author: Nicolas Pitre
5 * Created: Nov 05, 2002
6 * Copyright: MontaVista Software Inc.
7 *
8 * Code specific to PXA27x aka Bulverde.

--- 4 unchanged lines hidden (view full) ---

13 */
14#include <linux/module.h>
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/suspend.h>
18#include <linux/platform_device.h>
19#include <linux/sysdev.h>
20#include <linux/io.h>
21#include <linux/irq.h>
21
22#include <asm/mach/map.h>
23#include <mach/hardware.h>
24#include <asm/irq.h>
25#include <mach/irqs.h>
26#include <mach/gpio.h>
27#include <mach/pxa27x.h>
28#include <mach/reset.h>

--- 309 unchanged lines hidden (view full) ---

338}
339#else
340static inline void pxa27x_init_pm(void) {}
341#endif
342
343/* PXA27x: Various gpios can issue wakeup events. This logic only
344 * handles the simple cases, not the WEMUX2 and WEMUX3 options
345 */
22
23#include <asm/mach/map.h>
24#include <mach/hardware.h>
25#include <asm/irq.h>
26#include <mach/irqs.h>
27#include <mach/gpio.h>
28#include <mach/pxa27x.h>
29#include <mach/reset.h>

--- 309 unchanged lines hidden (view full) ---

339}
340#else
341static inline void pxa27x_init_pm(void) {}
342#endif
343
344/* PXA27x: Various gpios can issue wakeup events. This logic only
345 * handles the simple cases, not the WEMUX2 and WEMUX3 options
346 */
346static int pxa27x_set_wake(unsigned int irq, unsigned int on)
347static int pxa27x_set_wake(struct irq_data *d, unsigned int on)
347{
348{
348 int gpio = IRQ_TO_GPIO(irq);
349 int gpio = IRQ_TO_GPIO(d->irq);
349 uint32_t mask;
350
351 if (gpio >= 0 && gpio < 128)
352 return gpio_set_wake(gpio, on);
353
350 uint32_t mask;
351
352 if (gpio >= 0 && gpio < 128)
353 return gpio_set_wake(gpio, on);
354
354 if (irq == IRQ_KEYPAD)
355 if (d->irq == IRQ_KEYPAD)
355 return keypad_set_wake(on);
356
356 return keypad_set_wake(on);
357
357 switch (irq) {
358 switch (d->irq) {
358 case IRQ_RTCAlrm:
359 mask = PWER_RTC;
360 break;
361 case IRQ_USB:
362 mask = 1u << 26;
363 break;
364 default:
365 return -EINVAL;

--- 105 unchanged lines hidden ---
359 case IRQ_RTCAlrm:
360 mask = PWER_RTC;
361 break;
362 case IRQ_USB:
363 mask = 1u << 26;
364 break;
365 default:
366 return -EINVAL;

--- 105 unchanged lines hidden ---