2011-7-25 19:58:43

 

 

2011-7-25 19:58:43


音量按键

pxa3xx_keypad_interrupt

receive the dbus message for volume control--------->


static irqreturn_t pxa3xx_keypad_interrupt(int irq, void *dev_id)
{
 struct pxa3xx_keypad *keypad = dev_id;
#ifdef CONFIG_KEYBOARD_ASTRI
 uint32_t kpc;

 spin_lock_irq(&keypad->rotary_lock);
 printk("pxa3xx_keypad_interrupt\n");
 kpc = keypad_readl(keypad->mmio_base, KPC);
#else
 uint32_t kpc = keypad_readl(keypad->mmio_base, KPC);
#endif

#ifdef CONFIG_LITTLETON_BACKLIGHT
 extern led_keypad_press(void);
 led_keypad_press();
#endif

 if (kpc & KPC_MI)
  pxa3xx_keypad_scan_matrix(keypad);

 if (kpc & KPC_DI)
  pxa3xx_keypad_scan_direct(keypad);

#ifdef CONFIG_KEYBOARD_ASTRI
 /* Driver all columns to high */
 kpc = keypad_readl(keypad->mmio_base, KPC);
 kpc |= (KPC_MS_ALL);
 keypad_writel(keypad->mmio_base, KPC, kpc);
 spin_unlock_irq(&keypad->rotary_lock);
#ifdef CONFIG_IPM
 ipm_event_notify(IPM_EVENT_UI, IPM_EVENT_DEVICE_KEYPAD, NULL, 0);
#endif
#endif
        return IRQ_HANDLED;
}


 

你可能感兴趣的:(UI,struct,null,Matrix,keyboard)