Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
b5db7cde
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看板
提交
b5db7cde
编写于
13年前
作者:
A
Anton Vorontsov
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'bq27x00-for-upstream' of
git://git.metafoo.de/linux-2.6
上级
d6ccc442
9e912f45
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
593 addition
and
171 deletion
+593
-171
drivers/power/Kconfig
drivers/power/Kconfig
+14
-0
drivers/power/bq27x00_battery.c
drivers/power/bq27x00_battery.c
+557
-168
drivers/power/power_supply_core.c
drivers/power/power_supply_core.c
+2
-2
drivers/power/power_supply_sysfs.c
drivers/power/power_supply_sysfs.c
+1
-1
include/linux/power/bq27x00_battery.h
include/linux/power/bq27x00_battery.h
+19
-0
未找到文件。
drivers/power/Kconfig
浏览文件 @
b5db7cde
...
...
@@ -117,10 +117,24 @@ config BATTERY_BQ20Z75
config BATTERY_BQ27x00
tristate "BQ27x00 battery driver"
help
Say Y here to enable support for batteries with BQ27x00 (I2C/HDQ) chips.
config BATTERY_BQ27X00_I2C
bool "BQ27200/BQ27500 support"
depends on BATTERY_BQ27x00
depends on I2C
default y
help
Say Y here to enable support for batteries with BQ27x00 (I2C) chips.
config BATTERY_BQ27X00_PLATFORM
bool "BQ27000 support"
depends on BATTERY_BQ27x00
default y
help
Say Y here to enable support for batteries with BQ27000 (HDQ) chips.
config BATTERY_DA9030
tristate "DA9030 battery driver"
depends on PMIC_DA903X
...
...
This diff is collapsed.
Click to expand it.
drivers/power/bq27x00_battery.c
浏览文件 @
b5db7cde
此差异已折叠。
点击以展开。
drivers/power/power_supply_core.c
浏览文件 @
b5db7cde
...
...
@@ -171,6 +171,8 @@ int power_supply_register(struct device *parent, struct power_supply *psy)
dev_set_drvdata
(
dev
,
psy
);
psy
->
dev
=
dev
;
INIT_WORK
(
&
psy
->
changed_work
,
power_supply_changed_work
);
rc
=
kobject_set_name
(
&
dev
->
kobj
,
"%s"
,
psy
->
name
);
if
(
rc
)
goto
kobject_set_name_failed
;
...
...
@@ -179,8 +181,6 @@ int power_supply_register(struct device *parent, struct power_supply *psy)
if
(
rc
)
goto
device_add_failed
;
INIT_WORK
(
&
psy
->
changed_work
,
power_supply_changed_work
);
rc
=
power_supply_create_triggers
(
psy
);
if
(
rc
)
goto
create_triggers_failed
;
...
...
This diff is collapsed.
Click to expand it.
drivers/power/power_supply_sysfs.c
浏览文件 @
b5db7cde
...
...
@@ -270,7 +270,7 @@ int power_supply_uevent(struct device *dev, struct kobj_uevent_env *env)
attr
=
&
power_supply_attrs
[
psy
->
properties
[
j
]];
ret
=
power_supply_show_property
(
dev
,
attr
,
prop_buf
);
if
(
ret
==
-
ENODEV
)
{
if
(
ret
==
-
ENODEV
||
ret
==
-
ENODATA
)
{
/* When a battery is absent, we expect -ENODEV. Don't abort;
send the uevent with at least the the PRESENT=0 property */
ret
=
0
;
...
...
This diff is collapsed.
Click to expand it.
include/linux/power/bq27x00_battery.h
0 → 100644
浏览文件 @
b5db7cde
#ifndef __LINUX_BQ27X00_BATTERY_H__
#define __LINUX_BQ27X00_BATTERY_H__
/**
* struct bq27000_plaform_data - Platform data for bq27000 devices
* @name: Name of the battery. If NULL the driver will fallback to "bq27000".
* @read: HDQ read callback.
* This function should provide access to the HDQ bus the battery is
* connected to.
* The first parameter is a pointer to the battery device, the second the
* register to be read. The return value should either be the content of
* the passed register or an error value.
*/
struct
bq27000_platform_data
{
const
char
*
name
;
int
(
*
read
)(
struct
device
*
dev
,
unsigned
int
);
};
#endif
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部