2007-10-21 12:11:55 +02:00
|
|
|
/* *****************************************************************
|
|
|
|
* (C) Copyright 2007 Benjamin Krill <ben@codiert.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of
|
|
|
|
* the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
|
|
|
* MA 02110-1301 USA
|
|
|
|
* *****************************************************************/
|
2007-07-01 23:30:51 +02:00
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include "fpgafs.h"
|
|
|
|
|
2007-07-10 17:07:35 +02:00
|
|
|
static int fpgafs_send_data_cham(struct fpga_context *ctx, const char __user *buf, int len)
|
2007-07-01 23:30:51 +02:00
|
|
|
{
|
|
|
|
printk("fpgafs: send data CHAM\n");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2007-07-10 17:07:35 +02:00
|
|
|
static int fpgafs_recv_data_cham(struct fpga_context *ctx, unsigned char *buf, int len)
|
2007-07-01 23:30:51 +02:00
|
|
|
{
|
|
|
|
printk("fpgafs: receive data CHAM\n");
|
|
|
|
return 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct fpgafs_lldrv fpgafs_lldrv_cham = {
|
|
|
|
.name = "cham",
|
|
|
|
.init = NULL,
|
|
|
|
.exit = NULL,
|
|
|
|
.send = &fpgafs_send_data_cham,
|
2007-07-09 15:12:16 +02:00
|
|
|
.recv = &fpgafs_recv_data_cham,
|
|
|
|
.read_load = NULL,
|
|
|
|
.write_load = NULL,
|
2007-07-01 23:30:51 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/* init exit functions ... */
|
|
|
|
int __init fpgafs_lldrv_cham_init(void)
|
|
|
|
{
|
|
|
|
return fpgafs_register_lldrv(&fpgafs_lldrv_cham);
|
|
|
|
}
|
|
|
|
|
|
|
|
void __exit fpgafs_lldrv_cham_exit(void)
|
|
|
|
{
|
|
|
|
fpgafs_unregister_lldrv(&fpgafs_lldrv_cham);
|
|
|
|
}
|
|
|
|
|
|
|
|
module_init(fpgafs_lldrv_cham_init);
|
|
|
|
module_exit(fpgafs_lldrv_cham_exit);
|
|
|
|
|
|
|
|
MODULE_LICENSE("GPL");
|
|
|
|
MODULE_AUTHOR("Benjamin Krill <ben@codiert.org>");
|