From patchwork Wed Dec 15 04:09:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhrajyoti D X-Patchwork-Id: 412381 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 oBF4A8YE017472 for ; Wed, 15 Dec 2010 04:10:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755497Ab0LOEKH (ORCPT ); Tue, 14 Dec 2010 23:10:07 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:41852 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753167Ab0LOEKG (ORCPT ); Tue, 14 Dec 2010 23:10:06 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id oBF4A16W012235 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 Dec 2010 22:10:04 -0600 Received: from localhost.localdomain (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id oBF49wRM002531; Wed, 15 Dec 2010 09:39:59 +0530 (IST) From: Shubhrajyoti D To: linux-input@vger.kernel.org Cc: linux-omap@vger.kernel.org, Abraham Arce , Kevin Hilman Subject: [PATCH v7] OMAP4:keypad: PM runtime Date: Wed, 15 Dec 2010 09:39:58 +0530 Message-Id: <1292386198-3587-1-git-send-email-a0393217@india.ti.com> X-Mailer: git-send-email 1.5.6.6 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]); Wed, 15 Dec 2010 04:10:12 +0000 (UTC) diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c index 45bd097..3d35774 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,8 +240,11 @@ 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); - omap4_keypad_config(keypad_data); + 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, IRQF_TRIGGER_RISING, "omap4-keypad", keypad_data); @@ -278,6 +282,10 @@ static int __devexit omap4_keypad_remove(struct platform_device *pdev) struct resource *res; free_irq(keypad_data->irq, keypad_data); + + pm_runtime_put_sync(&pdev->dev); + pm_runtime_disable(&pdev->dev); + input_unregister_device(keypad_data->input); iounmap(keypad_data->base);