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
Kirill Smelkov
linux
Commits
2fc6d0ec
Commit
2fc6d0ec
authored
Jun 29, 2021
by
Sebastian Reichel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'psy-fixes' into psy-next
parents
eab4e6d9
601423bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
drivers/power/supply/surface_battery.c
drivers/power/supply/surface_battery.c
+12
-2
drivers/power/supply/surface_charger.c
drivers/power/supply/surface_charger.c
+1
-1
No files found.
drivers/power/supply/surface_battery.c
View file @
2fc6d0ec
...
...
@@ -345,6 +345,16 @@ static u32 spwr_notify_bat(struct ssam_event_notifier *nf, const struct ssam_eve
struct
spwr_battery_device
*
bat
=
container_of
(
nf
,
struct
spwr_battery_device
,
notif
);
int
status
;
/*
* We cannot use strict matching when registering the notifier as the
* EC expects us to register it against instance ID 0. Strict matching
* would thus drop events, as those may have non-zero instance IDs in
* this subsystem. So we need to check the instance ID of the event
* here manually.
*/
if
(
event
->
instance_id
!=
bat
->
sdev
->
uid
.
instance
)
return
0
;
dev_dbg
(
&
bat
->
sdev
->
dev
,
"power event (cid = %#04x, iid = %#04x, tid = %#04x)
\n
"
,
event
->
command_id
,
event
->
instance_id
,
event
->
target_id
);
...
...
@@ -720,8 +730,8 @@ static void spwr_battery_init(struct spwr_battery_device *bat, struct ssam_devic
bat
->
notif
.
base
.
fn
=
spwr_notify_bat
;
bat
->
notif
.
event
.
reg
=
registry
;
bat
->
notif
.
event
.
id
.
target_category
=
sdev
->
uid
.
category
;
bat
->
notif
.
event
.
id
.
instance
=
0
;
bat
->
notif
.
event
.
mask
=
SSAM_EVENT_MASK_
STRIC
T
;
bat
->
notif
.
event
.
id
.
instance
=
0
;
/* need to register with instance 0 */
bat
->
notif
.
event
.
mask
=
SSAM_EVENT_MASK_
TARGE
T
;
bat
->
notif
.
event
.
flags
=
SSAM_EVENT_SEQUENCED
;
bat
->
psy_desc
.
name
=
bat
->
name
;
...
...
drivers/power/supply/surface_charger.c
View file @
2fc6d0ec
...
...
@@ -66,7 +66,7 @@ struct spwr_ac_device {
static
int
spwr_ac_update_unlocked
(
struct
spwr_ac_device
*
ac
)
{
u
32
old
=
ac
->
state
;
__le
32
old
=
ac
->
state
;
int
status
;
lockdep_assert_held
(
&
ac
->
lock
);
...
...
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