summaryrefslogtreecommitdiff
path: root/taia.c
blob: 34d53473e5f3c12ffc09bfa1c06a9bc7cdd47fdc (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
#include <stdbool.h>

#include "taia.h"

static const struct taia tolerance_taia = {
	.sec.x = 0,
	.nano = 700000000ULL,	/* 700ms acceptance window */
	.atto = 0,
};

bool taia_looks_good(struct taia *arr_taia, struct taia *pkt_taia)
{
	bool good = false;
	struct taia tmp;

	if (taia_less(arr_taia, pkt_taia)) {
		taia_sub(&tmp, pkt_taia, arr_taia);
		if (taia_less(&tmp, &tolerance_taia))
			good = true;
	} else {
		taia_sub(&tmp, arr_taia, pkt_taia);
		if (taia_less(&tmp, &tolerance_taia))
			good = true;
	}

	return good;
}
40e8d86958c3d8ea98fa'>9853596779daede130f7d2d8a3ab55ce1e4c2cca parent927d3f8f73217fb19c28496321510335176955de (diff)
HSI: omap_ssi_port: switch to threaded pio irq
Move pio interrupt handler from tasklet into thread to allow runtime_pm_get_sync calls without irq_safe being set. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
Diffstat
-rw-r--r--drivers/hsi/controllers/omap_ssi.h2
-rw-r--r--drivers/hsi/controllers/omap_ssi_port.c60
2 files changed, 24 insertions, 38 deletions
diff --git a/drivers/hsi/controllers/omap_ssi.h b/drivers/hsi/controllers/omap_ssi.h