Skip to content

Commit

Permalink
Staging: add USB ENE card reader driver
Browse files Browse the repository at this point in the history
This driver is for the ENE card reader that can be found in many
different laptops.  It was written by ENE, but cleaned up to
work properly in the kernel tree by Novell.

Signed-off-by: Al Cho <acho@novell.com>
Cc: <yiyingc@ene.com.tw>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Al Cho authored and Greg Kroah-Hartman committed Sep 8, 2010
1 parent 15b9e32 commit 126bb03
Show file tree
Hide file tree
Showing 25 changed files with 10,081 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/staging/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,7 @@ source "drivers/staging/sbe-2t3e3/Kconfig"

source "drivers/staging/ath6kl/Kconfig"

source "drivers/staging/keucr/Kconfig"

endif # !STAGING_EXCLUDE_BUILD
endif # STAGING
1 change: 1 addition & 0 deletions drivers/staging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@ obj-$(CONFIG_ACPI_QUICKSTART) += quickstart/
obj-$(CONFIG_WESTBRIDGE_ASTORIA) += westbridge/astoria/
obj-$(CONFIG_SBE_2T3E3) += sbe-2t3e3/
obj-$(CONFIG_ATH6K_LEGACY) += ath6kl/
obj-$(CONFIG_USB_ENESTORAGE) += keucr/
13 changes: 13 additions & 0 deletions drivers/staging/keucr/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
config USB_ENESTORAGE
tristate "USB ENE card reader support"
depends on USB && SCSI
---help---
Say Y here if you wish to control a ENE Card reader.

This option depends on 'SCSI' support being enabled, but you
probably also need 'SCSI device support: SCSI disk support'
(BLK_DEV_SD) for most USB storage devices.

To compile this driver as a module, choose M here: the
module will be called keucr.

16 changes: 16 additions & 0 deletions drivers/staging/keucr/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
EXTRA_CFLAGS += -Idrivers/scsi

obj-$(CONFIG_USB_ENESTORAGE) += keucr.o

keucr-objs := \
usb.o \
scsiglue.o \
transport.o \
init.o \
sdscsi.o \
msscsi.o \
ms.o \
smscsi.o \
smilmain.o \
smilsub.o \
smilecc.o
Empty file.
11 changes: 11 additions & 0 deletions drivers/staging/keucr/TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
TODO:
- checkpatch.pl clean
- sparse clean
- determine if the driver should not be using a duplicate
version of the usb-storage scsi interface code, but should
be merged into the drivers/usb/storage/ directory and
infrastructure instead.
- review by the USB developer community

Please send any patches for this driver to Al Cho <acho@novell.com> and
Greg Kroah-Hartman <gregkh@suse.de>.
25 changes: 25 additions & 0 deletions drivers/staging/keucr/common.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#ifndef COMMON_INCD
#define COMMON_INCD

typedef void VOID;
typedef u8 BOOLEAN;
typedef u8 BYTE;
typedef u8 *PBYTE;
typedef u16 WORD;
typedef u16 *PWORD;
typedef u32 DWORD;
typedef u32 *PDWORD;

#define swapWORD(w) ((((unsigned short)(w) << 8) & 0xff00) | (((unsigned short)(w) >> 8) & 0x00ff))
#define swapDWORD(dw) ((((unsigned long)(dw) << 24) & 0xff000000) | \
(((unsigned long)(dw) << 8) & 0x00ff0000) | \
(((unsigned long)(dw) >> 8) & 0x0000ff00) | \
(((unsigned long)(dw) >> 24) & 0x000000ff))

#define LittleEndianWORD(w) (w)
#define LittleEndianDWORD(dw) (dw)
#define BigEndianWORD(w) swapWORD(w)
#define BigEndianDWORD(dw) swapDWORD(dw)

#endif

Loading

0 comments on commit 126bb03

Please sign in to comment.