blob: 20d76d1bbee1b2fe86044b2655a12eabce8e7814 [file] [log] [blame]
Eric Biedermane9a271e32003-09-02 03:36:25 +00001#ifndef DEVICE_PATH_H
2#define DEVICE_PATH_H
3
4enum device_path_type {
5 DEVICE_PATH_NONE = 0,
Eric Biederman83b991a2003-10-11 06:20:25 +00006 DEVICE_PATH_ROOT,
Eric Biedermane9a271e32003-09-02 03:36:25 +00007 DEVICE_PATH_PCI,
8 DEVICE_PATH_PNP,
9 DEVICE_PATH_I2C,
10};
11
12struct pci_path
13{
Eric Biederman83b991a2003-10-11 06:20:25 +000014 unsigned bus;
Eric Biedermane9a271e32003-09-02 03:36:25 +000015 unsigned devfn;
16};
17
18struct pnp_path
19{
20 unsigned port;
21 unsigned device;
22};
23
24struct i2c_path
25{
26 unsigned device;
27};
28
29struct device_path {
30 enum device_path_type type;
31 union {
32 struct pci_path pci;
33 struct pnp_path pnp;
34 struct i2c_path i2c;
35 } u;
36};
37
38
39#define DEVICE_PATH_MAX 30
40
41extern int path_eq(struct device_path *path1, struct device_path *path2);
42
43#endif /* DEVICE_PATH_H */