/* * TWL4030 Power Button Input Driver * * Copyright (C) 2008-2009 Nokia Corporation * * Written by Peter De Schrijver <[email protected]> * Several fixes by Felipe Balbi <[email protected]> * * This file is subject to the terms and conditions of the GNU General * Public License. See the file "COPYING" in the main directory of this * archive for more details. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include <linux/module.h> #include <linux/init.h> #include <linux/kernel.h> #include <linux/errno.h> #include <linux/input.h> #include <linux/interrupt.h> #include <linux/of.h> #include <linux/platform_device.h> #include <linux/mfd/twl.h> #define PWR_PWRON_IRQ … #define STS_HW_CONDITIONS … static irqreturn_t powerbutton_irq(int irq, void *_pwr) { … } static int twl4030_pwrbutton_probe(struct platform_device *pdev) { … } #ifdef CONFIG_OF static const struct of_device_id twl4030_pwrbutton_dt_match_table[] = …; MODULE_DEVICE_TABLE(of, twl4030_pwrbutton_dt_match_table); #endif static struct platform_driver twl4030_pwrbutton_driver = …; module_platform_driver(…) …; MODULE_ALIAS(…) …; MODULE_DESCRIPTION(…) …; MODULE_LICENSE(…) …; MODULE_AUTHOR(…) …; MODULE_AUTHOR(…) …;