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]
Message-ID: <AAD1C6EB06EE3649B35B7E026785068D2581253EA9@SC-VEXCH2.marvell.com>
Date:	Tue, 28 May 2013 05:10:00 -0700
From:	Chao Xie <cxie4@...vell.com>
To:	Mark Brown <broonie@...nel.org>, yi zhang <yizhang.mrvl@...il.com>
CC:	Liam Girdwood <lgirdwood@...il.com>,
	"jett.zhou@...vell.com" <jett.zhou@...vell.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Yi Zhang <yizhang@...vell.com>
Subject: RE: [PATCH] regulator: 88pm800: add regulator driver

> -----Original Message-----
> From: Mark Brown [mailto:broonie@...nel.org] 
> Sent: Tuesday, May 28, 2013 6:04 PM
> To: yi zhang
> Cc: Liam Girdwood; Chao Xie; jett.zhou@...vell.com; linux-kernel@...r.kernel.org; Yi Zhang
> Subject: Re: [PATCH] regulator: 88pm800: add regulator driver
> 
> On Tue, May 28, 2013 at 10:32:09AM +0800, yi zhang wrote:
>
>> HI, Brown:

>> In western culture it's either "Hi Mark" or "Hi Mr Brown" (though the latter is pretty formal so not used much for things like mailing lists).
>
>>           Sorry I'm a little confused:
>>           You mean I should use a function for example 
>> "create_buck_table()" to create the BUCK voltage table?
>>            such as:
>>            void create_buck_table()
>>            {
>>                    if (voltage < 1587500) {
>>                              /* initialize the BUCK_table */
>>                    } else
>>                              /* initialize the BUCK_table */
>>            }
>
> No, I mean you shouldn't be using a table at all but have mapping and list functions which just do the calculation required to generate the tables directly.  This saves scanning through the table as direct calcuation is possible.

Hi, Mark
Thanks for your review.
Because structure regulator_desc only accepts the voltage table as constant.
struct regulator_desc {
	...
	const unsigned int *volt_table;
	...
};
If we want to make use of the volt_table, and the help functions regulator_map_voltage_iterate and regulator_list_voltage_table, we have to initialize the tables as what we do now.
So what you mean that we can maintain the structure describes the voltage information in out private structure
struct 88pm800_regulator_desc {
  struct regulator_desc desc
  ...
  struct 88pm800_regulator_vol_table vol_table;
};
The struct 88pm800_regulator_vol_table can be used to define the details of the LDOes like start_vol/end_vol/step.
Then we need define our own map_voltage and list_voltage functions, and based on the struct 88pm800_regulator_vol_table to calculate the correct voltage.
Is above solution what you mean?
--
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