2
* OMAP Device Handler driver
4
* Copyright (C) 2010 Texas Instruments Inc.
6
* Written by Angela Stegmaier <angelabaker@ti.com>
8
* This program is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU General Public License
10
* version 2 as published by the Free Software Foundation.
12
* This program is distributed in the hope that it will be useful, but
13
* WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
27
#include <linux/ioctl.h>
28
#include <linux/cdev.h>
29
#include <linux/semaphore.h>
31
#define DEVH_IOC_MAGIC 'E'
33
#define DEVH_IOCWAITONEVENTS _IO(DEVH_IOC_MAGIC, 0)
34
#define DEVH_IOCEVENTREG _IOW(DEVH_IOC_MAGIC, 1, \
35
struct deh_reg_event_args)
36
#define DEVH_IOCEVENTUNREG _IOW(DEVH_IOC_MAGIC, 2, \
37
struct deh_reg_event_args)
39
#define DEVH_IOC_MAXNR (2)
41
/* Device error types */
49
struct omap_devh_ops {
50
int (*register_notifiers)(struct omap_devh *devh);
51
int (*unregister_notifiers)(struct omap_devh *devh);
52
int (*register_event_notification)(struct omap_devh *devh,
53
const void __user *args);
54
int (*unregister_event_notification)(struct omap_devh *devh,
55
const void __user *args);
58
struct omap_devh_platform_data {
59
struct omap_devh_ops *ops;
64
struct semaphore sem_handle;
75
struct list_head event_list;
76
spinlock_t event_lock;
79
struct deh_reg_event_args {
84
extern struct omap_devh_platform_data *devh_get_plat_data(void);
85
extern int devh_get_plat_data_size(void);