pxa27x_keypad.c (e4156979c7d34e5197b16fa31c1c7549eae675e5) | pxa27x_keypad.c (f9f6def88ace892f9f90f639664f0e203bafdb22) |
---|---|
1/* 2 * linux/drivers/input/keyboard/pxa27x_keypad.c 3 * 4 * Driver for the pxa27x matrix keyboard controller. 5 * 6 * Created: Feb 22, 2007 7 * Author: Rodolfo Giometti <giometti@linux.it> 8 * --- 647 unchanged lines hidden (view full) --- 656static void pxa27x_keypad_close(struct input_dev *dev) 657{ 658 struct pxa27x_keypad *keypad = input_get_drvdata(dev); 659 660 /* Disable clock unit */ 661 clk_disable_unprepare(keypad->clk); 662} 663 | 1/* 2 * linux/drivers/input/keyboard/pxa27x_keypad.c 3 * 4 * Driver for the pxa27x matrix keyboard controller. 5 * 6 * Created: Feb 22, 2007 7 * Author: Rodolfo Giometti <giometti@linux.it> 8 * --- 647 unchanged lines hidden (view full) --- 656static void pxa27x_keypad_close(struct input_dev *dev) 657{ 658 struct pxa27x_keypad *keypad = input_get_drvdata(dev); 659 660 /* Disable clock unit */ 661 clk_disable_unprepare(keypad->clk); 662} 663 |
664#ifdef CONFIG_PM | 664#ifdef CONFIG_PM_SLEEP |
665static int pxa27x_keypad_suspend(struct device *dev) 666{ 667 struct platform_device *pdev = to_platform_device(dev); 668 struct pxa27x_keypad *keypad = platform_get_drvdata(pdev); 669 670 /* 671 * If the keypad is used a wake up source, clock can not be disabled. 672 * Or it can not detect the key pressing. --- 27 unchanged lines hidden (view full) --- 700 pxa27x_keypad_config(keypad); 701 } 702 703 mutex_unlock(&input_dev->mutex); 704 } 705 706 return 0; 707} | 665static int pxa27x_keypad_suspend(struct device *dev) 666{ 667 struct platform_device *pdev = to_platform_device(dev); 668 struct pxa27x_keypad *keypad = platform_get_drvdata(pdev); 669 670 /* 671 * If the keypad is used a wake up source, clock can not be disabled. 672 * Or it can not detect the key pressing. --- 27 unchanged lines hidden (view full) --- 700 pxa27x_keypad_config(keypad); 701 } 702 703 mutex_unlock(&input_dev->mutex); 704 } 705 706 return 0; 707} |
708 709static const struct dev_pm_ops pxa27x_keypad_pm_ops = { 710 .suspend = pxa27x_keypad_suspend, 711 .resume = pxa27x_keypad_resume, 712}; | |
713#endif 714 | 708#endif 709 |
710static SIMPLE_DEV_PM_OPS(pxa27x_keypad_pm_ops, 711 pxa27x_keypad_suspend, pxa27x_keypad_resume); 712 713 |
|
715static int pxa27x_keypad_probe(struct platform_device *pdev) 716{ 717 struct pxa27x_keypad_platform_data *pdata = pdev->dev.platform_data; 718 struct device_node *np = pdev->dev.of_node; 719 struct pxa27x_keypad *keypad; 720 struct input_dev *input_dev; 721 struct resource *res; 722 int irq, error; --- 144 unchanged lines hidden (view full) --- 867 868static struct platform_driver pxa27x_keypad_driver = { 869 .probe = pxa27x_keypad_probe, 870 .remove = pxa27x_keypad_remove, 871 .driver = { 872 .name = "pxa27x-keypad", 873 .of_match_table = of_match_ptr(pxa27x_keypad_dt_match), 874 .owner = THIS_MODULE, | 714static int pxa27x_keypad_probe(struct platform_device *pdev) 715{ 716 struct pxa27x_keypad_platform_data *pdata = pdev->dev.platform_data; 717 struct device_node *np = pdev->dev.of_node; 718 struct pxa27x_keypad *keypad; 719 struct input_dev *input_dev; 720 struct resource *res; 721 int irq, error; --- 144 unchanged lines hidden (view full) --- 866 867static struct platform_driver pxa27x_keypad_driver = { 868 .probe = pxa27x_keypad_probe, 869 .remove = pxa27x_keypad_remove, 870 .driver = { 871 .name = "pxa27x-keypad", 872 .of_match_table = of_match_ptr(pxa27x_keypad_dt_match), 873 .owner = THIS_MODULE, |
875#ifdef CONFIG_PM | |
876 .pm = &pxa27x_keypad_pm_ops, | 874 .pm = &pxa27x_keypad_pm_ops, |
877#endif | |
878 }, 879}; 880module_platform_driver(pxa27x_keypad_driver); 881 882MODULE_DESCRIPTION("PXA27x Keypad Controller Driver"); 883MODULE_LICENSE("GPL"); | 875 }, 876}; 877module_platform_driver(pxa27x_keypad_driver); 878 879MODULE_DESCRIPTION("PXA27x Keypad Controller Driver"); 880MODULE_LICENSE("GPL"); |