Files
kernel_realme_salaa/include/linux/state_notifier.h
ThunderStorms21th da71c9f39e POWERSUSPEND: SQUASH - updated to Powersuspend v2.0 for Exynos 9820
*  v1.9.0 - Syncronized suspend/resume driver printing of ignored errors,
 *           and turned on state notifier debugger..
 *         - subsys_incall changed to module_init,
 *         - state notifier - going back to scheduled work, and subsys initcall,
 *         - initializing work in module init.
 *         - updated our outdated method of workqueue declaration.
 *
 *  v1.9.1 - Updated the depecrated method of declaring work but simply declaring
 *           the two work structs. Also actually INITialized the work on init,
 *           and flushed it on exit.
 *
 *  v2.0.0 - Included State Notifier hooks to run explicitly once power state
 *           changes are completed to prevent blocking issues.

Credits to robcore (https://github.com/robcore) for some updates.

Signed-off-by: ThunderStorms21th - nalas
2026-01-18 10:58:07 +00:00

22 lines
551 B
C

#ifndef __LINUX_STATE_NOTIFIER_H
#define __LINUX_STATE_NOTIFIER_H
#include <linux/notifier.h>
#define STATE_NOTIFIER_ACTIVE 0x01
#define STATE_NOTIFIER_SUSPEND 0x02
#define STATE_NOTIFIER "state_notifier"
struct state_event {
void *data;
};
extern bool state_suspended;
extern void state_suspend(void);
extern void state_resume(void);
int state_register_client(struct notifier_block *nb);
int state_unregister_client(struct notifier_block *nb);
int state_notifier_call_chain(unsigned long val, void *v);
#endif /* _LINUX_STATE_NOTIFIER_H */