Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
5ec2a5e8
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看板
提交
5ec2a5e8
编写于
2月 19, 2013
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'regulator/topic/lp3971' into regulator-next
上级
a4dba88e
f38482fa
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
6 addition
and
16 deletion
+6
-16
drivers/regulator/lp3971.c
drivers/regulator/lp3971.c
+6
-16
未找到文件。
drivers/regulator/lp3971.c
浏览文件 @
5ec2a5e8
...
...
@@ -73,8 +73,6 @@ static const unsigned int buck_voltage_map[] = {
};
#define BUCK_TARGET_VOL_MASK 0x3f
#define BUCK_TARGET_VOL_MIN_IDX 0x01
#define BUCK_TARGET_VOL_MAX_IDX 0x19
#define LP3971_BUCK_RAMP_REG(x) (buck_base_addr[x]+2)
...
...
@@ -140,7 +138,7 @@ static int lp3971_ldo_disable(struct regulator_dev *dev)
return
lp3971_set_bits
(
lp3971
,
LP3971_LDO_ENABLE_REG
,
mask
,
0
);
}
static
int
lp3971_ldo_get_voltage
(
struct
regulator_dev
*
dev
)
static
int
lp3971_ldo_get_voltage
_sel
(
struct
regulator_dev
*
dev
)
{
struct
lp3971
*
lp3971
=
rdev_get_drvdata
(
dev
);
int
ldo
=
rdev_get_id
(
dev
)
-
LP3971_LDO1
;
...
...
@@ -149,7 +147,7 @@ static int lp3971_ldo_get_voltage(struct regulator_dev *dev)
reg
=
lp3971_reg_read
(
lp3971
,
LP3971_LDO_VOL_CONTR_REG
(
ldo
));
val
=
(
reg
>>
LDO_VOL_CONTR_SHIFT
(
ldo
))
&
LDO_VOL_CONTR_MASK
;
return
dev
->
desc
->
volt_table
[
val
]
;
return
val
;
}
static
int
lp3971_ldo_set_voltage_sel
(
struct
regulator_dev
*
dev
,
...
...
@@ -168,7 +166,7 @@ static struct regulator_ops lp3971_ldo_ops = {
.
is_enabled
=
lp3971_ldo_is_enabled
,
.
enable
=
lp3971_ldo_enable
,
.
disable
=
lp3971_ldo_disable
,
.
get_voltage
=
lp3971_ldo_get_voltage
,
.
get_voltage
_sel
=
lp3971_ldo_get_voltage_sel
,
.
set_voltage_sel
=
lp3971_ldo_set_voltage_sel
,
};
...
...
@@ -201,24 +199,16 @@ static int lp3971_dcdc_disable(struct regulator_dev *dev)
return
lp3971_set_bits
(
lp3971
,
LP3971_BUCK_VOL_ENABLE_REG
,
mask
,
0
);
}
static
int
lp3971_dcdc_get_voltage
(
struct
regulator_dev
*
dev
)
static
int
lp3971_dcdc_get_voltage
_sel
(
struct
regulator_dev
*
dev
)
{
struct
lp3971
*
lp3971
=
rdev_get_drvdata
(
dev
);
int
buck
=
rdev_get_id
(
dev
)
-
LP3971_DCDC1
;
u16
reg
;
int
val
;
reg
=
lp3971_reg_read
(
lp3971
,
LP3971_BUCK_TARGET_VOL1_REG
(
buck
));
reg
&=
BUCK_TARGET_VOL_MASK
;
if
(
reg
<=
BUCK_TARGET_VOL_MAX_IDX
)
val
=
buck_voltage_map
[
reg
];
else
{
val
=
0
;
dev_warn
(
&
dev
->
dev
,
"chip reported incorrect voltage value.
\n
"
);
}
return
val
;
return
reg
;
}
static
int
lp3971_dcdc_set_voltage_sel
(
struct
regulator_dev
*
dev
,
...
...
@@ -249,7 +239,7 @@ static struct regulator_ops lp3971_dcdc_ops = {
.
is_enabled
=
lp3971_dcdc_is_enabled
,
.
enable
=
lp3971_dcdc_enable
,
.
disable
=
lp3971_dcdc_disable
,
.
get_voltage
=
lp3971_dcdc_get_voltage
,
.
get_voltage
_sel
=
lp3971_dcdc_get_voltage_sel
,
.
set_voltage_sel
=
lp3971_dcdc_set_voltage_sel
,
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录