From patchwork Mon Dec 27 05:51:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhrajyoti Datta X-Patchwork-Id: 433471 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 oBRKCV6i025997 for ; Mon, 27 Dec 2010 20:14:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751872Ab0L0Fv5 (ORCPT ); Mon, 27 Dec 2010 00:51:57 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:40051 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751543Ab0L0Fv4 (ORCPT ); Mon, 27 Dec 2010 00:51:56 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id oBR5ppXx012882 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 26 Dec 2010 23:51:54 -0600 Received: from localhost.localdomain (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id oBR5pkgB000102; Mon, 27 Dec 2010 11:21:50 +0530 (IST) From: shubhrajyoti@ti.com To: linux-omap@vger.kernel.org, linux-input@vger.kernel.org Cc: Abraham Arce , Kevin Hilman , Shubhrajyoti D Subject: [PATCH v8 3/3] OMAP4:keypad: PM runtime Date: Mon, 27 Dec 2010 11:21:46 +0530 Message-Id: <1293429106-16543-4-git-send-email-shubhrajyoti@ti.com> X-Mailer: git-send-email 1.5.6.6 In-Reply-To: <1293429106-16543-3-git-send-email-shubhrajyoti@ti.com> References: <1293429106-16543-1-git-send-email-shubhrajyoti@ti.com> <1293429106-16543-2-git-send-email-shubhrajyoti@ti.com> <1293429106-16543-3-git-send-email-shubhrajyoti@ti.com> 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]); Mon, 27 Dec 2010 20:14:42 +0000 (UTC) diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c index 45bd097..fcfbb9b 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, @@ -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);