Adding USB charge current property in the Linux Battery core
Hi,
For a better performance in USB charging operation, the DA9052/53 charging current can be configured in accordance with the USB host current delivering capacity (known through USB drivers negotiation).
To implement this useful feature, a new writable property "USB charge current" needs to be added in the Linux battery core.
Let me know your views on it.
Regards,
Ashish
Hi,
Quoted 8 lines · On Wed, Nov 09, 2011 at 01:43:37PM +0530, ashishj3 wrote:
For a better performance in USB charging operation, the DA9052/53 charging current can be configured in accordance with the USB host current delivering capacity (known through USB drivers negotiation).
To implement this useful feature, a new writable property "USB charge current" needs to be added in the Linux battery core.
Let me know your views on it.
that's the wrong way to do it. What we need is to use the transceiver notifications to notify every time someone calls usb_gadget_vbus_draw() and pass the mA parameter as argument to the event notification.
Charger driver should 'subscribe' to transceiver notifications and use the mA argument to reconfigure charging.
Signature · 1 line
balbi
Quoted 18 lines
-----Original Message-----
From: Felipe Balbi [mailto:[email protected]]
Sent: Wednesday, November 09, 2011 1:50 PM
To: Ashish Jangam
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Mark Brown
Subject: Re: Adding USB charge current property in the Linux Battery coreHi,
Quoted 1 line · On Wed, Nov 09, 2011 at 01:43:37PM +0530, ashishj3 wrote:
For a better performance in USB charging operation, the DA9052/53
charging
Quoted 4 lines
current can be configured in accordance with the USB host current delivering capacity (known through USB drivers negotiation).
To implement this useful feature, a new writable property "USB charge
Quoted 9 lines
current"
Quoted 3 lines
needs to be added in the Linux battery core.
Let me know your views on it.
that's the wrong way to do it. What we need is to use the transceiver notifications to notify every time someone calls
usb_gadget_vbus_draw()and pass the mA parameter as argument to the event notification.
This means that we need to modify the function usb_gadget_vbus_draw() to add a call like blocking_notifier_call_chain() but will this be fine with the usb gadget driver maintainers?
Quoted 5 lines
Charger driver should 'subscribe' to transceiver notifications and use the mA argument to reconfigure charging.
--
balbi
���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m����������?�I�
Quoted 23 lines · Ashish Jangam
Quoted 23 lines
-----Original Message-----
From: Felipe Balbi [mailto:[email protected]]
Sent: Wednesday, November 09, 2011 1:50 PM
To: Ashish Jangam
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Mark Brown
Subject: Re: Adding USB charge current property in the Linux Battery coreHi,
Quoted 1 line · On Wed, Nov 09, 2011 at 01:43:37PM +0530, ashishj3 wrote:
For a better performance in USB charging operation, the DA9052/53
charging
Quoted 4 lines
current can be configured in accordance with the USB host current delivering capacity (known through USB drivers negotiation).
To implement this useful feature, a new writable property "USB charge
current"
Quoted 3 lines
needs to be added in the Linux battery core.
Let me know your views on it.
Quoted 8 lines
Quoted 4 lines
that's the wrong way to do it. What we need is to use the transceiver notifications to notify every time someone calls
usb_gadget_vbus_draw()and pass the mA parameter as argument to the event notification.This means that we need to modify the function
usb_gadget_vbus_draw()to add a call likeblocking_notifier_call_chain()but will this be fine with the usb gadget driver maintainers?
I am the USB gadget driver maintainer and I have plans to do that myself. First thing we need to do is convert the final UDC drivers to the udc Class which I wrote and Sebastian helped brushing it up, then we uninline the usb_gadget_* wrappers and move them to drivers/usb/gadget/udc-core.c, then we can move the transceiver notifier to the UDC as it makes more sense, and convert blocking into atomic notifier.
After that we can add notifications to all gadget events/API/etc...
Signature · 1 line
balbi
Quoted 44 lines
-----Original Message-----
From: Felipe Balbi [mailto:[email protected]]
Sent: Wednesday, November 09, 2011 5:50 PM
To: Ashish Jangam
Cc: [email protected]; [email protected]; linux- [email protected]; [email protected]; [email protected]; Mark Brown; [email protected]
Subject: Re: Adding USB charge current property in the Linux Battery coreQuoted 8 lines · Ashish Jangam
Quoted 8 lines
-----Original Message-----
From: Felipe Balbi [mailto:[email protected]]
Sent: Wednesday, November 09, 2011 1:50 PM
To: Ashish Jangam
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Mark Brown
Subject: Re: Adding USB charge current property in the Linux Batterycore
Quoted 15 lines
Quoted 15 lines
Hi,
Quoted 1 line · On Wed, Nov 09, 2011 at 01:43:37PM +0530, ashishj3 wrote:
For a better performance in USB charging operation, the DA9052/53
charging
Quoted 4 lines
current can be configured in accordance with the USB host current delivering capacity (known through USB drivers negotiation).
To implement this useful feature, a new writable property "USB charge
current"
Quoted 3 lines
needs to be added in the Linux battery core.
Let me know your views on it.
Quoted 7 lines
Quoted 4 lines
that's the wrong way to do it. What we need is to use the transceiver notifications to notify every time someone calls
usb_gadget_vbus_draw()and pass the mA parameter as argument to the event notification.This means that we need to modify the function
usb_gadget_vbus_draw()to add a call likeblocking_notifier_call_chain()but will this be finewith
Quoted 1 line
the usb gadget driver maintainers?
Quoted 7 lines
I am the USB gadget driver maintainer and I have plans to do that myself. First thing we need to do is convert the final UDC drivers to the udc Class which I wrote and Sebastian helped brushing it up, then we uninline the usb_gadget_* wrappers and move them to
drivers/usb/gadget/udc-core.c, then we can move the transceiver notifier to the UDC as it makes more sense, and convert blocking into atomic notifier.
This sounds good but since most PMICs have I2C bus connectivity using atomic notifier can introduce problems.
Quoted 5 lines
After that we can add notifications to all gadget events/API/etc...
--
balbi
���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m����������?�I�
Hi,
Quoted 30 lines · Ashish Jangam
Quoted 22 lines
Quoted 12 lines
Quoted 12 lines · On Wed, Nov 09, 2011 at 01:43:37PM +0530, ashishj3 wrote:
Quoted 1 line
For a better performance in USB charging operation, the DA9052/53
charging
Quoted 4 lines
current can be configured in accordance with the USB host current delivering capacity (known through USB drivers negotiation).
To implement this useful feature, a new writable property "USB charge
current"
Quoted 3 lines
needs to be added in the Linux battery core.
Let me know your views on it.
Quoted 7 lines
Quoted 4 lines
that's the wrong way to do it. What we need is to use the transceiver notifications to notify every time someone calls
usb_gadget_vbus_draw()and pass the mA parameter as argument to the event notification.This means that we need to modify the function
usb_gadget_vbus_draw()to add a call likeblocking_notifier_call_chain()but will this be finewith
Quoted 1 line
the usb gadget driver maintainers?
Quoted 7 lines
I am the USB gadget driver maintainer and I have plans to do that myself. First thing we need to do is convert the final UDC drivers to the udc Class which I wrote and Sebastian helped brushing it up, then we uninline the usb_gadget_* wrappers and move them to
drivers/usb/gadget/udc-core.c, then we can move the transceiver notifier to the UDC as it makes more sense, and convert blocking into atomic notifier.
Quoted 2 lines
This sounds good but since most PMICs have I2C bus connectivity using atomic notifier can introduce problems.
we can't use blocking on atomic, right ? usb_gadget_vbus_draw() and most of the others (usb_gadget_connect/disconnect, usb_gadget_frame_number, and so on) are called from atomic context...
What i2c transceivers will have to do, is that they will need to defer handling of the notification, which isn't all that big of a deal. If it takes 300 miliseconds more to start charging, users won't even notice.
Signature · 1 line
balbi