Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
3ab91da2
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
3ab91da2
编写于
1月 15, 2013
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'regulator/fix/max8998' into tmp
上级
c6318467
81d0a6ae
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
22 addition
and
22 deletion
+22
-22
drivers/regulator/max8998.c
drivers/regulator/max8998.c
+22
-22
未找到文件。
drivers/regulator/max8998.c
浏览文件 @
3ab91da2
...
...
@@ -51,39 +51,39 @@ struct voltage_map_desc {
int
step
;
};
/* Voltage maps */
/* Voltage maps
in uV
*/
static
const
struct
voltage_map_desc
ldo23_voltage_map_desc
=
{
.
min
=
800
,
.
step
=
50
,
.
max
=
13
00
,
.
min
=
800
000
,
.
step
=
50000
,
.
max
=
13000
00
,
};
static
const
struct
voltage_map_desc
ldo456711_voltage_map_desc
=
{
.
min
=
1600
,
.
step
=
100
,
.
max
=
36
00
,
.
min
=
1600
000
,
.
step
=
100000
,
.
max
=
36000
00
,
};
static
const
struct
voltage_map_desc
ldo8_voltage_map_desc
=
{
.
min
=
3000
,
.
step
=
100
,
.
max
=
36
00
,
.
min
=
3000
000
,
.
step
=
100000
,
.
max
=
36000
00
,
};
static
const
struct
voltage_map_desc
ldo9_voltage_map_desc
=
{
.
min
=
2800
,
.
step
=
100
,
.
max
=
31
00
,
.
min
=
2800
000
,
.
step
=
100000
,
.
max
=
31000
00
,
};
static
const
struct
voltage_map_desc
ldo10_voltage_map_desc
=
{
.
min
=
950
,
.
step
=
50
,
.
max
=
13
00
,
.
min
=
950
00
,
.
step
=
50000
,
.
max
=
13000
00
,
};
static
const
struct
voltage_map_desc
ldo1213_voltage_map_desc
=
{
.
min
=
800
,
.
step
=
100
,
.
max
=
33
00
,
.
min
=
800
000
,
.
step
=
100000
,
.
max
=
33000
00
,
};
static
const
struct
voltage_map_desc
ldo1415_voltage_map_desc
=
{
.
min
=
1200
,
.
step
=
100
,
.
max
=
33
00
,
.
min
=
1200
000
,
.
step
=
100000
,
.
max
=
33000
00
,
};
static
const
struct
voltage_map_desc
ldo1617_voltage_map_desc
=
{
.
min
=
1600
,
.
step
=
100
,
.
max
=
36
00
,
.
min
=
1600
000
,
.
step
=
100000
,
.
max
=
36000
00
,
};
static
const
struct
voltage_map_desc
buck12_voltage_map_desc
=
{
.
min
=
750
,
.
step
=
25
,
.
max
=
1525
,
.
min
=
750
000
,
.
step
=
25000
,
.
max
=
1525000
,
};
static
const
struct
voltage_map_desc
buck3_voltage_map_desc
=
{
.
min
=
1600
,
.
step
=
100
,
.
max
=
36
00
,
.
min
=
1600
000
,
.
step
=
100000
,
.
max
=
36000
00
,
};
static
const
struct
voltage_map_desc
buck4_voltage_map_desc
=
{
.
min
=
800
,
.
step
=
100
,
.
max
=
23
00
,
.
min
=
800
000
,
.
step
=
100000
,
.
max
=
23000
00
,
};
static
const
struct
voltage_map_desc
*
ldo_voltage_map
[]
=
{
...
...
@@ -445,9 +445,9 @@ static int max8998_set_voltage_buck_time_sel(struct regulator_dev *rdev,
if
(
max8998
->
iodev
->
type
==
TYPE_MAX8998
&&
!
(
val
&
MAX8998_ENRAMP
))
return
0
;
difference
=
(
new_selector
-
old_selector
)
*
desc
->
step
;
difference
=
(
new_selector
-
old_selector
)
*
desc
->
step
/
1000
;
if
(
difference
>
0
)
return
difference
/
(
(
val
&
0x0f
)
+
1
);
return
DIV_ROUND_UP
(
difference
,
(
val
&
0x0f
)
+
1
);
return
0
;
}
...
...
@@ -702,7 +702,7 @@ static int max8998_pmic_probe(struct platform_device *pdev)
i
=
0
;
while
(
buck12_voltage_map_desc
.
min
+
buck12_voltage_map_desc
.
step
*
i
<
(
pdata
->
buck1_voltage1
/
1000
)
)
<
pdata
->
buck1_voltage1
)
i
++
;
max8998
->
buck1_vol
[
0
]
=
i
;
ret
=
max8998_write_reg
(
i2c
,
MAX8998_REG_BUCK1_VOLTAGE1
,
i
);
...
...
@@ -713,7 +713,7 @@ static int max8998_pmic_probe(struct platform_device *pdev)
i
=
0
;
while
(
buck12_voltage_map_desc
.
min
+
buck12_voltage_map_desc
.
step
*
i
<
(
pdata
->
buck1_voltage2
/
1000
)
)
<
pdata
->
buck1_voltage2
)
i
++
;
max8998
->
buck1_vol
[
1
]
=
i
;
...
...
@@ -725,7 +725,7 @@ static int max8998_pmic_probe(struct platform_device *pdev)
i
=
0
;
while
(
buck12_voltage_map_desc
.
min
+
buck12_voltage_map_desc
.
step
*
i
<
(
pdata
->
buck1_voltage3
/
1000
)
)
<
pdata
->
buck1_voltage3
)
i
++
;
max8998
->
buck1_vol
[
2
]
=
i
;
...
...
@@ -737,7 +737,7 @@ static int max8998_pmic_probe(struct platform_device *pdev)
i
=
0
;
while
(
buck12_voltage_map_desc
.
min
+
buck12_voltage_map_desc
.
step
*
i
<
(
pdata
->
buck1_voltage4
/
1000
)
)
<
pdata
->
buck1_voltage4
)
i
++
;
max8998
->
buck1_vol
[
3
]
=
i
;
...
...
@@ -763,7 +763,7 @@ static int max8998_pmic_probe(struct platform_device *pdev)
i
=
0
;
while
(
buck12_voltage_map_desc
.
min
+
buck12_voltage_map_desc
.
step
*
i
<
(
pdata
->
buck2_voltage1
/
1000
)
)
<
pdata
->
buck2_voltage1
)
i
++
;
max8998
->
buck2_vol
[
0
]
=
i
;
ret
=
max8998_write_reg
(
i2c
,
MAX8998_REG_BUCK2_VOLTAGE1
,
i
);
...
...
@@ -774,7 +774,7 @@ static int max8998_pmic_probe(struct platform_device *pdev)
i
=
0
;
while
(
buck12_voltage_map_desc
.
min
+
buck12_voltage_map_desc
.
step
*
i
<
(
pdata
->
buck2_voltage2
/
1000
)
)
<
pdata
->
buck2_voltage2
)
i
++
;
max8998
->
buck2_vol
[
1
]
=
i
;
ret
=
max8998_write_reg
(
i2c
,
MAX8998_REG_BUCK2_VOLTAGE2
,
i
);
...
...
@@ -792,8 +792,8 @@ static int max8998_pmic_probe(struct platform_device *pdev)
int
count
=
(
desc
->
max
-
desc
->
min
)
/
desc
->
step
+
1
;
regulators
[
index
].
n_voltages
=
count
;
regulators
[
index
].
min_uV
=
desc
->
min
*
1000
;
regulators
[
index
].
uV_step
=
desc
->
step
*
1000
;
regulators
[
index
].
min_uV
=
desc
->
min
;
regulators
[
index
].
uV_step
=
desc
->
step
;
}
config
.
dev
=
max8998
->
dev
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录