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:	Thu, 8 Aug 2013 10:33:40 +0100
From:	Mark Rutland <mark.rutland@....com>
To:	Laxman Dewangan <ldewangan@...dia.com>
Cc:	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"grant.likely@...aro.org" <grant.likely@...aro.org>,
	"rob.herring@...xeda.com" <rob.herring@...xeda.com>,
	"rob@...dley.net" <rob@...dley.net>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"rtc-linux@...glegroups.com" <rtc-linux@...glegroups.com>,
	"gg@...mlogic.co.uk" <gg@...mlogic.co.uk>,
	"kishon@...com" <kishon@...com>,
	Stephen Warren <swarren@...dia.com>,
	Pawel Moll <Pawel.Moll@....com>,
	"ian.campbell@...rix.com" <ian.campbell@...rix.com>,
	"broonie@...nel.org" <broonie@...nel.org>
Subject: Re: [PATCH V4] drivers/rtc/rtc-palmas.c: support for backup
 battery charging

On Wed, Aug 07, 2013 at 07:46:11PM +0100, Laxman Dewangan wrote:
> On Wednesday 07 August 2013 10:08 PM, Mark Rutland wrote:
> > On Wed, Aug 07, 2013 at 11:29:52AM +0100, Laxman Dewangan wrote:
> >> +Optional properties:
> >> +- ti,back-battery-charge-enable: The Palmas series device like TPS65913 or
> >> +	TPS80036 supports the battery backup for powering the RTC when main
> >> +	battery is removed or in very low power state. This flag will enable
> >> +	the backup battery charging.
> > I don't like the wording here as it implies that an OS *must* charge the
> > device, rather than that it *can* charge the device. How about:
> >
> >   - ti,backup-battery-chargeable: There is a chargeable backup battery
> >                                   present.
> >
> 
> The *org* property tells whether charging should be enable or not. This 
> is enabled during init and it is not the runtime configuration for 
> enable/disable.
> By saying "backup-battery-chargeable" means it need other 
> interface/calls to start charging. It does not reflect that charging 
> will be enabled by default.

It doesn't mean that the OS needs to provide some interface to control
charging. It simply means that it's up to the OS as to whether it
charges it (for which Linux's choice can be to always charge the
battery). An OS may choose not implement any charging code at all...

> 
> 
> 
> >> +- ti,back-battery-charge-low-current: Configure lower charging current. Device
> >> +	supports the charging current as < 100mA or >100mA. Low current will
> >> +	set as <100mA.
> > This is somewhat unclear as it reads as a runtime configuration choice,
> > rather than some instances of the device only support being changed at
> > low currents (as I assume is the case?). How about:
> >
> >    - ti,backup-battery-low-current: The backup battery is only chargeable
> >                                     at currents below 100mA.
> 
> Hmm.. I think even if battery can be charge for more than 100mA, there 
> is choice of configure it for less than 100mA.

Ok.

> 
> > What happens if we charge at the wrong current?
> Not much sure but I think it can create battery damage.

If we charge a battery supporting >100mA at a current <100mA, will that
cause damage? Or only if we charge above it's supported current?

If the latter's true, it might make sense to invert the condition and
describe that the battery may be charged at a higher current, with the
default being <100mA. That way a missing property in the dt will only
result in sub-optimal charging rather than battery damage.

Thanks,
Mark.
--
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