BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mangoh-drivers
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
mangoh-drivers
Commits
b1f82628
Commit
b1f82628
authored
Dec 22, 2017
by
David Frey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove chip id from ltc294x platform data
parent
e953ce03
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
18 deletions
+5
-18
ltc2941-battery-gauge.c
linux_kernel_modules/ltc294x/ltc2941-battery-gauge.c
+4
-7
ltc294x-platform-data.h
linux_kernel_modules/ltc294x/ltc294x-platform-data.h
+1
-10
mangoh_red.c
linux_kernel_modules/mangoh/mangoh_red.c
+0
-1
No files found.
linux_kernel_modules/ltc294x/ltc2941-battery-gauge.c
View file @
b1f82628
...
...
@@ -45,13 +45,12 @@ enum ltc294x_reg {
LTC2943_REG_TEMPERATURE_LSB
=
0x15
,
};
/*
enum ltc294x_id {
enum
ltc294x_id
{
LTC2941_ID
,
LTC2942_ID
,
LTC2943_ID
,
LTC2944_ID
,
};
*/
#define LTC2941_REG_STATUS_CHIP_ID BIT(7)
...
...
@@ -423,16 +422,15 @@ static int ltc294x_i2c_probe(struct i2c_client *client,
u32
prescaler_exp
;
u8
status
;
info
=
devm_kzalloc
(
&
client
->
dev
,
sizeof
(
*
info
),
GFP_KERNEL
);
if
(
info
==
NULL
)
return
-
ENOMEM
;
i2c_set_clientdata
(
client
,
info
);
platform_data
=
client
->
dev
.
platform_data
;
info
->
id
=
platform_data
->
chip_id
;
info
->
id
=
(
enum
ltc294x_id
)
id
->
driver_data
;
info
->
supply
.
name
=
platform_data
->
name
;
/* r_sense can be negative, when sense+ is connected to the battery
...
...
@@ -491,7 +489,6 @@ static int ltc294x_i2c_probe(struct i2c_client *client,
info
->
supply
.
property_is_writeable
=
ltc294x_property_is_writeable
;
info
->
supply
.
external_power_changed
=
NULL
;
INIT_DELAYED_WORK
(
&
info
->
work
,
ltc294x_work
);
ret
=
ltc294x_reset
(
info
,
prescaler_exp
);
...
...
@@ -501,7 +498,7 @@ static int ltc294x_i2c_probe(struct i2c_client *client,
}
ret
=
power_supply_register
(
&
client
->
dev
,
&
info
->
supply
);
if
(
ret
<
0
)
{
if
(
ret
)
{
dev_err
(
&
client
->
dev
,
"failed to register ltc2941
\n
"
);
return
ret
;
}
else
{
...
...
linux_kernel_modules/ltc294x/ltc294x-platform-data.h
View file @
b1f82628
#ifndef LTC294X_PLATFORM_DATA_H
#define LTC294X_PLATFORM_DATA_H
// TODO: duplicated between .c and .h - that's bad
enum
ltc294x_id
{
LTC2941_ID
,
LTC2942_ID
,
LTC2943_ID
,
LTC2944_ID
,
};
struct
ltc294x_platform_data
{
enum
ltc294x_id
chip_id
;
const
char
*
name
;
int
r_sense
;
u32
prescaler_exp
;
const
char
*
name
;
};
#endif
/* LTC294X_PLATFORM_DATA_H */
...
...
linux_kernel_modules/mangoh/mangoh_red.c
View file @
b1f82628
...
...
@@ -159,7 +159,6 @@ static struct i2c_board_info mangoh_red_pressure_devinfo = {
};
static
struct
ltc294x_platform_data
mangoh_red_battery_gauge_platform_data
=
{
.
chip_id
=
LTC2942_ID
,
.
r_sense
=
18
,
.
prescaler_exp
=
32
,
.
name
=
"LTC2942"
,
...
...
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