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
f7c8f1de
Commit
f7c8f1de
authored
Aug 16, 2016
by
Sebastian Reichel
Browse files
Options
Browse Files
Download
Plain Diff
Merge tag 'for-v4.8-rc' into psy-next
Power Supply Fixes for 4.8 cycle
parents
b732ace4
33e7664a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
8 deletions
+15
-8
drivers/power/reset/Kconfig
drivers/power/reset/Kconfig
+1
-1
drivers/power/reset/hisi-reboot.c
drivers/power/reset/hisi-reboot.c
+4
-1
drivers/power/supply/max17042_battery.c
drivers/power/supply/max17042_battery.c
+9
-6
drivers/power/supply/tps65217_charger.c
drivers/power/supply/tps65217_charger.c
+1
-0
No files found.
drivers/power/reset/Kconfig
View file @
f7c8f1de
...
@@ -200,8 +200,8 @@ config REBOOT_MODE
...
@@ -200,8 +200,8 @@ config REBOOT_MODE
config SYSCON_REBOOT_MODE
config SYSCON_REBOOT_MODE
tristate "Generic SYSCON regmap reboot mode driver"
tristate "Generic SYSCON regmap reboot mode driver"
depends on OF
depends on OF
depends on MFD_SYSCON
select REBOOT_MODE
select REBOOT_MODE
select MFD_SYSCON
help
help
Say y here will enable reboot mode driver. This will
Say y here will enable reboot mode driver. This will
get reboot mode arguments and store it in SYSCON mapped
get reboot mode arguments and store it in SYSCON mapped
...
...
drivers/power/reset/hisi-reboot.c
View file @
f7c8f1de
...
@@ -53,13 +53,16 @@ static int hisi_reboot_probe(struct platform_device *pdev)
...
@@ -53,13 +53,16 @@ static int hisi_reboot_probe(struct platform_device *pdev)
if
(
of_property_read_u32
(
np
,
"reboot-offset"
,
&
reboot_offset
)
<
0
)
{
if
(
of_property_read_u32
(
np
,
"reboot-offset"
,
&
reboot_offset
)
<
0
)
{
pr_err
(
"failed to find reboot-offset property
\n
"
);
pr_err
(
"failed to find reboot-offset property
\n
"
);
iounmap
(
base
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
err
=
register_restart_handler
(
&
hisi_restart_nb
);
err
=
register_restart_handler
(
&
hisi_restart_nb
);
if
(
err
)
if
(
err
)
{
dev_err
(
&
pdev
->
dev
,
"cannot register restart handler (err=%d)
\n
"
,
dev_err
(
&
pdev
->
dev
,
"cannot register restart handler (err=%d)
\n
"
,
err
);
err
);
iounmap
(
base
);
}
return
err
;
return
err
;
}
}
...
...
drivers/power/supply/max17042_battery.c
View file @
f7c8f1de
...
@@ -457,13 +457,16 @@ static inline void max17042_write_model_data(struct max17042_chip *chip,
...
@@ -457,13 +457,16 @@ static inline void max17042_write_model_data(struct max17042_chip *chip,
}
}
static
inline
void
max17042_read_model_data
(
struct
max17042_chip
*
chip
,
static
inline
void
max17042_read_model_data
(
struct
max17042_chip
*
chip
,
u8
addr
,
u
32
*
data
,
int
size
)
u8
addr
,
u
16
*
data
,
int
size
)
{
{
struct
regmap
*
map
=
chip
->
regmap
;
struct
regmap
*
map
=
chip
->
regmap
;
int
i
;
int
i
;
u32
tmp
;
for
(
i
=
0
;
i
<
size
;
i
++
)
for
(
i
=
0
;
i
<
size
;
i
++
)
{
regmap_read
(
map
,
addr
+
i
,
&
data
[
i
]);
regmap_read
(
map
,
addr
+
i
,
&
tmp
);
data
[
i
]
=
(
u16
)
tmp
;
}
}
}
static
inline
int
max17042_model_data_compare
(
struct
max17042_chip
*
chip
,
static
inline
int
max17042_model_data_compare
(
struct
max17042_chip
*
chip
,
...
@@ -486,7 +489,7 @@ static int max17042_init_model(struct max17042_chip *chip)
...
@@ -486,7 +489,7 @@ static int max17042_init_model(struct max17042_chip *chip)
{
{
int
ret
;
int
ret
;
int
table_size
=
ARRAY_SIZE
(
chip
->
pdata
->
config_data
->
cell_char_tbl
);
int
table_size
=
ARRAY_SIZE
(
chip
->
pdata
->
config_data
->
cell_char_tbl
);
u
32
*
temp_data
;
u
16
*
temp_data
;
temp_data
=
kcalloc
(
table_size
,
sizeof
(
*
temp_data
),
GFP_KERNEL
);
temp_data
=
kcalloc
(
table_size
,
sizeof
(
*
temp_data
),
GFP_KERNEL
);
if
(
!
temp_data
)
if
(
!
temp_data
)
...
@@ -501,7 +504,7 @@ static int max17042_init_model(struct max17042_chip *chip)
...
@@ -501,7 +504,7 @@ static int max17042_init_model(struct max17042_chip *chip)
ret
=
max17042_model_data_compare
(
ret
=
max17042_model_data_compare
(
chip
,
chip
,
chip
->
pdata
->
config_data
->
cell_char_tbl
,
chip
->
pdata
->
config_data
->
cell_char_tbl
,
(
u16
*
)
temp_data
,
temp_data
,
table_size
);
table_size
);
max10742_lock_model
(
chip
);
max10742_lock_model
(
chip
);
...
@@ -514,7 +517,7 @@ static int max17042_verify_model_lock(struct max17042_chip *chip)
...
@@ -514,7 +517,7 @@ static int max17042_verify_model_lock(struct max17042_chip *chip)
{
{
int
i
;
int
i
;
int
table_size
=
ARRAY_SIZE
(
chip
->
pdata
->
config_data
->
cell_char_tbl
);
int
table_size
=
ARRAY_SIZE
(
chip
->
pdata
->
config_data
->
cell_char_tbl
);
u
32
*
temp_data
;
u
16
*
temp_data
;
int
ret
=
0
;
int
ret
=
0
;
temp_data
=
kcalloc
(
table_size
,
sizeof
(
*
temp_data
),
GFP_KERNEL
);
temp_data
=
kcalloc
(
table_size
,
sizeof
(
*
temp_data
),
GFP_KERNEL
);
...
...
drivers/power/supply/tps65217_charger.c
View file @
f7c8f1de
...
@@ -209,6 +209,7 @@ static int tps65217_charger_probe(struct platform_device *pdev)
...
@@ -209,6 +209,7 @@ static int tps65217_charger_probe(struct platform_device *pdev)
if
(
!
charger
)
if
(
!
charger
)
return
-
ENOMEM
;
return
-
ENOMEM
;
platform_set_drvdata
(
pdev
,
charger
);
charger
->
tps
=
tps
;
charger
->
tps
=
tps
;
charger
->
dev
=
&
pdev
->
dev
;
charger
->
dev
=
&
pdev
->
dev
;
...
...
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