Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
a89f5c75
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
a89f5c75
编写于
9月 01, 2013
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'regulator/topic/ramp' into regulator-next
上级
09f2dd88
5b175952
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
6 deletion
+16
-6
Documentation/devicetree/bindings/regulator/regulator.txt
Documentation/devicetree/bindings/regulator/regulator.txt
+2
-0
drivers/regulator/core.c
drivers/regulator/core.c
+4
-3
drivers/regulator/of_regulator.c
drivers/regulator/of_regulator.c
+9
-3
include/linux/regulator/machine.h
include/linux/regulator/machine.h
+1
-0
未找到文件。
Documentation/devicetree/bindings/regulator/regulator.txt
浏览文件 @
a89f5c75
...
...
@@ -12,6 +12,8 @@ Optional properties:
- regulator-allow-bypass: allow the regulator to go into bypass mode
- <name>-supply: phandle to the parent supply/regulator node
- regulator-ramp-delay: ramp delay for regulator(in uV/uS)
For hardwares which support disabling ramp rate, it should be explicitly
intialised to zero (regulator-ramp-delay = <0>) for disabling ramp delay.
Deprecated properties:
- regulator-compatible: If a regulator chip contains multiple
...
...
drivers/regulator/core.c
浏览文件 @
a89f5c75
...
...
@@ -988,7 +988,8 @@ static int set_machine_constraints(struct regulator_dev *rdev,
}
}
if
(
rdev
->
constraints
->
ramp_delay
&&
ops
->
set_ramp_delay
)
{
if
((
rdev
->
constraints
->
ramp_delay
||
rdev
->
constraints
->
ramp_disable
)
&&
ops
->
set_ramp_delay
)
{
ret
=
ops
->
set_ramp_delay
(
rdev
,
rdev
->
constraints
->
ramp_delay
);
if
(
ret
<
0
)
{
rdev_err
(
rdev
,
"failed to set ramp_delay
\n
"
);
...
...
@@ -2241,8 +2242,8 @@ static int _regulator_do_set_voltage(struct regulator_dev *rdev,
}
/* Call set_voltage_time_sel if successfully obtained old_selector */
if
(
ret
==
0
&&
_regulator_is_enabled
(
rdev
)
&&
old_selector
>=
0
&&
old_selector
!=
selector
&&
rdev
->
desc
->
ops
->
set_voltage_time_sel
)
{
if
(
ret
==
0
&&
!
rdev
->
constraints
->
ramp_disable
&&
old_selector
>=
0
&&
old_selector
!=
selector
)
{
delay
=
rdev
->
desc
->
ops
->
set_voltage_time_sel
(
rdev
,
old_selector
,
selector
);
...
...
drivers/regulator/of_regulator.c
浏览文件 @
a89f5c75
...
...
@@ -21,6 +21,7 @@ static void of_get_regulation_constraints(struct device_node *np,
{
const
__be32
*
min_uV
,
*
max_uV
,
*
uV_offset
;
const
__be32
*
min_uA
,
*
max_uA
,
*
ramp_delay
;
struct
property
*
prop
;
struct
regulation_constraints
*
constraints
=
&
(
*
init_data
)
->
constraints
;
constraints
->
name
=
of_get_property
(
np
,
"regulator-name"
,
NULL
);
...
...
@@ -64,9 +65,14 @@ static void of_get_regulation_constraints(struct device_node *np,
if
(
of_property_read_bool
(
np
,
"regulator-allow-bypass"
))
constraints
->
valid_ops_mask
|=
REGULATOR_CHANGE_BYPASS
;
ramp_delay
=
of_get_property
(
np
,
"regulator-ramp-delay"
,
NULL
);
if
(
ramp_delay
)
constraints
->
ramp_delay
=
be32_to_cpu
(
*
ramp_delay
);
prop
=
of_find_property
(
np
,
"regulator-ramp-delay"
,
NULL
);
if
(
prop
&&
prop
->
value
)
{
ramp_delay
=
prop
->
value
;
if
(
*
ramp_delay
)
constraints
->
ramp_delay
=
be32_to_cpu
(
*
ramp_delay
);
else
constraints
->
ramp_disable
=
true
;
}
}
/**
...
...
include/linux/regulator/machine.h
浏览文件 @
a89f5c75
...
...
@@ -134,6 +134,7 @@ struct regulation_constraints {
unsigned
always_on
:
1
;
/* regulator never off when system is on */
unsigned
boot_on
:
1
;
/* bootloader/firmware enabled regulator */
unsigned
apply_uV
:
1
;
/* apply uV constraint if min == max */
unsigned
ramp_disable
:
1
;
/* disable ramp delay */
};
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录