All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Alexander Shiyan <shc_work-JGs/UdohzUI@public.gmane.org>
Cc: "khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org"
	<khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>,
	"swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org"
	<swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org"
	<lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org>,
	Matthew Longnecker
	<MLongnecker-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	"linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org"
	<linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>,
	"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH 1/2] hwmon: (lm90) Add power control
Date: Wed, 7 Aug 2013 15:32:33 +0800	[thread overview]
Message-ID: <5201F811.9050602@nvidia.com> (raw)
In-Reply-To: <1375860442.896960598-syZRKAW8O9ZsdVUOrk1QfQ@public.gmane.org>

On 08/07/2013 03:27 PM, Alexander Shiyan wrote:
>> The device lm90 can be controlled by the vdd rail.
>> Adding the power control support to power on/off the vdd rail.
>> And make sure that power is enabled before accessing the device.
>>
>> Signed-off-by: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>> ---
>>  drivers/hwmon/lm90.c |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++
> [...]
>> +	if (!data->lm90_reg) {
>> +		data->lm90_reg = regulator_get(&client->dev, "vdd");
>> +		if (IS_ERR_OR_NULL(data->lm90_reg)) {
>> +			if (PTR_ERR(data->lm90_reg) == -ENODEV)
>> +				dev_info(&client->dev,
>> +					 "No regulator found for vdd. Assuming vdd is always powered.");
>> +			else
>> +				dev_warn(&client->dev,
>> +					 "Error [%ld] in getting the regulator handle for vdd.\n",
>> +					 PTR_ERR(data->lm90_reg));
>> +			data->lm90_reg = NULL;
>> +			mutex_unlock(&data->update_lock);
>> +			return -ENODEV;
>> +		}
>> +	}
>> +	if (is_enable) {
>> +		ret = regulator_enable(data->lm90_reg);
>> +		msleep(POWER_ON_DELAY);
> 
> Can this delay be handled directly from regulator?

I think it should be handled in the device driver.
Because there have different delay time to wait devices stable.

> 
> [...]
> ---
> 

WARNING: multiple messages have this Message-ID (diff)
From: Wei Ni <wni@nvidia.com>
To: Alexander Shiyan <shc_work-JGs/UdohzUI@public.gmane.org>
Cc: "khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org"
	<khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>,
	"swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org"
	<swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org"
	<lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org>,
	Matthew Longnecker
	<MLongnecker-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	"linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org"
	<linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>,
	"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [lm-sensors] [PATCH 1/2] hwmon: (lm90) Add power control
Date: Wed, 07 Aug 2013 07:32:33 +0000	[thread overview]
Message-ID: <5201F811.9050602@nvidia.com> (raw)
In-Reply-To: <1375860442.896960598-syZRKAW8O9ZsdVUOrk1QfQ@public.gmane.org>

On 08/07/2013 03:27 PM, Alexander Shiyan wrote:
>> The device lm90 can be controlled by the vdd rail.
>> Adding the power control support to power on/off the vdd rail.
>> And make sure that power is enabled before accessing the device.
>>
>> Signed-off-by: Wei Ni <wni@nvidia.com>
>> ---
>>  drivers/hwmon/lm90.c |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++
> [...]
>> +	if (!data->lm90_reg) {
>> +		data->lm90_reg = regulator_get(&client->dev, "vdd");
>> +		if (IS_ERR_OR_NULL(data->lm90_reg)) {
>> +			if (PTR_ERR(data->lm90_reg) = -ENODEV)
>> +				dev_info(&client->dev,
>> +					 "No regulator found for vdd. Assuming vdd is always powered.");
>> +			else
>> +				dev_warn(&client->dev,
>> +					 "Error [%ld] in getting the regulator handle for vdd.\n",
>> +					 PTR_ERR(data->lm90_reg));
>> +			data->lm90_reg = NULL;
>> +			mutex_unlock(&data->update_lock);
>> +			return -ENODEV;
>> +		}
>> +	}
>> +	if (is_enable) {
>> +		ret = regulator_enable(data->lm90_reg);
>> +		msleep(POWER_ON_DELAY);
> 
> Can this delay be handled directly from regulator?

I think it should be handled in the device driver.
Because there have different delay time to wait devices stable.

> 
> [...]
> ---
> 


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

WARNING: multiple messages have this Message-ID (diff)
From: wni@nvidia.com (Wei Ni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] hwmon: (lm90) Add power control
Date: Wed, 7 Aug 2013 15:32:33 +0800	[thread overview]
Message-ID: <5201F811.9050602@nvidia.com> (raw)
In-Reply-To: <1375860442.896960598@f427.i.mail.ru>

On 08/07/2013 03:27 PM, Alexander Shiyan wrote:
>> The device lm90 can be controlled by the vdd rail.
>> Adding the power control support to power on/off the vdd rail.
>> And make sure that power is enabled before accessing the device.
>>
>> Signed-off-by: Wei Ni <wni@nvidia.com>
>> ---
>>  drivers/hwmon/lm90.c |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++
> [...]
>> +	if (!data->lm90_reg) {
>> +		data->lm90_reg = regulator_get(&client->dev, "vdd");
>> +		if (IS_ERR_OR_NULL(data->lm90_reg)) {
>> +			if (PTR_ERR(data->lm90_reg) == -ENODEV)
>> +				dev_info(&client->dev,
>> +					 "No regulator found for vdd. Assuming vdd is always powered.");
>> +			else
>> +				dev_warn(&client->dev,
>> +					 "Error [%ld] in getting the regulator handle for vdd.\n",
>> +					 PTR_ERR(data->lm90_reg));
>> +			data->lm90_reg = NULL;
>> +			mutex_unlock(&data->update_lock);
>> +			return -ENODEV;
>> +		}
>> +	}
>> +	if (is_enable) {
>> +		ret = regulator_enable(data->lm90_reg);
>> +		msleep(POWER_ON_DELAY);
> 
> Can this delay be handled directly from regulator?

I think it should be handled in the device driver.
Because there have different delay time to wait devices stable.

> 
> [...]
> ---
> 

WARNING: multiple messages have this Message-ID (diff)
From: Wei Ni <wni@nvidia.com>
To: Alexander Shiyan <shc_work@mail.ru>
Cc: "khali@linux-fr.org" <khali@linux-fr.org>,
	"swarren@wwwdotorg.org" <swarren@wwwdotorg.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"lm-sensors@lm-sensors.org" <lm-sensors@lm-sensors.org>,
	Matthew Longnecker <MLongnecker@nvidia.com>,
	"linux@roeck-us.net" <linux@roeck-us.net>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/2] hwmon: (lm90) Add power control
Date: Wed, 7 Aug 2013 15:32:33 +0800	[thread overview]
Message-ID: <5201F811.9050602@nvidia.com> (raw)
In-Reply-To: <1375860442.896960598@f427.i.mail.ru>

On 08/07/2013 03:27 PM, Alexander Shiyan wrote:
>> The device lm90 can be controlled by the vdd rail.
>> Adding the power control support to power on/off the vdd rail.
>> And make sure that power is enabled before accessing the device.
>>
>> Signed-off-by: Wei Ni <wni@nvidia.com>
>> ---
>>  drivers/hwmon/lm90.c |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++
> [...]
>> +	if (!data->lm90_reg) {
>> +		data->lm90_reg = regulator_get(&client->dev, "vdd");
>> +		if (IS_ERR_OR_NULL(data->lm90_reg)) {
>> +			if (PTR_ERR(data->lm90_reg) == -ENODEV)
>> +				dev_info(&client->dev,
>> +					 "No regulator found for vdd. Assuming vdd is always powered.");
>> +			else
>> +				dev_warn(&client->dev,
>> +					 "Error [%ld] in getting the regulator handle for vdd.\n",
>> +					 PTR_ERR(data->lm90_reg));
>> +			data->lm90_reg = NULL;
>> +			mutex_unlock(&data->update_lock);
>> +			return -ENODEV;
>> +		}
>> +	}
>> +	if (is_enable) {
>> +		ret = regulator_enable(data->lm90_reg);
>> +		msleep(POWER_ON_DELAY);
> 
> Can this delay be handled directly from regulator?

I think it should be handled in the device driver.
Because there have different delay time to wait devices stable.

> 
> [...]
> ---
> 


  parent reply	other threads:[~2013-08-07  7:32 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-07  6:52 [PATCH 0/2] Add power control for lm90 Wei Ni
2013-08-07  6:52 ` Wei Ni
2013-08-07  6:52 ` Wei Ni
2013-08-07  6:52 ` [lm-sensors] " Wei Ni
2013-08-07  6:52 ` [PATCH 1/2] hwmon: (lm90) Add power control Wei Ni
2013-08-07  6:52   ` Wei Ni
2013-08-07  6:52   ` Wei Ni
2013-08-07  6:52   ` [lm-sensors] " Wei Ni
     [not found]   ` <1375858358-15070-2-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-08-07  7:03     ` Guenter Roeck
2013-08-07  7:03       ` Guenter Roeck
2013-08-07  7:03       ` Guenter Roeck
2013-08-07  7:03       ` [lm-sensors] " Guenter Roeck
     [not found]       ` <5201F138.3080906-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-08-07  7:15         ` Wei Ni
2013-08-07  7:15           ` Wei Ni
2013-08-07  7:15           ` Wei Ni
2013-08-07  7:15           ` [lm-sensors] " Wei Ni
2013-08-07  7:27   ` Alexander Shiyan
2013-08-07  7:27     ` Alexander Shiyan
2013-08-07  7:27     ` Alexander Shiyan
2013-08-07  7:27     ` [lm-sensors] [PATCH 1/2] hwmon: (lm90) Add po Alexander Shiyan
     [not found]     ` <1375860442.896960598-syZRKAW8O9ZsdVUOrk1QfQ@public.gmane.org>
2013-08-07  7:32       ` Wei Ni [this message]
2013-08-07  7:32         ` [PATCH 1/2] hwmon: (lm90) Add power control Wei Ni
2013-08-07  7:32         ` Wei Ni
2013-08-07  7:32         ` [lm-sensors] " Wei Ni
     [not found]         ` <5201F811.9050602-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-08-07  7:50           ` Guenter Roeck
2013-08-07  7:50             ` Guenter Roeck
2013-08-07  7:50             ` Guenter Roeck
2013-08-07  7:50             ` [lm-sensors] " Guenter Roeck
2013-08-07  8:07             ` Wei Ni
2013-08-07  8:07               ` Wei Ni
2013-08-07  8:07               ` [lm-sensors] " Wei Ni
     [not found]               ` <52020047.1080705-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-08-07  8:45                 ` Alexander Shiyan
2013-08-07  8:45                   ` Alexander Shiyan
2013-08-07  8:45                   ` Alexander Shiyan
2013-08-07  8:45                   ` [lm-sensors] [PATCH 1/2] hwmon: (lm90) Add po Alexander Shiyan
     [not found]                   ` <1375865105.562600640-y1D/hCXJdYBsdVUOrk1QfQ@public.gmane.org>
2013-08-07  9:35                     ` [PATCH 1/2] hwmon: (lm90) Add power control Wei Ni
2013-08-07  9:35                       ` Wei Ni
2013-08-07  9:35                       ` Wei Ni
2013-08-07  9:35                       ` [lm-sensors] " Wei Ni
     [not found]                       ` <520214C9.1010200-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-08-07 16:06                         ` Stephen Warren
2013-08-07 16:06                           ` Stephen Warren
2013-08-07 16:06                           ` Stephen Warren
2013-08-07 16:06                           ` [lm-sensors] " Stephen Warren
     [not found]                           ` <52027086.1090608-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-08-07 16:44                             ` Guenter Roeck
2013-08-07 16:44                               ` Guenter Roeck
2013-08-07 16:44                               ` Guenter Roeck
2013-08-07 16:44                               ` [lm-sensors] " Guenter Roeck
2013-08-07  7:45     ` Guenter Roeck
2013-08-07  7:45       ` Guenter Roeck
2013-08-07  7:45       ` [lm-sensors] " Guenter Roeck
2013-08-07  6:52 ` [PATCH 2/2] ARM: dt: t114 dalmore: add dt entry for nct1008 Wei Ni
2013-08-07  6:52   ` Wei Ni
2013-08-07  6:52   ` Wei Ni
2013-08-07  6:52   ` [lm-sensors] " Wei Ni
     [not found]   ` <1375858358-15070-3-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-08-07 16:03     ` Stephen Warren
2013-08-07 16:03       ` Stephen Warren
2013-08-07 16:03       ` Stephen Warren
2013-08-07 16:03       ` [lm-sensors] " Stephen Warren
     [not found]       ` <52026FEE.9070003-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-08-08  2:36         ` Wei Ni
2013-08-08  2:36           ` Wei Ni
2013-08-08  2:36           ` Wei Ni
2013-08-08  2:36           ` [lm-sensors] " Wei Ni

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=5201F811.9050602@nvidia.com \
    --to=wni-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
    --cc=MLongnecker-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
    --cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
    --cc=shc_work-JGs/UdohzUI@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.