diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2011-09-01 01:43:03 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-09-21 14:59:19 -0400 |
commit | 42845708363fc92a190f5c47e6fe750e3919f867 (patch) | |
tree | cb7ccac672eb989447045d81bd407c5bf3614d63 /drivers/staging | |
parent | 0a54b86a71dfec88d9b12f0e003ebc4ebb4b1f0a (diff) |
[media] tm6000: Add fast USB access quirk
Some devices support fast access to registers using the USB interface
while others require a certain delay after each operation. This commit
adds a quirk that can be enabled by devices that don't need the delay.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/tm6000/tm6000-core.c | 3 | ||||
-rw-r--r-- | drivers/staging/tm6000/tm6000.h | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c index b3c4e0529f4f..6d0803c886be 100644 --- a/drivers/staging/tm6000/tm6000-core.c +++ b/drivers/staging/tm6000/tm6000-core.c | |||
@@ -619,7 +619,8 @@ int tm6000_reset(struct tm6000_core *dev) | |||
619 | return err; | 619 | return err; |
620 | } | 620 | } |
621 | 621 | ||
622 | msleep(5); | 622 | if ((dev->quirks & TM6000_QUIRK_NO_USB_DELAY) == 0) |
623 | msleep(5); | ||
623 | 624 | ||
624 | /* | 625 | /* |
625 | * Not all devices have int_in defined | 626 | * Not all devices have int_in defined |
diff --git a/drivers/staging/tm6000/tm6000.h b/drivers/staging/tm6000/tm6000.h index dac20637c696..5bdce84f8d60 100644 --- a/drivers/staging/tm6000/tm6000.h +++ b/drivers/staging/tm6000/tm6000.h | |||
@@ -169,6 +169,8 @@ struct tm6000_endpoint { | |||
169 | unsigned maxsize; | 169 | unsigned maxsize; |
170 | }; | 170 | }; |
171 | 171 | ||
172 | #define TM6000_QUIRK_NO_USB_DELAY (1 << 0) | ||
173 | |||
172 | struct tm6000_core { | 174 | struct tm6000_core { |
173 | /* generic device properties */ | 175 | /* generic device properties */ |
174 | char name[30]; /* name (including minor) of the device */ | 176 | char name[30]; /* name (including minor) of the device */ |
@@ -260,6 +262,8 @@ struct tm6000_core { | |||
260 | struct usb_isoc_ctl isoc_ctl; | 262 | struct usb_isoc_ctl isoc_ctl; |
261 | 263 | ||
262 | spinlock_t slock; | 264 | spinlock_t slock; |
265 | |||
266 | unsigned long quirks; | ||
263 | }; | 267 | }; |
264 | 268 | ||
265 | enum tm6000_ops_type { | 269 | enum tm6000_ops_type { |