summaryrefstree
path: root/kernel/include/linux/exynos-pci-noti.h
blob: cecfa7c03c6f790012e5e3a7726a08af2ac6b3ce (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
43
44
45
46
/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#ifndef __PCI_NOTI_H
#define __PCI_NOTI_H

enum exynos_pcie_event {
	EXYNOS_PCIE_EVENT_INVALID = 0,
	EXYNOS_PCIE_EVENT_LINKDOWN = 0x1,
	EXYNOS_PCIE_EVENT_LINKUP = 0x2,
	EXYNOS_PCIE_EVENT_WAKEUP = 0x4,
	EXYNOS_PCIE_EVENT_WAKE_RECOVERY = 0x8,
	EXYNOS_PCIE_EVENT_NO_ACCESS = 0x10,
};

enum exynos_pcie_trigger {
	EXYNOS_PCIE_TRIGGER_CALLBACK,
	EXYNOS_PCIE_TRIGGER_COMPLETION,
};

struct exynos_pcie_notify {
	enum exynos_pcie_event event;
	void *user;
	void *data;
	u32 options;
};

struct exynos_pcie_register_event {
	u32 events;
	void *user;
	enum exynos_pcie_trigger mode;
	void (*callback)(struct exynos_pcie_notify *notify);
	struct exynos_pcie_notify notify;
	struct completion *completion;
	u32 options;
};
#endif