static int stmp3xxx_ts_suspend(struct platform_device *pdev, pm_message_t state) { #ifdef CONFIG_PM if (!device_may_wakeup(&pdev->dev)) { hw_lradc_unuse_channel(LRADC_CH2); hw_lradc_unuse_channel(LRADC_CH3); hw_lradc_unuse_channel(LRADC_CH5); } #endif return 0; }
static int __devexit mxskbd_remove(struct platform_device *pdev) { int i; struct mxskbd_data *d = platform_get_drvdata(pdev); #ifdef CONFIG_HAS_WAKELOCK wake_lock_destroy(&key_wake_lock); #endif for (i = 0; i < MAX_CH; i++) hw_lradc_unuse_channel(d->chan[i]); input_unregister_device(GET_INPUT_DEV(d)); if (d->btn_irq1 > 0) free_irq(d->btn_irq1, pdev); mxskbd_data_free(d); platform_set_drvdata(pdev, NULL); #ifdef ENABLE_BACKLIGHT_GPIO_CONTROL _keypad_set_backlight(0); #endif return 0; }
static int mxskbd_suspend(struct platform_device *pdev, pm_message_t state) { struct mxskbd_data *d = platform_get_drvdata(pdev); hw_lradc_stop_ladder(d->chan, LRADC_DELAY_TRIGGER_BUTTON); hw_lradc_set_delay_trigger_kick(LRADC_DELAY_TRIGGER_BUTTON, 0); hw_lradc_unuse_channel(d->chan); __raw_writel(BM_LRADC_CTRL1_LRADC0_IRQ_EN << d->chan, d->base + HW_LRADC_CTRL1_CLR); mxskbd_close(d->input); return 0; }
static int stmp3xxx_ts_remove(struct platform_device *pdev) { struct stmp3xxx_ts_info *info = platform_get_drvdata(pdev); platform_set_drvdata(pdev, NULL); hw_lradc_unuse_channel(LRADC_CH2); hw_lradc_unuse_channel(LRADC_CH3); hw_lradc_unuse_channel(LRADC_CH5); __raw_writel(BM_LRADC_CTRL1_LRADC5_IRQ_EN, REGS_LRADC_BASE + HW_LRADC_CTRL1_CLR); __raw_writel(BM_LRADC_CTRL1_TOUCH_DETECT_IRQ_EN, REGS_LRADC_BASE + HW_LRADC_CTRL1_CLR); free_irq(info->device_irq, info); free_irq(info->touch_irq, info); input_free_device(info->idev); enter_state_disabled(info); kfree(info->idev); kfree(info); return 0; }
static int __devexit mxskbd_remove(struct platform_device *pdev) { struct mxskbd_data *d = platform_get_drvdata(pdev); hw_lradc_unuse_channel(d->chan); input_unregister_device(GET_INPUT_DEV(d)); free_irq(d->irq, pdev); if (d->btn_irq > 0) free_irq(d->btn_irq, pdev); mxskbd_data_free(d); platform_set_drvdata(pdev, NULL); return 0; }
static int mxskbd_suspend(struct platform_device *pdev, pm_message_t state) { int i; struct mxskbd_data *d = platform_get_drvdata(pdev); for (i = 0; i < MAX_CH; i++) { hw_lradc_stop_ladder(d->chan[i], LRADC_DELAY_TRIGGER_BUTTON); hw_lradc_unuse_channel(d->chan[i]); } hw_lradc_set_delay_trigger_kick(LRADC_DELAY_TRIGGER_BUTTON, 0); __raw_writel(BM_LRADC_CTRL1_LRADC0_IRQ_EN << d->chan[0], d->base + HW_LRADC_CTRL1_CLR); mxskbd_close(d->input); #ifdef ENABLE_BACKLIGHT_GPIO_CONTROL _keypad_set_backlight(0); #endif return 0; }