From patchwork Tue Dec 14 15:38:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhrajyoti D X-Patchwork-Id: 410471 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 oBEFdKUl001772 for ; Tue, 14 Dec 2010 15:39:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757850Ab0LNPjG (ORCPT ); Tue, 14 Dec 2010 10:39:06 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:55736 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757490Ab0LNPjF (ORCPT ); Tue, 14 Dec 2010 10:39:05 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id oBEFcwoN026437 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 Dec 2010 09:39:00 -0600 Received: from localhost.localdomain (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id oBEFcvVe012413; Tue, 14 Dec 2010 21:08:57 +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: Tue, 14 Dec 2010 21:08:57 +0530 Message-Id: <1292341137-14783-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]); Tue, 14 Dec 2010 15:39:21 +0000 (UTC) diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c index 45bd097..36239e2 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,7 +240,8 @@ 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); error = request_irq(keypad_data->irq, omap4_keypad_interrupt, IRQF_TRIGGER_RISING, @@ -255,8 +257,9 @@ static int __devinit omap4_keypad_probe(struct platform_device *pdev) goto err_free_irq; } - + omap4_keypad_config(keypad_data); platform_set_drvdata(pdev, keypad_data); + return 0; err_free_irq: @@ -278,6 +281,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);