mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
Staging: add princeton instruments usb camera driver
Adds the driver for the Princeton Instruments USB camera. Needs a lot of work... TODO: - make checkpatch.pl clean - coding style fixups (typedefs, etc.) - get it to build properly - audit ioctls - remove ioctls if possible - assign proper minor number - remove dbg() macro - lots of general cleanups - review locking Cc: Judd Montgomery <judd@jpilot.org> Cc: Jeff Frontz <jeff.frontz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
@@ -83,5 +83,7 @@ source "drivers/staging/altpciechdma/Kconfig"
|
||||
|
||||
source "drivers/staging/rtl8187se/Kconfig"
|
||||
|
||||
source "drivers/staging/rspiusb/Kconfig"
|
||||
|
||||
endif # !STAGING_EXCLUDE_BUILD
|
||||
endif # STAGING
|
||||
|
||||
@@ -24,3 +24,4 @@ obj-$(CONFIG_ASUS_OLED) += asus_oled/
|
||||
obj-$(CONFIG_PANEL) += panel/
|
||||
obj-$(CONFIG_ALTERA_PCIE_CHDMA) += altpciechdma/
|
||||
obj-$(CONFIG_RTL8187SE) += rtl8187se/
|
||||
obj-$(CONFIG_USB_RSPI) += rspiusb/
|
||||
|
||||
6
drivers/staging/rspiusb/Kconfig
Normal file
6
drivers/staging/rspiusb/Kconfig
Normal file
@@ -0,0 +1,6 @@
|
||||
config USB_RSPI
|
||||
tristate "Princeton Instruments USB camera support"
|
||||
default n
|
||||
depends on USB && BROKEN
|
||||
help
|
||||
This driver is for the Princeton Instruments USB camera device.
|
||||
1
drivers/staging/rspiusb/Makefile
Normal file
1
drivers/staging/rspiusb/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
obj-$(CONFIG_USB_RSPI) += rspiusb.o
|
||||
22
drivers/staging/rspiusb/TODO
Normal file
22
drivers/staging/rspiusb/TODO
Normal file
@@ -0,0 +1,22 @@
|
||||
This driver is for the Princeton Instruments USB camera.
|
||||
|
||||
It needs lots of work to get it into the main drivers/usb/ subdirectory:
|
||||
|
||||
Any patches to do any of the following changes are greatly appreciated:
|
||||
|
||||
- make checkpatch.pl clean
|
||||
- coding style fixups (typedefs, etc.)
|
||||
- get it to build properly
|
||||
- audit ioctls
|
||||
- remove ioctls if possible
|
||||
- assign proper minor number
|
||||
- remove dbg() macro
|
||||
- lots of general cleanups
|
||||
- review locking
|
||||
|
||||
Please send patches to:
|
||||
Greg Kroah-Hartman <gregkh@suse.de>
|
||||
and CC:
|
||||
Judd Montgomery <judd@jpilot.org>
|
||||
Jeff Frontz <jeff.frontz@gmail.com>
|
||||
as they have this device and can test any needed changes.
|
||||
887
drivers/staging/rspiusb/rspiusb.c
Normal file
887
drivers/staging/rspiusb/rspiusb.c
Normal file
File diff suppressed because it is too large
Load Diff
25
drivers/staging/rspiusb/rspiusb.h
Normal file
25
drivers/staging/rspiusb/rspiusb.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef __RSPIUSB_H
|
||||
#define __RSPIUSB_H
|
||||
|
||||
#define PIUSB_MAGIC 'm'
|
||||
#define PIUSB_IOCTL_BASE 192
|
||||
#define PIUSB_GETVNDCMD _IOR(PIUSB_MAGIC, PIUSB_IOCTL_BASE + 1, struct ioctl_struct)
|
||||
#define PIUSB_SETVNDCMD _IOW(PIUSB_MAGIC, PIUSB_IOCTL_BASE + 2, struct ioctl_struct)
|
||||
#define PIUSB_WRITEPIPE _IOW(PIUSB_MAGIC, PIUSB_IOCTL_BASE + 3, struct ioctl_struct)
|
||||
#define PIUSB_READPIPE _IOR(PIUSB_MAGIC, PIUSB_IOCTL_BASE + 4, struct ioctl_struct)
|
||||
#define PIUSB_SETFRAMESIZE _IOW(PIUSB_MAGIC, PIUSB_IOCTL_BASE + 5, struct ioctl_struct)
|
||||
#define PIUSB_WHATCAMERA _IO(PIUSB_MAGIC, PIUSB_IOCTL_BASE + 6)
|
||||
#define PIUSB_USERBUFFER _IOW(PIUSB_MAGIC, PIUSB_IOCTL_BASE + 7, struct ioctl_struct)
|
||||
#define PIUSB_ISHIGHSPEED _IO(PIUSB_MAGIC, PIUSB_IOCTL_BASE + 8)
|
||||
#define PIUSB_UNMAP_USERBUFFER _IOW(PIUSB_MAGIC, PIUSB_IOCTL_BASE + 9, struct ioctl_struct)
|
||||
|
||||
struct ioctl_struct {
|
||||
unsigned char cmd;
|
||||
unsigned long numbytes;
|
||||
unsigned char dir; //1=out;0=in
|
||||
int endpoint;
|
||||
int numFrames;
|
||||
unsigned char *pData;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user