From: Tomoya MORINAGA Date: Fri, 3 Feb 2012 07:35:26 +0000 (+0900) Subject: usb: gadget: pch_udc: Detecting VBUS through GPIO X-Git-Tag: v3.4-rc1~184^2~22^2~39^2~28 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd63180b758d5972fc90621af0741d5bfae1a684;p=pandora-kernel.git usb: gadget: pch_udc: Detecting VBUS through GPIO Problem: In USB Suspend, pch_udc handles 'disconnect'. Root cause: The current pch_udc is not monitoring VBUS. When USB cable is disconnected, USB Device Controller generates an interrupt of USB Suspend. pch_udc cannot distinguish it is USB Suspend or disconnect. Therefore, pch_udc handles 'disconnect' after an interrupt of USB Suspend happend. Solution: VBUS is detected through GPIO. After an interrupt produced USB Suspend, if VBUS is Low, pch_udc handles 'disconnect'. If VBUS is High, pch_udc handles 'suspend'. Signed-off-by: Tomoya MORINAGA Signed-off-by: Felipe Balbi --- Reading git-diff-tree failed