Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
b5db7cde
Commit
b5db7cde
authored
Feb 28, 2011
by
Anton Vorontsov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bq27x00-for-upstream' of
git://git.metafoo.de/linux-2.6
parents
d6ccc442
9e912f45
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
593 additions
and
171 deletions
+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
No files found.
drivers/power/Kconfig
View file @
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
...
...
drivers/power/bq27x00_battery.c
View file @
b5db7cde
This diff is collapsed.
Click to expand it.
drivers/power/power_supply_core.c
View file @
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
;
...
...
drivers/power/power_supply_sysfs.c
View file @
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
;
...
...
include/linux/power/bq27x00_battery.h
0 → 100644
View file @
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment