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
68313be4
Commit
68313be4
authored
Apr 11, 2024
by
Rafael J. Wysocki
Browse files
Options
Browse Files
Download
Plain Diff
Merge back earlier system-wide PM changes for 6.10.
parents
3c89a068
5b9eda2b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
15 deletions
+16
-15
drivers/base/power/main.c
drivers/base/power/main.c
+3
-3
drivers/base/power/wakeup.c
drivers/base/power/wakeup.c
+7
-4
drivers/mmc/host/sdhci-pci-core.c
drivers/mmc/host/sdhci-pci-core.c
+1
-1
include/linux/pm_wakeup.h
include/linux/pm_wakeup.h
+5
-7
No files found.
drivers/base/power/main.c
View file @
68313be4
...
@@ -208,7 +208,7 @@ static ktime_t initcall_debug_start(struct device *dev, void *cb)
...
@@ -208,7 +208,7 @@ static ktime_t initcall_debug_start(struct device *dev, void *cb)
if
(
!
pm_print_times_enabled
)
if
(
!
pm_print_times_enabled
)
return
0
;
return
0
;
dev_info
(
dev
,
"calling %p
S
@ %i, parent: %s
\n
"
,
cb
,
dev_info
(
dev
,
"calling %p
s
@ %i, parent: %s
\n
"
,
cb
,
task_pid_nr
(
current
),
task_pid_nr
(
current
),
dev
->
parent
?
dev_name
(
dev
->
parent
)
:
"none"
);
dev
->
parent
?
dev_name
(
dev
->
parent
)
:
"none"
);
return
ktime_get
();
return
ktime_get
();
...
@@ -223,7 +223,7 @@ static void initcall_debug_report(struct device *dev, ktime_t calltime,
...
@@ -223,7 +223,7 @@ static void initcall_debug_report(struct device *dev, ktime_t calltime,
return
;
return
;
rettime
=
ktime_get
();
rettime
=
ktime_get
();
dev_info
(
dev
,
"%p
S
returned %d after %Ld usecs
\n
"
,
cb
,
error
,
dev_info
(
dev
,
"%p
s
returned %d after %Ld usecs
\n
"
,
cb
,
error
,
(
unsigned
long
long
)
ktime_us_delta
(
rettime
,
calltime
));
(
unsigned
long
long
)
ktime_us_delta
(
rettime
,
calltime
));
}
}
...
@@ -1927,7 +1927,7 @@ EXPORT_SYMBOL_GPL(dpm_suspend_start);
...
@@ -1927,7 +1927,7 @@ EXPORT_SYMBOL_GPL(dpm_suspend_start);
void
__suspend_report_result
(
const
char
*
function
,
struct
device
*
dev
,
void
*
fn
,
int
ret
)
void
__suspend_report_result
(
const
char
*
function
,
struct
device
*
dev
,
void
*
fn
,
int
ret
)
{
{
if
(
ret
)
if
(
ret
)
dev_err
(
dev
,
"%s(): %p
S
returns %d
\n
"
,
function
,
fn
,
ret
);
dev_err
(
dev
,
"%s(): %p
s
returns %d
\n
"
,
function
,
fn
,
ret
);
}
}
EXPORT_SYMBOL_GPL
(
__suspend_report_result
);
EXPORT_SYMBOL_GPL
(
__suspend_report_result
);
...
...
drivers/base/power/wakeup.c
View file @
68313be4
...
@@ -451,16 +451,15 @@ static struct wakeup_source *device_wakeup_detach(struct device *dev)
...
@@ -451,16 +451,15 @@ static struct wakeup_source *device_wakeup_detach(struct device *dev)
* Detach the @dev's wakeup source object from it, unregister this wakeup source
* Detach the @dev's wakeup source object from it, unregister this wakeup source
* object and destroy it.
* object and destroy it.
*/
*/
int
device_wakeup_disable
(
struct
device
*
dev
)
void
device_wakeup_disable
(
struct
device
*
dev
)
{
{
struct
wakeup_source
*
ws
;
struct
wakeup_source
*
ws
;
if
(
!
dev
||
!
dev
->
power
.
can_wakeup
)
if
(
!
dev
||
!
dev
->
power
.
can_wakeup
)
return
-
EINVAL
;
return
;
ws
=
device_wakeup_detach
(
dev
);
ws
=
device_wakeup_detach
(
dev
);
wakeup_source_unregister
(
ws
);
wakeup_source_unregister
(
ws
);
return
0
;
}
}
EXPORT_SYMBOL_GPL
(
device_wakeup_disable
);
EXPORT_SYMBOL_GPL
(
device_wakeup_disable
);
...
@@ -502,7 +501,11 @@ EXPORT_SYMBOL_GPL(device_set_wakeup_capable);
...
@@ -502,7 +501,11 @@ EXPORT_SYMBOL_GPL(device_set_wakeup_capable);
*/
*/
int
device_set_wakeup_enable
(
struct
device
*
dev
,
bool
enable
)
int
device_set_wakeup_enable
(
struct
device
*
dev
,
bool
enable
)
{
{
return
enable
?
device_wakeup_enable
(
dev
)
:
device_wakeup_disable
(
dev
);
if
(
enable
)
return
device_wakeup_enable
(
dev
);
device_wakeup_disable
(
dev
);
return
0
;
}
}
EXPORT_SYMBOL_GPL
(
device_set_wakeup_enable
);
EXPORT_SYMBOL_GPL
(
device_set_wakeup_enable
);
...
...
drivers/mmc/host/sdhci-pci-core.c
View file @
68313be4
...
@@ -63,7 +63,7 @@ static int sdhci_pci_init_wakeup(struct sdhci_pci_chip *chip)
...
@@ -63,7 +63,7 @@ static int sdhci_pci_init_wakeup(struct sdhci_pci_chip *chip)
if
((
pm_flags
&
MMC_PM_KEEP_POWER
)
&&
(
pm_flags
&
MMC_PM_WAKE_SDIO_IRQ
))
if
((
pm_flags
&
MMC_PM_KEEP_POWER
)
&&
(
pm_flags
&
MMC_PM_WAKE_SDIO_IRQ
))
return
device_wakeup_enable
(
&
chip
->
pdev
->
dev
);
return
device_wakeup_enable
(
&
chip
->
pdev
->
dev
);
else
if
(
!
cap_cd_wake
)
else
if
(
!
cap_cd_wake
)
return
device_wakeup_disable
(
&
chip
->
pdev
->
dev
);
device_wakeup_disable
(
&
chip
->
pdev
->
dev
);
return
0
;
return
0
;
}
}
...
...
include/linux/pm_wakeup.h
View file @
68313be4
...
@@ -107,7 +107,7 @@ extern void wakeup_sources_read_unlock(int idx);
...
@@ -107,7 +107,7 @@ extern void wakeup_sources_read_unlock(int idx);
extern
struct
wakeup_source
*
wakeup_sources_walk_start
(
void
);
extern
struct
wakeup_source
*
wakeup_sources_walk_start
(
void
);
extern
struct
wakeup_source
*
wakeup_sources_walk_next
(
struct
wakeup_source
*
ws
);
extern
struct
wakeup_source
*
wakeup_sources_walk_next
(
struct
wakeup_source
*
ws
);
extern
int
device_wakeup_enable
(
struct
device
*
dev
);
extern
int
device_wakeup_enable
(
struct
device
*
dev
);
extern
int
device_wakeup_disable
(
struct
device
*
dev
);
extern
void
device_wakeup_disable
(
struct
device
*
dev
);
extern
void
device_set_wakeup_capable
(
struct
device
*
dev
,
bool
capable
);
extern
void
device_set_wakeup_capable
(
struct
device
*
dev
,
bool
capable
);
extern
int
device_set_wakeup_enable
(
struct
device
*
dev
,
bool
enable
);
extern
int
device_set_wakeup_enable
(
struct
device
*
dev
,
bool
enable
);
extern
void
__pm_stay_awake
(
struct
wakeup_source
*
ws
);
extern
void
__pm_stay_awake
(
struct
wakeup_source
*
ws
);
...
@@ -154,10 +154,9 @@ static inline int device_wakeup_enable(struct device *dev)
...
@@ -154,10 +154,9 @@ static inline int device_wakeup_enable(struct device *dev)
return
0
;
return
0
;
}
}
static
inline
int
device_wakeup_disable
(
struct
device
*
dev
)
static
inline
void
device_wakeup_disable
(
struct
device
*
dev
)
{
{
dev
->
power
.
should_wakeup
=
false
;
dev
->
power
.
should_wakeup
=
false
;
return
0
;
}
}
static
inline
int
device_set_wakeup_enable
(
struct
device
*
dev
,
bool
enable
)
static
inline
int
device_set_wakeup_enable
(
struct
device
*
dev
,
bool
enable
)
...
@@ -235,11 +234,10 @@ static inline int device_init_wakeup(struct device *dev, bool enable)
...
@@ -235,11 +234,10 @@ static inline int device_init_wakeup(struct device *dev, bool enable)
if
(
enable
)
{
if
(
enable
)
{
device_set_wakeup_capable
(
dev
,
true
);
device_set_wakeup_capable
(
dev
,
true
);
return
device_wakeup_enable
(
dev
);
return
device_wakeup_enable
(
dev
);
}
else
{
device_wakeup_disable
(
dev
);
device_set_wakeup_capable
(
dev
,
false
);
return
0
;
}
}
device_wakeup_disable
(
dev
);
device_set_wakeup_capable
(
dev
,
false
);
return
0
;
}
}
#endif
/* _LINUX_PM_WAKEUP_H */
#endif
/* _LINUX_PM_WAKEUP_H */
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