blob: cbbe1263017d35ff138ca9d4d788395f29ff19b6 [file] [log] [blame]
David Kiliani3fedd142008-11-01 00:39:12 +01001/**
2 * @file me1000_device.h
3 *
4 * @brief ME-1000 device class instance.
5 * @note Copyright (C) 2007 Meilhaus Electronic GmbH (support@meilhaus.de)
6 * @author Guenter Gebhardt
7 */
8
9/*
10 * Copyright (C) 2007 Meilhaus Electronic GmbH (support@meilhaus.de)
11 *
12 * This file is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 */
26
27#ifndef _ME1000_H_
28#define _ME1000_H_
29
30#include <linux/pci.h>
31#include <linux/spinlock.h>
32
33#include "medevice.h"
34
35#ifdef __KERNEL__
36
37#define ME1000_MAGIC_NUMBER 1000
38
39/**
40 * @brief The ME-1000 device class structure.
41 */
42typedef struct me1000_device {
43 me_device_t base; /**< The Meilhaus device base class. */
44 spinlock_t ctrl_lock; /**< Guards the DIO mode register. */
45} me1000_device_t;
46
47/**
48 * @brief The ME-1000 device class constructor.
49 *
50 * @param pci_device The pci device structure given by the PCI subsystem.
51 *
52 * @return On succes a new ME-1000 device instance. \n
53 * NULL on error.
54 */
55me_device_t *me1000_pci_constructor(struct pci_dev *pci_device)
56 __attribute__ ((weak));
57
58#endif
59#endif