login
Login
/
Register
Search
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
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Randy Dunlap <randy.dunlap@...>
To: Brett Warden <brett.warden@...>
Cc: <linux-kernel@...>, <trivial@...>
Subject:
Re: [PATCH] bw-qcam: use data_reverse instead of manually poking the control register
Date: Wednesday, September 26, 2007 - 5: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 poking...
, Brett Warden
, (Wed Sep 26, 3:12 pm)
Re: [PATCH] bw-qcam: use data_reverse instead of manually po...
, Randy Dunlap
, (Wed Sep 26, 5:00 pm)
Re: [PATCH] bw-qcam: use data_reverse instead of manually po...
, Ray Lee
, (Wed Sep 26, 3:43 pm)
Re: [PATCH] bw-qcam: use data_reverse instead of manually po...
, Brett Warden
, (Wed Sep 26, 4:06 pm)
Re: [PATCH] bw-qcam: use data_reverse instead of manually po...
, Ray Lee
, (Wed Sep 26, 5:00 pm)
Re: [PATCH] bw-qcam: use data_reverse instead of manually po...
, Brett Warden
, (Wed Sep 26, 5:43 pm)
Re: [PATCH] bw-qcam: use data_reverse instead of manually po...
, Brett Warden
, (Thu Sep 27, 3:28 pm)
Re: [PATCH] bw-qcam: use data_reverse instead of manually po...
, Alan Cox
, (Thu Sep 27, 5:29 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO
david
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
David Miller
Re: [RFC/PATCH] Documentation of kernel messages
Rafael J. Wysocki
Re: linux-next: Tree for June 13: IO APIC breakage on HP nx6325
git
:
linux-netdev
:
Josip Rodin
bnx2_poll panicking kernel
Frans Pop
svc: failed to register lockdv1 RPC service (errno 97).
Gerrit Renker
[PATCH 03/37] dccp: List management for new feature negotiation
Herbert Xu
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
3 users
and
836 guests
online.
Online users
olecom
tiendaslinety
mitchscott
Syndicate