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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 5 Mar 2015 17:33:50 +1100
From:	NeilBrown <neilb@...e.de>
To:	Pavel Machek <pavel@....cz>
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 12/15] twl4030_charger: add software controlled linear
 charging mode.

On Mon, 2 Mar 2015 22:09:26 +0100 Pavel Machek <pavel@....cz> wrote:

> On Tue 2015-02-24 15:33:52, NeilBrown wrote:
> > Add a 'continuous' option for usb charging which enabled
> > the "linear" charging mode of the twl4030.
> 
> Documentation/ :-).

!

> 
> > Linear charging does a good job with not so reliable power sources, since
> > several voltage controlling is then often too intelligent.
> 
> Parse error.

========
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.

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.
=========

> 
> > 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.
> > 
> > Orignal-by: Andreas Kemnade <andreas@...nade.info>
> > Signed-off-by: NeilBrown <neilb@...e.de>
> 
> 
> > +			ret = twl_i2c_write_u8(TWL_MODULE_MAIN_CHARGE, 0x33,
> > +					       TWL4030_BCIWDKEY);
> > +			/* 0x24 + EKEY6:  off mode */
> 
> "  " -> " "
> 
> > +			ret = twl_i2c_write_u8(TWL_MODULE_MAIN_CHARGE, 0x2a,
> > +					       TWL4030_BCIMDKEY);
> > +			/* EKEY2: Linear charge: usb path */
> 
> USB
> 
> > +			ret = twl_i2c_write_u8(TWL_MODULE_MAIN_CHARGE, 0x26,
> > +					       TWL4030_BCIMDKEY);
> > +			/* WDKEY5: stop watchdog count */
> > +			ret = twl_i2c_write_u8(TWL_MODULE_MAIN_CHARGE, 0xf3,
> > +					       TWL4030_BCIWDKEY);
> > +			/* enable MFEN3 access */
> > +			ret = twl_i2c_write_u8(TWL_MODULE_MAIN_CHARGE, 0x9c,
> > +					       TWL4030_BCIMFKEY);
> > +			 /* ICHGEOCEN - end-of-charge monitor (current < 80mA)
> > +			  *                      (charging continues)
> > +			  * ICHGLOWEN - current level monitor (charge continues)
> > +			  * don't monitor over-current or heat save
> 
> Heat save? Is ignoring over-current good idea?

The data sheet refers to a flag "HSEN" which is "Heat Save function enable".

your guess is as good as mine.

We don't currently have any code for responding to warnings.  Maybe we should.

For now this feature is "use at your own risk" - and one person has found it
very useful.

> 
> > @@ -650,6 +684,8 @@ twl4030_bci_mode_store(struct device *dev, struct device_attribute *attr,
> >  		mode = 0;
> >  	else if (sysfs_streq(buf, modes[1]))
> >  		mode = 1;
> > +	else if (sysfs_streq(buf, modes[2]))
> > +		mode = 2;
> 
> Time for loop?

When we get one more mode it will be :-)

Thanks,
NeilBrown


Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ