-
Notifications
You must be signed in to change notification settings - Fork 1
/
genip_driver.h
36 lines (30 loc) · 891 Bytes
/
genip_driver.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
#ifndef __GENIP_H__
#define __GENIP_H__
#include <linux/cdev.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include "genip_module.h"
struct genip_platform_data;
struct genip_device { // TODO replace unsigned long with u32 etc (maybe dont????); whatever, CHECK ALL DATA TYPES!!!
unsigned long base_phys;
unsigned long span;
void __iomem *mmio;
unsigned int irq_no;
uint32_t irq_stat; /* contents of IRQ status register */
spinlock_t irq_slck;
wait_queue_head_t irq_waitq;
dev_t dev_t;
struct device *base_dev;
struct genip_stream_dev *stream_dev[GENIP_MAX_STREAMS];
int connected_stream_dev_count;
const struct genip_platform_data *platform_data;
};
struct genip_global_t {
struct cdev cdev;
struct genip_device *device_by_minor[GENIP_MAX_DEVICES];
struct class *class;
int major;
int dev_count;
};
extern struct genip_global_t *genip_global;
#endif