mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wei Ni <wni@nvidia.com>
To: "'Samuel Ortiz'" <sameo@linux.intel.com>
Cc: "mike@compulab.co.il" <mike@compulab.co.il>,
	Nitin Kumbhar <nkumbhar@nvidia.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] mfd: tps6586x: add api to power off tps6586x
Date: Mon, 22 Aug 2011 11:47:10 +0800	[thread overview]
Message-ID: <6B4D417B830BC44B8026029FD256F7F1C2CD7600DD@HKMAIL01.nvidia.com> (raw)
In-Reply-To: <20110821230511.GA4607@sortiz-mobl>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1767 bytes --]

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

Thanks
Wei.


>-----Original Message-----
>From: Samuel Ortiz [mailto:sameo@linux.intel.com]
>Sent: Monday, August 22, 2011 7:05 AM
>To: Wei Ni
>Cc: mike@compulab.co.il; gking@nvidia.com; Nitin Kumbhar; linux-kernel@vger.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@nvidia.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/
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

  reply	other threads:[~2011-08-22  3:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-28  6:30 wni
2011-07-29  7:53 ` Wei Ni
2011-08-03  4:04 ` Wei Ni
2011-08-21 23:05 ` Samuel Ortiz
2011-08-22  3:47   ` Wei Ni [this message]
2011-08-22  5:06     ` Haojian Zhuang
2011-08-23 15:40       ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6B4D417B830BC44B8026029FD256F7F1C2CD7600DD@HKMAIL01.nvidia.com \
    --to=wni@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike@compulab.co.il \
    --cc=nkumbhar@nvidia.com \
    --cc=sameo@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®