lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20111109123339.GC16315@legolas.emea.dhcp.ti.com>
Date:	Wed, 9 Nov 2011 14:33:44 +0200
From:	Felipe Balbi <balbi@...com>
To:	Ashish Jangam <Ashish.Jangam@...tcummins.com>
Cc:	"balbi@...com" <balbi@...com>,
	"linaro-dev@...ts.linaro.org" <linaro-dev@...ts.linaro.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"arnd@...db.de" <arnd@...db.de>,
	"eric.miao@...aro.org" <eric.miao@...aro.org>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	"david-b@...bell.net" <david-b@...bell.net>
Subject: Re: Adding USB charge current property in the Linux Battery core

Hi,

On Wed, Nov 09, 2011 at 12:30:19PM +0000, Ashish Jangam wrote:
> > > > 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.
> > > >
> > >
> > > 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?
> > 
> > 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. 

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.

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ