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: <87bncjjesu.fsf@notabene.neil.brown.name>
Date:	Thu, 01 Oct 2015 16:14:41 +1000
From:	Neil Brown <neil@...wn.name>
To:	Pavel Machek <pavel@....cz>
Cc:	Sebastian Reichel <sre@...nel.org>,
	Samuel Ortiz <sameo@...ux.intel.com>, linux-pm@...r.kernel.org,
	Tony Lindgren <tony@...mide.com>,
	David Woodhouse <dwmw2@...radead.org>,
	linux-kernel@...r.kernel.org,
	real GTA04 owners <gta04-owner@...delico.com>,
	Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
	linux-omap@...r.kernel.org, Lee Jones <lee.jones@...aro.org>
Subject: Re: [PATCH 10/13] twl4030_charger: add software controlled linear charging mode.

Pavel Machek <pavel@....cz> writes:

> On Thu 2015-07-30 10:11:24, NeilBrown wrote:
>> 
>> Add a 'continuous' option for usb charging which enables
>> the "linear" charging mode of the twl4030.
>> 
>> Linear charging does a good job with not-so-reliable power sources.
>> Auto mode does not work well as it switches off when voltage drops
>> momentarily.  Care must be taken not to over-charge.
>
> Can you explain how the user can "care not to over-charge"?

The following text reads:

    It was used with a bike hub dynamo since a year or so. In that case
    there are automatically charging stops when the cyclist needs a break.

so: take a break from cycling occasionally.

>
>> @@ -750,6 +784,17 @@ static int twl4030_bci_get_property(struct power_supply *psy,
>>  		is_charging = state & TWL4030_MSTATEC_USB;
>>  	else
>>  		is_charging = state & TWL4030_MSTATEC_AC;
>> +	if (!is_charging) {
>> +		u8 s;
>> +		twl4030_bci_read(TWL4030_BCIMDEN, &s);
>> +		if (psy->desc->type == POWER_SUPPLY_TYPE_USB)
>> +			is_charging = s & 1;
>> +		else
>> +			is_charging = s & 2;
>> +		if (is_charging)
>> +			/* A little white lie */
>> +			state = TWL4030_MSTATEC_QUICK1;
>
> I'm not sure... can't this white lie turn into black smoke?
>
> Like.. normally, when battery is below something (like 3.5V) it must
> not be quick-charged (because something is very wrong with it). Are
> you just forcing the quick charge here?

No.  That value is only used for reporting a status via sysfs.
That 'lie' gets translated to "POWER_SUPPLY_STATUS_CHARGING" which is
not a lie.

Thanks,
NeilBrown


>
> 									Pavel
> -- 
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ