From patchwork Fri Jul 22 13:09:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Munegowda, Keshava" X-Patchwork-Id: 999072 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6MDCBfs012382 for ; Fri, 22 Jul 2011 13:12:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754235Ab1GVNLw (ORCPT ); Fri, 22 Jul 2011 09:11:52 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:52802 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754163Ab1GVNLv (ORCPT ); Fri, 22 Jul 2011 09:11:51 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id p6MDBl18025192 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 22 Jul 2011 08:11:49 -0500 Received: from dbde71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id p6MDBhvb027987; Fri, 22 Jul 2011 18:41:43 +0530 (IST) Received: from dbdp31.itg.ti.com (172.24.170.98) by DBDE71.ent.ti.com (172.24.170.149) with Microsoft SMTP Server id 8.3.106.1; Fri, 22 Jul 2011 18:41:43 +0530 Received: from localhost.localdomain (a0393220-desktop.india.ti.com [172.24.136.86]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p6MDBbSd014076; Fri, 22 Jul 2011 18:41:38 +0530 (IST) From: Keshava Munegowda To: , , CC: Keshava Munegowda , , , , , , Keshava Munegowda Subject: [PATCH] mfd: omap-usb-host: fix clock API usage on usbhs_disable() Date: Fri, 22 Jul 2011 18:39:30 +0530 Message-ID: <1311340170-28773-1-git-send-email-keshava_mgowda@ti.com> X-Mailer: git-send-email 1.6.0.4 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 22 Jul 2011 13:12:11 +0000 (UTC) From: Keshava Munegowda usbhs_disable function was invoking clk_enable() instead of clk_disable(), thus only increasing the clock usage counter and preventing this particular clock from being ever turned off. Because of this, the power domain of omap4 the USB Host subsystem would never reach lower power states.This patch calls clk_disable() in usbhs_disable function Signed-off-by: Keshava Munegowda Acked-by: Felipe Balbi --- drivers/mfd/omap-usb-host.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c index 1717144..29601e7 100644 --- a/drivers/mfd/omap-usb-host.c +++ b/drivers/mfd/omap-usb-host.c @@ -998,9 +998,9 @@ static void usbhs_disable(struct device *dev) if (is_omap_usbhs_rev2(omap)) { if (is_ehci_tll_mode(pdata->port_mode[0])) - clk_enable(omap->usbtll_p1_fck); + clk_disable(omap->usbtll_p1_fck); if (is_ehci_tll_mode(pdata->port_mode[1])) - clk_enable(omap->usbtll_p2_fck); + clk_disable(omap->usbtll_p2_fck); clk_disable(omap->utmi_p2_fck); clk_disable(omap->utmi_p1_fck); }