-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathlrng_health.h
42 lines (34 loc) · 1.11 KB
/
lrng_health.h
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 OR BSD-2-Clause */
/*
* Copyright (C) 2022, Stephan Mueller <[email protected]>
*/
#ifndef _LRNG_HEALTH_H
#define _LRNG_HEALTH_H
#include "lrng_es_mgr.h"
enum lrng_health_res {
lrng_health_pass, /* Health test passes on time stamp */
lrng_health_fail_use, /* Time stamp unhealthy, but mix in */
lrng_health_fail_drop /* Time stamp unhealthy, drop it */
};
#ifdef CONFIG_LRNG_HEALTH_TESTS
bool lrng_sp80090b_startup_complete_es(enum lrng_internal_es es);
bool lrng_sp80090b_compliant(enum lrng_internal_es es);
enum lrng_health_res lrng_health_test(u32 now_time, enum lrng_internal_es es);
void lrng_health_disable(void);
#else /* CONFIG_LRNG_HEALTH_TESTS */
static inline bool lrng_sp80090b_startup_complete_es(enum lrng_internal_es es)
{
return true;
}
static inline bool lrng_sp80090b_compliant(enum lrng_internal_es es)
{
return false;
}
static inline enum lrng_health_res
lrng_health_test(u32 now_time, enum lrng_internal_es es)
{
return lrng_health_pass;
}
static inline void lrng_health_disable(void) { }
#endif /* CONFIG_LRNG_HEALTH_TESTS */
#endif /* _LRNG_HEALTH_H */