From: "Alexander Shiyan" <shc_work@mail.ru>
To: "Wei Ni" <wni@nvidia.com>
Cc: khali@linux-fr.org, swarren@wwwdotorg.org,
linux-kernel@vger.kernel.org, lm-sensors@lm-sensors.org,
MLongnecker@nvidia.com, linux@roeck-us.net,
linux-tegra@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] hwmon: (lm90) Add power control
Date: Wed, 07 Aug 2013 11:27:22 +0400 [thread overview]
Message-ID: <1375860442.896960598@f427.i.mail.ru> (raw)
In-Reply-To: <1375858358-15070-2-git-send-email-wni@nvidia.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 1165 bytes --]
> 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?
[...]
---
ÿôèº{.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¥
next prev parent reply other threads:[~2013-08-07 7:28 UTC|newest]
Thread overview: 16+ 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 ` [PATCH 1/2] hwmon: (lm90) Add power control Wei Ni
2013-08-07 7:03 ` Guenter Roeck
2013-08-07 7:15 ` Wei Ni
2013-08-07 7:27 ` Alexander Shiyan [this message]
2013-08-07 7:32 ` Wei Ni
2013-08-07 7:50 ` Guenter Roeck
2013-08-07 8:07 ` Wei Ni
2013-08-07 8:45 ` Alexander Shiyan
2013-08-07 9:35 ` Wei Ni
2013-08-07 16:06 ` Stephen Warren
2013-08-07 16:44 ` Guenter Roeck
2013-08-07 7:45 ` Guenter Roeck
2013-08-07 6:52 ` [PATCH 2/2] ARM: dt: t114 dalmore: add dt entry for nct1008 Wei Ni
2013-08-07 16:03 ` Stephen Warren
2013-08-08 2:36 ` 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=1375860442.896960598@f427.i.mail.ru \
--to=shc_work@mail.ru \
--cc=MLongnecker@nvidia.com \
--cc=khali@linux-fr.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lm-sensors@lm-sensors.org \
--cc=swarren@wwwdotorg.org \
--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
all inboxes | Powered by JetHome®