From patchwork Fri Apr 1 21:02:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 682411 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 p31L2fna022900 for ; Fri, 1 Apr 2011 21:02:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754849Ab1DAVCk (ORCPT ); Fri, 1 Apr 2011 17:02:40 -0400 Received: from mxvs2.esa.t-systems.com ([81.7.202.143]:35440 "EHLO mxvs2.esa.t-systems.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753582Ab1DAVCk (ORCPT ); Fri, 1 Apr 2011 17:02:40 -0400 Received: from unknown (HELO nl-exc-01.intra.local) ([82.210.235.24]) by mx.esa.t-systems.com with ESMTP; 01 Apr 2011 21:02:34 +0000 Received: from NL-EXC-05.intra.local ([10.100.249.121]) by nl-exc-01.intra.local with Microsoft SMTPSVC(6.0.3790.3959); Fri, 1 Apr 2011 23:02:34 +0200 Received: from [10.123.215.105] ([10.123.215.105]) by NL-EXC-05.intra.local with Microsoft SMTPSVC(6.0.3790.4675); Fri, 1 Apr 2011 23:02:13 +0200 Message-ID: <4D963D4F.2050203@tomtom.com> Date: Fri, 01 Apr 2011 23:02:07 +0200 From: Matthias Kaehlcke User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: Felipe Balbi , David Brownell CC: linux-usb@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCH] twl4030-usb: Report correct vbus value for accessory charger adapters1 X-OriginalArrivalTime: 01 Apr 2011 21:02:13.0973 (UTC) FILETIME=[13597050:01CBF0B0] 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]); Fri, 01 Apr 2011 21:02:41 +0000 (UTC) diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c index e01b073..efeb4d1 100644 --- a/drivers/usb/otg/twl4030-usb.c +++ b/drivers/usb/otg/twl4030-usb.c @@ -160,6 +160,7 @@ struct twl4030_usb { int irq; u8 linkstat; + bool vbus_supplied; u8 asleep; bool irq_enabled; }; @@ -250,6 +251,8 @@ static enum usb_xceiv_events twl4030_usb_linkstat(struct twl4030_usb *twl) int status; int linkstat = USB_EVENT_NONE; + twl->vbus_supplied = false; + /* * For ID/VBUS sensing, see manual section 15.4.8 ...