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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 2 Mar 2015 22:03:55 +0100
From:	Pavel Machek <pavel@....cz>
To:	NeilBrown <neilb@...e.de>
Cc:	Tony Lindgren <tony@...mide.com>, Felipe Balbi <balbi@...com>,
	Kishon Vijay Abraham I <kishon@...com>,
	linux-omap@...r.kernel.org, lkml <linux-kernel@...r.kernel.org>,
	GTA04 owners <gta04-owner@...delico.com>
Subject: Re: [PATCH 2/4] usb: phy: twl4030: allow charger to see usb current
 draw limits.

On Tue 2015-02-24 14:40:37, NeilBrown wrote:
> The charger needs to know when a USB gadget has been enumerated
> and what the agreed maximum current was so that it can adjust
> charging accordingly.
> 
> So define a "set_power()" function to record the permitted
> draw, and pass a pointer to that when sending USB_EVENT_ENUMERATED
> notification.
> 
> Signed-off-by: NeilBrown <neilb@...e.de>
> ---
>  drivers/phy/phy-twl4030-usb.c |   27 +++++++++++++++++++++------
>  1 file changed, 21 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c
> index 97c59074233f..023fe150c7a1 100644
> --- a/drivers/phy/phy-twl4030-usb.c
> +++ b/drivers/phy/phy-twl4030-usb.c
> @@ -163,6 +163,11 @@ struct twl4030_usb {
>  	enum omap_musb_vbus_id_status linkstat;
>  	bool			vbus_supplied;
>  
> +	/* Permitted vbus draw - only meaningful after

add "in mA"?

> +	 * USB_EVENT_ENUMERATED
> +	 */
> +	unsigned		vbus_draw;
> +
>  	struct delayed_work	id_workaround_work;

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ