login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
September
»
26
Re: [PATCH] bw-qcam: use data_reverse instead of manually poking the control register
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Randy Dunlap
Subject:
Re: [PATCH] bw-qcam: use data_reverse instead of manually poking the control register
Date: Wednesday, September 26, 2007 - 2:00 pm
On Wed, 26 Sep 2007 12:12:50 -0700 Brett Warden wrote:
quoted text
> Appeases the warning "parport0 (bw-qcam): use data_reverse for this!" > > Signed-off-by: Brett T. Warden <brett.warden@gmail.com> >
Where does the warning come from? (what software produces it?)
quoted text
> --- > > It seems to work fine with my Quickcam under 2.6.22. > > diff --git a/drivers/media/video/bw-qcam.c b/drivers/media/video/bw-qcam.c > index 7d47cbe..01e47ed 100644 > --- a/drivers/media/video/bw-qcam.c > +++ b/drivers/media/video/bw-qcam.c > @@ -107,6 +107,11 @@ static inline void write_lpcontrol(struct > qcam_device *q, int d) > parport_write_control(q->pport, d); > } > > +static inline void reverse_port(struct qcam_device *q) > +{ > + parport_data_reverse(q->pport); > +} > + > static int qc_waithand(struct qcam_device *q, int val); > static int qc_command(struct qcam_device *q, int command); > static int qc_readparam(struct qcam_device *q); > @@ -369,7 +374,11 @@ static void qc_reset(struct qcam_device *q) > break; > > case QC_ANY: > - write_lpcontrol(q, 0x20); > + /* > + * Replaced with reverse_port > + * write_lpcontrol(q, 0x20); > + */ > + reverse_port(q); > write_lpdata(q, 0x75); > > if (read_lpdata(q) != 0x75) { > @@ -512,10 +521,12 @@ static inline int qc_readbytes(struct > qcam_device *q, char buffer[]) > switch (q->port_mode & QC_MODE_MASK) > { > case QC_BIDIR: /* Bi-directional Port */ > - write_lpcontrol(q, 0x26); > + reverse_port(q); > + write_lpcontrol(q, 0x6); > lo = (qc_waithand2(q, 1) >> 1); > hi = (read_lpstatus(q) >> 3) & 0x1f; > - write_lpcontrol(q, 0x2e); > + reverse_port(q); > + write_lpcontrol(q, 0xe); > lo2 = (qc_waithand2(q, 0) >> 1); > hi2 = (read_lpstatus(q) >> 3) & 0x1f; > switch (q->bpp) > @@ -613,10 +624,13 @@ static long qc_capture(struct qcam_device * q, > char __user *buf, unsigned long l > > if ((q->port_mode & QC_MODE_MASK) == QC_BIDIR) > { > - write_lpcontrol(q, 0x2e); /* turn port around */ > - write_lpcontrol(q, 0x26); > + reverse_port(q); /* turn port around */ > + write_lpcontrol(q, 0xe); > + reverse_port(q); > + write_lpcontrol(q, 0x6); > (void) qc_waithand(q, 1); > - write_lpcontrol(q, 0x2e); > + reverse_port(q); > + write_lpcontrol(q, 0xe); > (void) qc_waithand(q, 0); > } > > > > --
--- ~Randy Phaedrus says that Quality is about caring. -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] bw-qcam: use data_reverse instead of manually poki ...
, Brett Warden
, (Wed Sep 26, 12:12 pm)
Re: [PATCH] bw-qcam: use data_reverse instead of manually ...
, Ray Lee
, (Wed Sep 26, 12:43 pm)
Re: [PATCH] bw-qcam: use data_reverse instead of manually ...
, Brett Warden
, (Wed Sep 26, 1:06 pm)
Re: [PATCH] bw-qcam: use data_reverse instead of manually ...
, Ray Lee
, (Wed Sep 26, 2:00 pm)
Re: [PATCH] bw-qcam: use data_reverse instead of manually ...
, Randy Dunlap
, (Wed Sep 26, 2:00 pm)
Re: [PATCH] bw-qcam: use data_reverse instead of manually ...
, Brett Warden
, (Wed Sep 26, 2:43 pm)
Re: [PATCH] bw-qcam: use data_reverse instead of manually ...
, Brett Warden
, (Thu Sep 27, 12:28 pm)
Re: [PATCH] bw-qcam: use data_reverse instead of manually ...
, Alan Cox
, (Thu Sep 27, 2:29 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 041/196] kobject: add kobject_init_and_add function
Lukas Hejtmanek
Re: Another libata error related to OCZ SSD
Greg Kroah-Hartman
[PATCH 023/196] MCP_UCB1200: Convert from class_device to device
Florian Fainelli
Re: System clock runs too fast after 2.6.27 -> 2.6.28.1 upgrade
Christoph Lameter
[patch 1/4] mmu_notifier: Core code
git
:
Johannes Schindelin
Re: [PATCH 1/2] Add strbuf_initf()
John Bito
[EGIT] Push to GitHub caused corruption
Jakub Narebski
Re: [PATCH 0/2] gitweb: patch view
Junio C Hamano
Re: [PATCH] When a remote is added but not fetched, tell the user.
Andy Parkins
Re: [RFC] Submodules in GIT
git-commits-head
:
Linux Kernel Mailing List
ahci: Workaround HW bug for SB600/700 SATA controller PMP support
Linux Kernel Mailing List
V4L/DVB (11086): au0828: rename macro for currently non-function VBI support
Linux Kernel Mailing List
ceph: client types
Linux Kernel Mailing List
ceph: on-wire types
Linux Kernel Mailing List
crypto: chainiv - Use kcrypto_wq instead of keventd_wq
linux-netdev
:
Andrew Morton
Re: [Bugme-new] [Bug 14969] New: b44: WOL does not work in suspended state
Giuseppe CAVALLARO
Re: [PATCH 03/13] stmmac: add the new Header file for stmmac platform data
Taku Izumi
[PATCH 3/3] ixgbe: add registers etc. printout code just before resetting adapters
Eric Dumazet
rps: some comments
Thomas Gleixner
Re: [RFC PATCH 02/12] On Tue, 23 Sep 2008, David Miller wrote:
openbsd-misc
:
Stephan Andreas
problems with login after xlock in OpenBSD release 4.7
pmc
Make A Change. Alcoholism and Drug Addiction Treatment
ropers
Re: what exactly is enc0?
Fuad NAHDI
Re: What does your environment look like?
Matthew Szudzik
Typo on OpenBSD 4.4 CD Set
Colocation donated by:
Syndicate