From patchwork Mon Mar 21 13:50:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kalle.jokiniemi@nokia.com X-Patchwork-Id: 648001 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 p2LDqAY7010369 for ; Mon, 21 Mar 2011 13:52:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752869Ab1CUNwB (ORCPT ); Mon, 21 Mar 2011 09:52:01 -0400 Received: from smtp.nokia.com ([147.243.1.47]:64549 "EHLO mgw-sa01.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752015Ab1CUNv7 (ORCPT ); Mon, 21 Mar 2011 09:51:59 -0400 Received: from nokia.com (localhost [127.0.0.1]) by mgw-sa01.nokia.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id p2LDpu7n031983; Mon, 21 Mar 2011 15:51:56 +0200 Received: from kalle-t43.nmp.nokia.com ([trdhcp215150.nmp.nokia.com [172.22.215.150]]) by mgw-sa01.nokia.com with RELAY id p2LDpZt2031357 ; Mon, 21 Mar 2011 15:51:37 +0200 From: Kalle Jokiniemi To: linux-usb@vger.kernel.org, linux-omap@vger.kernel.org Cc: balbi@ti.com, tony@atomide.com, heikki.krogerus@nokia.com, jhnikula@gmail.com, ilkka.koskinen@nokia.com, Kalle Jokiniemi Subject: [PATCH 1/2] USB: twl4030-usb: do board specific phy_power up/down Date: Mon, 21 Mar 2011 15:50:19 +0200 Message-Id: <1300715420-25602-2-git-send-email-kalle.jokiniemi@nokia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1300715420-25602-1-git-send-email-kalle.jokiniemi@nokia.com> References: <1300715420-25602-1-git-send-email-kalle.jokiniemi@nokia.com> X-Nokia-AV: Clean 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 (demeter1.kernel.org [140.211.167.41]); Mon, 21 Mar 2011 13:52:10 +0000 (UTC) diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c index 6ca505f..dea99b1 100644 --- a/drivers/usb/otg/twl4030-usb.c +++ b/drivers/usb/otg/twl4030-usb.c @@ -348,13 +348,20 @@ static void twl4030_i2c_access(struct twl4030_usb *twl, int on) static void __twl4030_phy_power(struct twl4030_usb *twl, int on) { - u8 pwr = twl4030_usb_read(twl, PHY_PWR_CTRL); + u8 pwr; + struct twl4030_usb_data *board = twl->dev->platform_data; + + pwr = twl4030_usb_read(twl, PHY_PWR_CTRL); if (on) pwr &= ~PHY_PWR_PHYPWD; else pwr |= PHY_PWR_PHYPWD; + /* do board specific power up/down, if available */ + if (board->phy_power) + board->phy_power(twl->dev, 0, on); + WARN_ON(twl4030_usb_write_verify(twl, PHY_PWR_CTRL, pwr) < 0); }