Skip to contentSkip to conversation

finding out the attached device current requirement

DISCUSSION Pavan Kondeti 2 participants 3 messages Mar 3, 2011 Arm Qualcomm mailing list

lore
Share & tools
lore
#0 lore raw

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 we can not assume that device will be configured by the time DEVICE_ADD notification is sent. And also there is a possibility that configuration change request from use. Is it a good idea to add DEVICE_CONFIG_CHANGE notification to solve this problem?

Thanks,
Pavan

Signature · 2 lines
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#1 lore raw
Quoted 10 lines · Pavan Kondeti

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 ??

Signature · 1 line
balbi
#2 lore raw
Quoted 12 lines · Felipe Balbi
Quoted 10 lines · Pavan Kondeti

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

Quoted 2 lines

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

Signature · 2 lines
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.