public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Samuel Ortiz <sameo@linux.intel.com>
To: wni@nvidia.com
Cc: mike@compulab.co.il, gking@nvidia.com, nkumbhar@nvidia.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mfd: tps6586x: add api to power off tps6586x
Date: Mon, 22 Aug 2011 01:05:11 +0200	[thread overview]
Message-ID: <20110821230511.GA4607@sortiz-mobl> (raw)
In-Reply-To: <1311834636-15940-1-git-send-email-wni@nvidia.com>

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.


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

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

  parent reply	other threads:[~2011-08-21 23:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-28  6:30 [PATCH] mfd: tps6586x: add api to power off tps6586x wni
2011-07-29  7:53 ` Wei Ni
2011-08-03  4:04 ` Wei Ni
2011-08-21 23:05 ` Samuel Ortiz [this message]
2011-08-22  3:47   ` Wei Ni
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=20110821230511.GA4607@sortiz-mobl \
    --to=sameo@linux.intel.com \
    --cc=gking@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike@compulab.co.il \
    --cc=nkumbhar@nvidia.com \
    --cc=wni@nvidia.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