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:	Tue, 03 Jul 2012 13:26:08 +0800
From:	Axel Lin <axel.lin@...il.com>
To:	"AnilKumar, Chimata" <anilkumar@...com>
Cc:	"Girdwood, Liam" <lrg@...com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Nori, Sekhar" <nsekhar@...com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Subject: RE: [PATCH 2/2] regulator: tps65217: Fix voltage boundary checking
 in tps65217_pmic_map_voltage


> Case 1:-
> ------
> 
> tps->info[rid]->min_uV = 600000;
> tps->info[rid]->max_uV = 1100000;
> 
> If we do regulator_set_voltage(reg, 550000, 1100000);
> 
> This results into error condition and how can we handle with this?

In original code, it returns error. ( I think which is wrong.)

What we want is to set the smallest voltage within the specified voltage
range.
With this patch, calling regulator_set_voltage(reg, 550000, 1100000);
is the same as calling regulator_set_voltage(reg, 600000, 1100000);
It will set the voltage to 600000 uV.

> 
> Case 2:-
> ------
> 
> I think the current code handles this case as well.
> 
> There might be a case where board/DT data is false like
> 
> tps->info[rid]->min_uV = 1100000;
> tps->info[rid]->max_uV = 600000;
> 
I don't get it.
You mean the case min_uV is greater than max_uV?

My understanding of current implementation is that the
tps->info[rid]->min_uV and tps->info[rid]->max_uV are not controlled by
board/DT data. They are defined in tps65217_pmic_regs[].

> regulator_set_voltage(reg, 650000, 1100000);
> 
> Regards
> AnilKumar


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