Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Linux-御风守护者
linux
提交
eaf018e1
L
linux
项目概览
Linux-御风守护者
/
linux
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
eaf018e1
编写于
8月 30, 2015
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'regulator/topic/core' into regulator-next
上级
e616e2f1
099982fa
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
18 addition
and
4 deletion
+18
-4
drivers/regulator/core.c
drivers/regulator/core.c
+18
-4
未找到文件。
drivers/regulator/core.c
浏览文件 @
eaf018e1
...
...
@@ -296,7 +296,7 @@ static int regulator_check_drms(struct regulator_dev *rdev)
return
-
ENODEV
;
}
if
(
!
(
rdev
->
constraints
->
valid_ops_mask
&
REGULATOR_CHANGE_DRMS
))
{
rdev_
err
(
rdev
,
"operation not allowed
\n
"
);
rdev_
dbg
(
rdev
,
"operation not allowed
\n
"
);
return
-
EPERM
;
}
return
0
;
...
...
@@ -641,6 +641,8 @@ static int drms_uA_update(struct regulator_dev *rdev)
int
current_uA
=
0
,
output_uV
,
input_uV
,
err
;
unsigned
int
mode
;
lockdep_assert_held_once
(
&
rdev
->
mutex
);
/*
* first check to see if we can set modes at all, otherwise just
* tell the consumer everything is OK.
...
...
@@ -761,6 +763,8 @@ static int suspend_set_state(struct regulator_dev *rdev,
/* locks held by caller */
static
int
suspend_prepare
(
struct
regulator_dev
*
rdev
,
suspend_state_t
state
)
{
lockdep_assert_held_once
(
&
rdev
->
mutex
);
if
(
!
rdev
->
constraints
)
return
-
EINVAL
;
...
...
@@ -1595,9 +1599,11 @@ static void _regulator_put(struct regulator *regulator)
{
struct
regulator_dev
*
rdev
;
if
(
regulator
==
NULL
||
IS_ERR
(
regulator
))
if
(
IS_ERR_OR_NULL
(
regulator
))
return
;
lockdep_assert_held_once
(
&
regulator_list_mutex
);
rdev
=
regulator
->
rdev
;
debugfs_remove_recursive
(
regulator
->
debugfs
);
...
...
@@ -1976,6 +1982,8 @@ static int _regulator_enable(struct regulator_dev *rdev)
{
int
ret
;
lockdep_assert_held_once
(
&
rdev
->
mutex
);
/* check voltage and requested load before enabling */
if
(
rdev
->
constraints
&&
(
rdev
->
constraints
->
valid_ops_mask
&
REGULATOR_CHANGE_DRMS
))
...
...
@@ -2076,6 +2084,8 @@ static int _regulator_disable(struct regulator_dev *rdev)
{
int
ret
=
0
;
lockdep_assert_held_once
(
&
rdev
->
mutex
);
if
(
WARN
(
rdev
->
use_count
<=
0
,
"unbalanced disables for %s
\n
"
,
rdev_get_name
(
rdev
)))
return
-
EIO
;
...
...
@@ -2154,6 +2164,8 @@ static int _regulator_force_disable(struct regulator_dev *rdev)
{
int
ret
=
0
;
lockdep_assert_held_once
(
&
rdev
->
mutex
);
ret
=
_notifier_call_chain
(
rdev
,
REGULATOR_EVENT_FORCE_DISABLE
|
REGULATOR_EVENT_PRE_DISABLE
,
NULL
);
if
(
ret
&
NOTIFY_STOP_MASK
)
...
...
@@ -2722,7 +2734,7 @@ int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV)
goto
out
;
/* If we're trying to set a range that overlaps the current voltage,
* return succesfully even though the regulator does not support
* return succes
s
fully even though the regulator does not support
* changing the voltage.
*/
if
(
!
(
rdev
->
constraints
->
valid_ops_mask
&
REGULATOR_CHANGE_VOLTAGE
))
{
...
...
@@ -3450,6 +3462,8 @@ EXPORT_SYMBOL_GPL(regulator_bulk_free);
int
regulator_notifier_call_chain
(
struct
regulator_dev
*
rdev
,
unsigned
long
event
,
void
*
data
)
{
lockdep_assert_held_once
(
&
rdev
->
mutex
);
_notifier_call_chain
(
rdev
,
event
,
data
);
return
NOTIFY_DONE
;
...
...
@@ -3824,11 +3838,11 @@ void regulator_unregister(struct regulator_dev *rdev)
WARN_ON
(
rdev
->
open_count
);
unset_regulator_supplies
(
rdev
);
list_del
(
&
rdev
->
list
);
mutex_unlock
(
&
regulator_list_mutex
);
kfree
(
rdev
->
constraints
);
regulator_ena_gpio_free
(
rdev
);
of_node_put
(
rdev
->
dev
.
of_node
);
device_unregister
(
&
rdev
->
dev
);
mutex_unlock
(
&
regulator_list_mutex
);
}
EXPORT_SYMBOL_GPL
(
regulator_unregister
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录