blob: 11fd957028f742d97aa6ba88dbd306666ccd75f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
*
*/
#ifndef __HH_MEM_NOTIFIER_H
#define __HH_MEM_NOTIFIER_H
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/haven/hh_rm_drv.h>
#include <linux/types.h>
enum hh_mem_notifier_tag {
HH_MEM_NOTIFIER_TAG_DISPLAY,
HH_MEM_NOTIFIER_TAG_TOUCH,
HH_MEM_NOTIFIER_TAG_MAX
};
typedef void (*hh_mem_notifier_handler)(enum hh_mem_notifier_tag tag,
unsigned long notif_type,
void *entry_data, void *notif_msg);
#if IS_ENABLED(CONFIG_HH_MEM_NOTIFIER)
void *hh_mem_notifier_register(enum hh_mem_notifier_tag tag,
hh_mem_notifier_handler notif_handler,
void *data);
void hh_mem_notifier_unregister(void *cookie);
#else
static void *hh_mem_notifier_register(enum hh_mem_notifier_tag tag,
hh_mem_notifier_handler notif_handler,
void *data)
{
return ERR_PTR(-ENOTSUPP);
}
static void hh_mem_notifier_unregister(void *cookie)
{
}
#endif
#endif
|