Skip to content

Commit

Permalink
Staging: add driver for Realtek RTS5139 cardreader
Browse files Browse the repository at this point in the history
This driver is used for Realtek RTS5139 USB cardreader, which
supports many cards, such as SD, MS, XD series cards.

Signed-off-by: edwin_rong <edwin_rong@realsil.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
edwin_rong authored and Greg Kroah-Hartman committed Aug 23, 2011
1 parent dd89e20 commit 1dac418
Show file tree
Hide file tree
Showing 30 changed files with 21,799 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 @@ -64,6 +64,8 @@ source "drivers/staging/rtl8712/Kconfig"

source "drivers/staging/rts_pstor/Kconfig"

source "drivers/staging/rts5139/Kconfig"

source "drivers/staging/frontier/Kconfig"

source "drivers/staging/pohmelfs/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/staging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ obj-$(CONFIG_RTL8192U) += rtl8192u/
obj-$(CONFIG_RTL8192E) += rtl8192e/
obj-$(CONFIG_R8712U) += rtl8712/
obj-$(CONFIG_RTS_PSTOR) += rts_pstor/
obj-$(CONFIG_RTS5139) += rts5139/
obj-$(CONFIG_SPECTRA) += spectra/
obj-$(CONFIG_TRANZPORT) += frontier/
obj-$(CONFIG_POHMELFS) += pohmelfs/
Expand Down
16 changes: 16 additions & 0 deletions drivers/staging/rts5139/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
config RTS5139
tristate "Realtek RTS5139 USB card reader support"
depends on USB_SUPPORT && SCSI
help
Say Y here to include driver code to support the Realtek
RTS5139 USB card readers.

If this driver is compiled as a module, it will be named rts5139.

config RTS5139_DEBUG
bool "Realtek RTS5139 Card Reader verbose debug"
depends on RTS5139
help
Say Y here in order to have the rts5139 code generate
verbose debugging messages.

37 changes: 37 additions & 0 deletions drivers/staging/rts5139/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Driver for Realtek RTS51xx USB card reader
#
# Copyright(c) 2009 Realtek Semiconductor Corp. All rights reserved.
#
# 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, 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, see <http://www.gnu.org/licenses/>.
#
# Author:
# wwang (wei_wang@realsil.com.cn)
# No. 450, Shenhu Road, Suzhou Industry Park, Suzhou, China
# Maintainer:
# Edwin Rong (edwin_rong@realsil.com.cn)
# No. 450, Shenhu Road, Suzhou Industry Park, Suzhou, China
#
# Makefile for the RTS51xx USB Card Reader drivers.
#

TARGET_MODULE := rts5139

EXTRA_CFLAGS := -Idrivers/scsi -I$(PWD)

obj-m += $(TARGET_MODULE).o

common-obj := rts51x_transport.o rts51x_scsi.o rts51x_fop.o

$(TARGET_MODULE)-objs := $(common-obj) rts51x.o rts51x_chip.o rts51x_card.o \
xd.o sd.o ms.o sd_cprm.o ms_mg.o
5 changes: 5 additions & 0 deletions drivers/staging/rts5139/TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
TODO:
- support more USB card reader of Realtek family
- use kernel coding style
- checkpatch.pl fixes

46 changes: 46 additions & 0 deletions drivers/staging/rts5139/debug.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/* Driver for Realtek RTS51xx USB card reader
* Header file
*
* Copyright(c) 2009 Realtek Semiconductor Corp. All rights reserved.
*
* 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, 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, see <http://www.gnu.org/licenses/>.
*
* Author:
* wwang (wei_wang@realsil.com.cn)
* No. 450, Shenhu Road, Suzhou Industry Park, Suzhou, China
* Maintainer:
* Edwin Rong (edwin_rong@realsil.com.cn)
* No. 450, Shenhu Road, Suzhou Industry Park, Suzhou, China
*/

#ifndef __RTS51X_DEBUG_H
#define __RTS51X_DEBUG_H

#include <linux/kernel.h>

#define RTS51X_TIP "rts51x: "

#ifdef CONFIG_RTS5139_DEBUG
#define RTS51X_DEBUGP(x...) printk(KERN_DEBUG RTS51X_TIP x)
#define RTS51X_DEBUGPN(x...) printk(KERN_DEBUG x)
#define RTS51X_DEBUGPX(x...) printk(x)
#define RTS51X_DEBUG(x) x
#else
#define RTS51X_DEBUGP(x...)
#define RTS51X_DEBUGPN(x...)
#define RTS51X_DEBUGPX(x...)
#define RTS51X_DEBUG(x)
#endif

#endif /* __RTS51X_DEBUG_H */
Loading

0 comments on commit 1dac418

Please sign in to comment.