forked from Minki/linux
Staging: add poch driver
This is the first cut at a driver for the Redrapids Pocket Change CardBus devices. Receiving data seems to work properly, but overflows happen on transmit. Still needs more hardware debugging to work properly. (cleaned up to use proper driver core api functions by Greg) From: Vijay Kumar <vijaykumar@bravegnu.org> Cc: Alexey Zaytsev <alexey.zaytsev@gmail.com> Cc: Jaya Kumar <jayakumar.lkml@gmail.com> Cc: Ken Sienski <sienski@redrapids.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
0c74433e31
commit
a14edddac9
@ -45,4 +45,6 @@ source "drivers/staging/at76_usb/Kconfig"
|
|||||||
|
|
||||||
source "drivers/staging/pcc-acpi/Kconfig"
|
source "drivers/staging/pcc-acpi/Kconfig"
|
||||||
|
|
||||||
|
source "drivers/staging/poch/Kconfig"
|
||||||
|
|
||||||
endif # STAGING
|
endif # STAGING
|
||||||
|
@ -14,3 +14,4 @@ obj-$(CONFIG_PRISM2_USB) += wlan-ng/
|
|||||||
obj-$(CONFIG_ECHO) += echo/
|
obj-$(CONFIG_ECHO) += echo/
|
||||||
obj-$(CONFIG_USB_ATMEL) += at76_usb/
|
obj-$(CONFIG_USB_ATMEL) += at76_usb/
|
||||||
obj-$(CONFIG_PCC_ACPI) += pcc-acpi/
|
obj-$(CONFIG_PCC_ACPI) += pcc-acpi/
|
||||||
|
obj-$(CONFIG_POCH) += poch/
|
||||||
|
6
drivers/staging/poch/Kconfig
Normal file
6
drivers/staging/poch/Kconfig
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
config POCH
|
||||||
|
tristate "Redrapids Pocket Change CardBus support"
|
||||||
|
depends on PCI && UIO
|
||||||
|
default N
|
||||||
|
---help---
|
||||||
|
Enable support for Redrapids Pocket Change CardBus devices.
|
1
drivers/staging/poch/Makefile
Normal file
1
drivers/staging/poch/Makefile
Normal file
@ -0,0 +1 @@
|
|||||||
|
obj-$(CONFIG_POCH) += poch.o
|
7
drivers/staging/poch/README
Normal file
7
drivers/staging/poch/README
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
TODO:
|
||||||
|
- fix transmit overflows
|
||||||
|
- audit userspace interfaces
|
||||||
|
- get reserved major/minor if needed
|
||||||
|
|
||||||
|
Please send patches to Greg Kroah-Hartman <greg@kroah.com> and
|
||||||
|
Vijay Kumar <vijaykumar@bravegnu.org> and Jaya Kumar <jayakumar.lkml@gmail.com>
|
1425
drivers/staging/poch/poch.c
Normal file
1425
drivers/staging/poch/poch.c
Normal file
File diff suppressed because it is too large
Load Diff
29
drivers/staging/poch/poch.h
Normal file
29
drivers/staging/poch/poch.h
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
* User-space DMA and UIO based Redrapids Pocket Change CardBus driver
|
||||||
|
*
|
||||||
|
* Copyright 2008 Vijay Kumar <vijaykumar@bravegnu.org>
|
||||||
|
*
|
||||||
|
* Part of userspace API. Should be moved to a header file in
|
||||||
|
* include/linux for final version.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
struct poch_cbuf_header {
|
||||||
|
__s32 group_size_bytes;
|
||||||
|
__s32 group_count;
|
||||||
|
__s32 group_offsets[0];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct poch_counters {
|
||||||
|
__u32 fifo_empty;
|
||||||
|
__u32 fifo_overflow;
|
||||||
|
__u32 pll_unlock;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define POCH_IOC_NUM '9'
|
||||||
|
|
||||||
|
#define POCH_IOC_TRANSFER_START _IO(POCH_IOC_NUM, 0)
|
||||||
|
#define POCH_IOC_TRANSFER_STOP _IO(POCH_IOC_NUM, 1)
|
||||||
|
#define POCH_IOC_GET_COUNTERS _IOR(POCH_IOC_NUM, 2, \
|
||||||
|
struct poch_counters)
|
||||||
|
#define POCH_IOC_SYNC_GROUP_FOR_USER _IO(POCH_IOC_NUM, 3)
|
||||||
|
#define POCH_IOC_SYNC_GROUP_FOR_DEVICE _IO(POCH_IOC_NUM, 4)
|
Loading…
Reference in New Issue
Block a user