linux/drivers/misc/phantom.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  Copyright (C) 2005-2007 Jiri Slaby <[email protected]>
 *
 *  You need a userspace library to cooperate with this driver. It (and other
 *  info) may be obtained here:
 *  http://www.fi.muni.cz/~xslaby/phantom.html
 *  or alternatively, you might use OpenHaptics provided by Sensable.
 */

#include <linux/compat.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/pci.h>
#include <linux/fs.h>
#include <linux/poll.h>
#include <linux/interrupt.h>
#include <linux/cdev.h>
#include <linux/slab.h>
#include <linux/phantom.h>
#include <linux/sched.h>
#include <linux/mutex.h>

#include <linux/atomic.h>
#include <asm/io.h>

#define PHANTOM_VERSION

#define PHANTOM_MAX_MINORS

#define PHN_IRQCTL

#define PHB_RUNNING
#define PHB_NOT_OH

static DEFINE_MUTEX(phantom_mutex);
static int phantom_major;

static const struct class phantom_class =;

struct phantom_device {};

static unsigned char phantom_devices[PHANTOM_MAX_MINORS];

static int phantom_status(struct phantom_device *dev, unsigned long newstat)
{}

/*
 * File ops
 */

static long phantom_ioctl(struct file *file, unsigned int cmd,
		unsigned long arg)
{}

#ifdef CONFIG_COMPAT
static long phantom_compat_ioctl(struct file *filp, unsigned int cmd,
		unsigned long arg)
{}
#else
#define phantom_compat_ioctl
#endif

static int phantom_open(struct inode *inode, struct file *file)
{}

static int phantom_release(struct inode *inode, struct file *file)
{}

static __poll_t phantom_poll(struct file *file, poll_table *wait)
{}

static const struct file_operations phantom_file_ops =;

static irqreturn_t phantom_isr(int irq, void *data)
{}

/*
 * Init and deinit driver
 */

static unsigned int phantom_get_free(void)
{}

static int phantom_probe(struct pci_dev *pdev,
	const struct pci_device_id *pci_id)
{}

static void phantom_remove(struct pci_dev *pdev)
{}

static int __maybe_unused phantom_suspend(struct device *dev_d)
{}

static int __maybe_unused phantom_resume(struct device *dev_d)
{}

static struct pci_device_id phantom_pci_tbl[] =;
MODULE_DEVICE_TABLE(pci, phantom_pci_tbl);

static SIMPLE_DEV_PM_OPS(phantom_pm_ops, phantom_suspend, phantom_resume);

static struct pci_driver phantom_pci_driver =;

static CLASS_ATTR_STRING(version, 0444, PHANTOM_VERSION);

static int __init phantom_init(void)
{}

static void __exit phantom_exit(void)
{}

module_init();
module_exit(phantom_exit);

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_VERSION();