From patchwork Thu Sep 30 05:36:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abraham Arce X-Patchwork-Id: 218872 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8U5b13U024955 for ; Thu, 30 Sep 2010 05:37:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754104Ab0I3Fgq (ORCPT ); Thu, 30 Sep 2010 01:36:46 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:55120 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754084Ab0I3Fgp (ORCPT ); Thu, 30 Sep 2010 01:36:45 -0400 Received: from dlep36.itg.ti.com ([157.170.170.91]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id o8U5ajj2004628 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 30 Sep 2010 00:36:45 -0500 Received: from dlep26.itg.ti.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id o8U5ajNC019541; Thu, 30 Sep 2010 00:36:45 -0500 (CDT) Received: from dlee73.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id o8U5ailC002408; Thu, 30 Sep 2010 00:36:44 -0500 (CDT) Received: from localhost.localdomain (128.247.79.52) by dlee73.ent.ti.com (157.170.170.88) with Microsoft SMTP Server (TLS) id 8.1.358.0; Thu, 30 Sep 2010 00:36:44 -0500 From: Abraham Arce To: , CC: Abraham Arce Subject: [PATCH v6 8/8] Input: omap4 - pm runtime Date: Thu, 30 Sep 2010 00:36:40 -0500 Message-ID: <1285825000-25622-1-git-send-email-x0066660@ti.com> X-Mailer: git-send-email 1.6.3.3 MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 30 Sep 2010 05:37:01 +0000 (UTC) diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c index 45bd097..ed47e9a 100644 --- a/drivers/input/keyboard/omap4-keypad.c +++ b/drivers/input/keyboard/omap4-keypad.c @@ -29,6 +29,7 @@ #include #include #include +#include #include @@ -239,6 +240,9 @@ static int __devinit omap4_keypad_probe(struct platform_device *pdev) matrix_keypad_build_keymap(pdata->keymap_data, row_shift, input_dev->keycode, input_dev->keybit); + pm_runtime_enable(&pdev->dev); + pm_runtime_get_sync(&pdev->dev); + omap4_keypad_config(keypad_data); error = request_irq(keypad_data->irq, omap4_keypad_interrupt, @@ -277,6 +281,9 @@ static int __devexit omap4_keypad_remove(struct platform_device *pdev) struct omap4_keypad *keypad_data = platform_get_drvdata(pdev); struct resource *res; + pm_runtime_put_sync(&pdev->dev); + pm_runtime_disable(&pdev->dev); + free_irq(keypad_data->irq, keypad_data); input_unregister_device(keypad_data->input);