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: <20140220063031.GC2498@jenny-desktop>
Date:	Thu, 20 Feb 2014 12:00:32 +0530
From:	Jenny Tc <jenny.tc@...el.com>
To:	Krzysztof Kozlowski <k.kozlowski@...sung.com>
Cc:	MyungJoo Ham <myungjoo.ham@...sung.com>,
	Chanwoo Choi <cw00.choi@...sung.com>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Lee Jones <lee.jones@...aro.org>,
	Mark Brown <broonie@...nel.org>, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
	Kyungmin Park <kyungmin.park@...sung.com>,
	Tomasz Figa <t.figa@...sung.com>,
	Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
	David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH v3 14/15] charger: max14577: Configure battery-dependent
 settings from DTS

On Mon, Feb 17, 2014 at 10:05:49AM +0100, Krzysztof Kozlowski wrote:
> +static inline int max14577_init_eoc(struct max14577_charger *chg,
> +		unsigned int uamp)
> +{
> +	unsigned int current_bits = 0xf;
> +	u8 reg_data;
> +
> +	switch (chg->maxim_core->dev_type) {
> +	case MAXIM_DEVICE_TYPE_MAX77836:
> +		if (uamp < 5000)
> +			return -EINVAL; /* Requested current is too low */
> +
> +		if (uamp == 7500)
> +			current_bits = 0x0;

if (uamp <= 7500) ?

> +	/* Initialize Overvoltage-Protection Threshold */
> +	switch (chg->pdata->ovp_uvolt) {
> +	case 7500000:
> +		reg_data = 0x0;
> +		break;
> +	case 6000000:
> +	case 6500000:
> +	case 7000000:
> +		reg_data = 0x1 + (chg->pdata->ovp_uvolt - 6000000) / 500000;
> +		break;

Is it battery OVP or charger source OVP? If it's battery OVP, then  minimum
level as 6V seems to be unsafe even for 4.4V batteries.
--
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