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:	Mon, 22 Aug 2011 11:47:10 +0800
From:	Wei Ni <wni@...dia.com>
To:	'Samuel Ortiz' <sameo@...ux.intel.com>
CC:	"mike@...pulab.co.il" <mike@...pulab.co.il>,
	Nitin Kumbhar <nkumbhar@...dia.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] mfd: tps6586x: add api to power off tps6586x

Hi, Samuel
Thanks for your comments.
Please check the following lines with [Wei Ni]

Thanks
Wei.


>-----Original Message-----
>From: Samuel Ortiz [mailto:sameo@...ux.intel.com]
>Sent: Monday, August 22, 2011 7:05 AM
>To: Wei Ni
>Cc: mike@...pulab.co.il; gking@...dia.com; Nitin Kumbhar; linux-kernel@...r.kernel.org
>Subject: Re: [PATCH] mfd: tps6586x: add api to power off tps6586x
>
>Hi Wei,
>
>On Thu, Jul 28, 2011 at 02:30:36PM +0800, wni@...dia.com wrote:
>> +static struct i2c_client *tps6586x_i2c_client;
>That's not vey nice. By doing so, you're preventing anyone to have more than
>one of those chips in their boards.
[Wei Ni] oh yes, I didn’t consider this issue. We use i2c_register_board_info()
to register the tps6586x in the board file, but it didn't return the handle.
Do you have any ideas?
>
>
>> +int tps6586x_power_off(void)
>> +{
>> +	struct device *dev = NULL;
>> +	int ret = -EINVAL;
>> +
>> +	if (!tps6586x_i2c_client)
>> +		return ret;
>> +
>> +	dev = &tps6586x_i2c_client->dev;
>> +
>> +	ret = tps6586x_clr_bits(dev, TPS6586X_SUPPLYENE, EXITSLREQ_BIT);
>> +	if (ret)
>> +		return ret;
>> +
>> +	ret = tps6586x_set_bits(dev, TPS6586X_SUPPLYENE, SLEEP_MODE_BIT);
>> +	if (ret)
>> +		return ret;
>> +
>> +	return 0;
>> +}
>> +EXPORT_SYMBOL_GPL(tps6586x_power_off);
>Who is going to call this one ?
[Wei Ni] the tegra board will call this function to power off system.
It will put tps6586x in sleep mode by resetting EXITSLREQ and
setting SLEEP_MODE in SUPPLYENE register. It will power off ldos.
>
>Cheers,
>Samuel.
>
>--
>Intel Open Source Technology Centre
>http://oss.intel.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ