Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
a5848622
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看板
提交
a5848622
编写于
9月 01, 2013
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'regulator/topic/tps65912' into regulator-next
上级
2d31b15b
fba6583b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
19 addition
and
20 deletion
+19
-20
drivers/regulator/tps65912-regulator.c
drivers/regulator/tps65912-regulator.c
+19
-20
未找到文件。
drivers/regulator/tps65912-regulator.c
浏览文件 @
a5848622
...
...
@@ -118,6 +118,15 @@ struct tps65912_reg {
int
eco_reg
;
};
static
const
struct
regulator_linear_range
tps65912_ldo_ranges
[]
=
{
{
.
min_uV
=
800000
,
.
max_uV
=
1600000
,
.
min_sel
=
0
,
.
max_sel
=
32
,
.
uV_step
=
25000
},
{
.
min_uV
=
1650000
,
.
max_uV
=
3000000
,
.
min_sel
=
33
,
.
max_sel
=
60
,
.
uV_step
=
50000
},
{
.
min_uV
=
3100000
,
.
max_uV
=
3300000
,
.
min_sel
=
61
,
.
max_sel
=
63
,
.
uV_step
=
100000
},
};
static
int
tps65912_get_range
(
struct
tps65912_reg
*
pmic
,
int
id
)
{
struct
tps65912
*
mfd
=
pmic
->
mfd
;
...
...
@@ -184,20 +193,6 @@ static unsigned long tps65912_vsel_to_uv_range3(u8 vsel)
return
uv
;
}
static
unsigned
long
tps65912_vsel_to_uv_ldo
(
u8
vsel
)
{
unsigned
long
uv
=
0
;
if
(
vsel
<=
32
)
uv
=
((
vsel
*
25000
)
+
800000
);
else
if
(
vsel
>
32
&&
vsel
<=
60
)
uv
=
(((
vsel
-
32
)
*
50000
)
+
1600000
);
else
if
(
vsel
>
60
)
uv
=
(((
vsel
-
60
)
*
100000
)
+
3000000
);
return
uv
;
}
static
int
tps65912_get_ctrl_register
(
int
id
)
{
if
(
id
>=
TPS65912_REG_DCDC1
&&
id
<=
TPS65912_REG_LDO4
)
...
...
@@ -376,9 +371,6 @@ static int tps65912_list_voltage(struct regulator_dev *dev, unsigned selector)
struct
tps65912_reg
*
pmic
=
rdev_get_drvdata
(
dev
);
int
range
,
voltage
=
0
,
id
=
rdev_get_id
(
dev
);
if
(
id
>=
TPS65912_REG_LDO1
&&
id
<=
TPS65912_REG_LDO10
)
return
tps65912_vsel_to_uv_ldo
(
selector
);
if
(
id
>
TPS65912_REG_DCDC4
)
return
-
EINVAL
;
...
...
@@ -456,7 +448,8 @@ static struct regulator_ops tps65912_ops_ldo = {
.
disable
=
tps65912_reg_disable
,
.
get_voltage_sel
=
tps65912_get_voltage_sel
,
.
set_voltage_sel
=
tps65912_set_voltage_sel
,
.
list_voltage
=
tps65912_list_voltage
,
.
list_voltage
=
regulator_list_voltage_linear_range
,
.
map_voltage
=
regulator_map_voltage_linear_range
,
};
static
int
tps65912_probe
(
struct
platform_device
*
pdev
)
...
...
@@ -495,8 +488,14 @@ static int tps65912_probe(struct platform_device *pdev)
pmic
->
desc
[
i
].
name
=
info
->
name
;
pmic
->
desc
[
i
].
id
=
i
;
pmic
->
desc
[
i
].
n_voltages
=
64
;
pmic
->
desc
[
i
].
ops
=
(
i
>
TPS65912_REG_DCDC4
?
&
tps65912_ops_ldo
:
&
tps65912_ops_dcdc
);
if
(
i
>
TPS65912_REG_DCDC4
)
{
pmic
->
desc
[
i
].
ops
=
&
tps65912_ops_ldo
;
pmic
->
desc
[
i
].
linear_ranges
=
tps65912_ldo_ranges
;
pmic
->
desc
[
i
].
n_linear_ranges
=
ARRAY_SIZE
(
tps65912_ldo_ranges
);
}
else
{
pmic
->
desc
[
i
].
ops
=
&
tps65912_ops_dcdc
;
}
pmic
->
desc
[
i
].
type
=
REGULATOR_VOLTAGE
;
pmic
->
desc
[
i
].
owner
=
THIS_MODULE
;
range
=
tps65912_get_range
(
pmic
,
i
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录