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 01:05:11 +0200
From:	Samuel Ortiz <sameo@...ux.intel.com>
To:	wni@...dia.com
Cc:	mike@...pulab.co.il, gking@...dia.com, nkumbhar@...dia.com,
	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.


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