pxa27x_keypad.c (cdd38c5f1ce4398ec58fec95904b75824daab7b5) | pxa27x_keypad.c (a4b4fa510181526c496052c1be320c0fcb05826c) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * linux/drivers/input/keyboard/pxa27x_keypad.c 4 * 5 * Driver for the pxa27x matrix keyboard controller. 6 * 7 * Created: Feb 22, 2007 8 * Author: Rodolfo Giometti <giometti@linux.it> --- 646 unchanged lines hidden (view full) --- 655static void pxa27x_keypad_close(struct input_dev *dev) 656{ 657 struct pxa27x_keypad *keypad = input_get_drvdata(dev); 658 659 /* Disable clock unit */ 660 clk_disable_unprepare(keypad->clk); 661} 662 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * linux/drivers/input/keyboard/pxa27x_keypad.c 4 * 5 * Driver for the pxa27x matrix keyboard controller. 6 * 7 * Created: Feb 22, 2007 8 * Author: Rodolfo Giometti <giometti@linux.it> --- 646 unchanged lines hidden (view full) --- 655static void pxa27x_keypad_close(struct input_dev *dev) 656{ 657 struct pxa27x_keypad *keypad = input_get_drvdata(dev); 658 659 /* Disable clock unit */ 660 clk_disable_unprepare(keypad->clk); 661} 662 |
663#ifdef CONFIG_PM_SLEEP | |
664static int pxa27x_keypad_suspend(struct device *dev) 665{ 666 struct platform_device *pdev = to_platform_device(dev); 667 struct pxa27x_keypad *keypad = platform_get_drvdata(pdev); 668 669 /* 670 * If the keypad is used a wake up source, clock can not be disabled. 671 * Or it can not detect the key pressing. --- 29 unchanged lines hidden (view full) --- 701 pxa27x_keypad_config(keypad); 702 } 703 704 mutex_unlock(&input_dev->mutex); 705 } 706 707 return ret; 708} | 663static int pxa27x_keypad_suspend(struct device *dev) 664{ 665 struct platform_device *pdev = to_platform_device(dev); 666 struct pxa27x_keypad *keypad = platform_get_drvdata(pdev); 667 668 /* 669 * If the keypad is used a wake up source, clock can not be disabled. 670 * Or it can not detect the key pressing. --- 29 unchanged lines hidden (view full) --- 700 pxa27x_keypad_config(keypad); 701 } 702 703 mutex_unlock(&input_dev->mutex); 704 } 705 706 return ret; 707} |
709#endif | |
710 | 708 |
711static SIMPLE_DEV_PM_OPS(pxa27x_keypad_pm_ops, 712 pxa27x_keypad_suspend, pxa27x_keypad_resume); | 709static DEFINE_SIMPLE_DEV_PM_OPS(pxa27x_keypad_pm_ops, 710 pxa27x_keypad_suspend, pxa27x_keypad_resume); |
713 714 715static int pxa27x_keypad_probe(struct platform_device *pdev) 716{ 717 const struct pxa27x_keypad_platform_data *pdata = 718 dev_get_platdata(&pdev->dev); 719 struct device_node *np = pdev->dev.of_node; 720 struct pxa27x_keypad *keypad; --- 104 unchanged lines hidden (view full) --- 825MODULE_DEVICE_TABLE(of, pxa27x_keypad_dt_match); 826#endif 827 828static struct platform_driver pxa27x_keypad_driver = { 829 .probe = pxa27x_keypad_probe, 830 .driver = { 831 .name = "pxa27x-keypad", 832 .of_match_table = of_match_ptr(pxa27x_keypad_dt_match), | 711 712 713static int pxa27x_keypad_probe(struct platform_device *pdev) 714{ 715 const struct pxa27x_keypad_platform_data *pdata = 716 dev_get_platdata(&pdev->dev); 717 struct device_node *np = pdev->dev.of_node; 718 struct pxa27x_keypad *keypad; --- 104 unchanged lines hidden (view full) --- 823MODULE_DEVICE_TABLE(of, pxa27x_keypad_dt_match); 824#endif 825 826static struct platform_driver pxa27x_keypad_driver = { 827 .probe = pxa27x_keypad_probe, 828 .driver = { 829 .name = "pxa27x-keypad", 830 .of_match_table = of_match_ptr(pxa27x_keypad_dt_match), |
833 .pm = &pxa27x_keypad_pm_ops, | 831 .pm = pm_sleep_ptr(&pxa27x_keypad_pm_ops), |
834 }, 835}; 836module_platform_driver(pxa27x_keypad_driver); 837 838MODULE_DESCRIPTION("PXA27x Keypad Controller Driver"); 839MODULE_LICENSE("GPL"); 840/* work with hotplug and coldplug */ 841MODULE_ALIAS("platform:pxa27x-keypad"); | 832 }, 833}; 834module_platform_driver(pxa27x_keypad_driver); 835 836MODULE_DESCRIPTION("PXA27x Keypad Controller Driver"); 837MODULE_LICENSE("GPL"); 838/* work with hotplug and coldplug */ 839MODULE_ALIAS("platform:pxa27x-keypad"); |