From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavan Kondeti Subject: Re: finding out the attached device current requirement Date: Thu, 03 Mar 2011 17:01:29 +0530 Message-ID: <4D6F7C11.1010807@codeaurora.org> References: <4D6F56D2.4060803@codeaurora.org> <20110303094512.GI2644@legolas.emea.dhcp.ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from wolverine01.qualcomm.com ([199.106.114.254]:21874 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754797Ab1CCLbd (ORCPT ); Thu, 3 Mar 2011 06:31:33 -0500 In-Reply-To: <20110303094512.GI2644@legolas.emea.dhcp.ti.com> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: balbi@ti.com Cc: "linux-usb@vger.kernel.org" , "linux-arm-msm@vger.kernel.org" On 3/3/2011 3:15 PM, Felipe Balbi wrote: > On Thu, Mar 03, 2011 at 02:22:34PM +0530, Pavan Kondeti wrote: >> Hi >> >> I am adding ACA (Accessory Charger Adapter) detection support for MSM >> OTG driver. Battery charging spec introduced ACA to facilitate charging >> when acting as a host. The host does not have to supply power on VBUS >> when ACA is connected. Host device can also draw some amount of current. >> The amount of current is determined by subtracting the attached >> peripheral current requirement from the charger rating current. I am >> looking for a way to find out the attached peripheral's current >> requirement. We already DEVICE_ADD and DEVICE_REMOVE notifications. But > > bMaxPower from the device descriptor ?? > You are referring to bMaxPower in Configuration descriptor right? When a multi configuration device is connected, configuration can be changed by user at any time. The same can also be possible with a user claimed port. So I am looking for a notification from USB core when a SET_CONFIGURATION request is sent to a device connected on the root hub. I will reduce my power (ACA rating current - bMaxpower of the config being selected) upon this notification. Thanks, Pavan -- Sent by a consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.