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]
Message-ID: <20150302210509.GK13270@amd>
Date:	Mon, 2 Mar 2015 22:05:10 +0100
From:	Pavel Machek <pavel@....cz>
To:	NeilBrown <neilb@...e.de>
Cc:	Samuel Ortiz <sameo@...ux.intel.com>,
	Tony Lindgren <tony@...mide.com>,
	Lee Jones <lee.jones@...aro.org>,
	Sebastian Reichel <sre@...nel.org>,
	Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
	David Woodhouse <dwmw2@...radead.org>,
	GTA04 owners <gta04-owner@...delico.com>,
	linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-pm@...r.kernel.org
Subject: Re: [PATCH 08/15] twl4030_charger: distinguish between USB current
 and 'AC' current

Hi!

> The twl4030 charger has two current sources, 'USB' and 'AC' (which is
> really DC of course...).
> 
> If 'AC' is providing current, we should set the current limit
> differently to when it isn't (and so USB is used).
> So split 'cur' into 'usb_cur' and 'ac_cur' and use accordingly.
> 
> Now we must review the current setting on any interrupt or USB
> event which might indicate that the charger-source has changed.
> 
> Signed-off-by: NeilBrown <neilb@...e.de>

> @@ -103,7 +104,9 @@ struct twl4030_bci {
>  	/* ichg values in uA. If any are 'large', we set CGAIN to

ichg/_cur values

>  	 * '1' which doubles the range for half the precision.
>  	 */
> -	int			ichg_eoc, ichg_lo, ichg_hi, cur;
> +	int			ichg_eoc, ichg_lo, ichg_hi;
> +	int			usb_cur, ac_cur;

> +	/* If VAC exceeds 4.5V (MADC 11) and ac is enabled, set current
> +	 * for 'ac'

	/*
	 * If AC voltage exceeds 4.5V (MADC 11) and AC is enabled, set current
	 * for 'ac'.


Acked-by: Pavel Machek <pavel@....cz>

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