Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 42845708 authored by Thierry Reding's avatar Thierry Reding Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarThierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 0a54b86a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -619,6 +619,7 @@ int tm6000_reset(struct tm6000_core *dev)
		return err;
	}

	if ((dev->quirks & TM6000_QUIRK_NO_USB_DELAY) == 0)
		msleep(5);

	/*
+4 −0
Original line number Diff line number Diff line
@@ -169,6 +169,8 @@ struct tm6000_endpoint {
	unsigned			maxsize;
};

#define TM6000_QUIRK_NO_USB_DELAY (1 << 0)

struct tm6000_core {
	/* generic device properties */
	char				name[30];	/* name (including minor) of the device */
@@ -260,6 +262,8 @@ struct tm6000_core {
	struct usb_isoc_ctl          isoc_ctl;

	spinlock_t                   slock;

	unsigned long quirks;
};

enum tm6000_ops_type {