Skip to contentSkip to conversation

Driver for TI FlashMedia card reader - source

PATCH In review Alex Dubov 6 participants 8 messages Sep 20, 2006 – Sep 22, 2006

Subsystems (3)
lore
Share & tools
lore

Alex Dubov

author maintainer
#0 lore raw

PATCH 1/2 Driver for TI FlashMedia card reader - source

Driver for TI Flash Media card reader. At present, only MMC/SD cards are supported.

---
 MAINTAINERS              |    5 
 drivers/misc/tifm_7xx1.c |  419 ++++++++++++++++++++++
 drivers/misc/tifm_core.c |  276 ++++++++++++++
 drivers/mmc/tifm_sd.c    |  876 ++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/tifm.h     |  158 ++++++++
 5 files changed, 1734 insertions(+), 0 deletions(-)
MAINTAINERS +5 -0
index 25cd707..1a366e7 100644
@@ -2821,6 +2821,11 @@ M:	[email protected]
 L:	[email protected]
 S:	Maintained
 
+TI FLASH MEDIA INTERFACE DRIVER
+P:      Alex Dubov
+M:      [email protected]
+S:      Maintained
+
 TI PARALLEL LINK CABLE DRIVER
 P:     Romain Lievin
 M:     [email protected]
drivers/misc/tifm_7xx1.c new file +419 -0

419 lines not on this page · raw message

drivers/misc/tifm_core.c new file +276 -0

276 lines not on this page · raw message

drivers/mmc/tifm_sd.c new file +876 -0

876 lines not on this page · raw message

include/linux/tifm.h new file +158 -0

158 lines not on this page · raw message

Signature · 8 lines
1.4.2.1



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
#1 lore raw
Quoted 2 lines · On Tue, 19 Sep 2006 23:02:11 -0700 (PDT) Alex Dubov <[email protected]> wrote:

Driver for TI Flash Media card reader. At present, only MMC/SD cards are supported.

Could I ask where the information which permitted this (nice-looking) driver to be written came from?

Trivia:

There's some whitespace damage in there. Please search the diff for "^ " and fix it up.

We indent the body of switch statements one tab stop less than this driver does.

The driver has lots of really big inlined functions. It's best to uninline these. If the function has a single callsite, gcc will inline it anyway. If the function has multiple callsites (now, or in the future), inlining it is undesirable.

The driver has a lot of things like

static inline void* tifm_get_drvdata(struct tifm_dev *dev)

whereas we prefer

static inline void *tifm_get_drvdata(struct tifm_dev *dev)

#2 lore raw
Quoted 1 line · Andrew Morton

Trivia:

[snip]

More trivia:

- Unnecessary casts for void pointers
- Assignment in if statement expression

#3 lore raw
Quoted 9 lines · Pekka Enberg
Quoted 1 line · Andrew Morton

Trivia:

[snip]

More trivia:

- Unnecessary casts for void pointers
- Assignment in if statement expression

also

+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/kernel.h>

Some unnecessary includes there. (config.h & kernel.h are auto-included)

Dave

#4 lore raw
Quoted 17 lines · Dave Jones
Quoted 9 lines · Pekka Enberg
Quoted 1 line · Andrew Morton

Trivia:

[snip]

More trivia:

- Unnecessary casts for void pointers
- Assignment in if statement expression

also

drivers/misc/tifm_core.c new file +3 -0
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
Quoted 1 line

Some unnecessary includes there. (config.h & kernel.h are auto-included)

Only config.h (technically, autoconf.h)

author maintainer
#5 lore raw
In reply to Andrew Morton
Quoted 2 lines

Could I ask where the information which permitted this (nice-looking) driver to be written came from?

I had 3 sources for this:
1. win64 binary driver
2. linux binary driver - it says its license is GPL, but source is nowhere to be found
3. OMAP 5912 datasheet for part of the tifm_sd functionality

My upcoming memorystick driver only draws from the first two sources. I should also add that I never worked for TI nor Everest Consulting (the authors of the binary driver) and don't know anybody who ever did.

Quoted 4 lines

The driver has lots of really big inlined functions. It's best to uninline these. If the function has a single callsite, gcc will inline it anyway. If the function has multiple callsites (now, or in the future), inlining it is undesirable.

I actually marked them "inline" to signify the fact that only one callsite is intended for these functions. They are not intended to be called from arbitrary places (no problem to fix those, though).

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

author maintainer
#6 lore raw

PATCH 1/2 Driver for TI FlashMedia card reader - source

In reply to Andrew Morton

Driver for TI Flash Media card reader. At present, only MMC/SD cards are supported.

---
 MAINTAINERS              |    5 
 drivers/misc/tifm_7xx1.c |  423 ++++++++++++++++++++++
 drivers/misc/tifm_core.c |  269 ++++++++++++++
 drivers/mmc/tifm_sd.c    |  882 ++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/tifm.h     |  158 ++++++++
 5 files changed, 1737 insertions(+), 0 deletions(-)
MAINTAINERS +5 -0
index 25cd707..3bf4aa9 100644
@@ -2810,6 +2810,11 @@ M:	[email protected]
 L:	[email protected]
 S:	Maintained
 
+TI FLASH MEDIA INTERFACE DRIVER
+P:      Alex Dubov
+M:      [email protected]
+S:      Maintained
+
 TI OMAP RANDOM NUMBER GENERATOR SUPPORT
 P:	Deepak Saxena
 M:	[email protected]
drivers/misc/tifm_7xx1.c new file +423 -0

423 lines not on this page · raw message

drivers/misc/tifm_core.c new file +269 -0

269 lines not on this page · raw message

drivers/mmc/tifm_sd.c new file +882 -0

882 lines not on this page · raw message

include/linux/tifm.h new file +158 -0

158 lines not on this page · raw message

Signature · 8 lines
1.4.2.1



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com