LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* cx23885-input.c does in fact use a workqueue....
@ 2011-02-14  1:35 Andy Walls
  2011-02-14  4:33 ` Dmitry Torokhov
  0 siblings, 1 reply; 7+ messages in thread
From: Andy Walls @ 2011-02-14  1:35 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-kernel, linux-media, stoth

Tejun,

I just noticed this commit:

commit 8c71778cbf2c8beaefaa2dee5478aa0622d96682
Author: Tejun Heo <tj@kernel.org>
Date:   Fri Dec 24 16:14:20 2010 +0100

    media/video: don't use flush_scheduled_work()
    
    This patch converts the remaining users of flush_scheduled_work() in
    media/video.
    
    * bttv-input.c and cx23885-input.c don't use workqueue at all.  No
      need to flush.
[...]


The cx23885 driver does in fact schedule work for IR input handling:

Here's where it is scheduled for CX23888 chips:

http://git.linuxtv.org/media_tree.git?a=blob;f=drivers/media/video/cx23885/cx23885-ir.c;h=7125247dd25558678c823ee3262675570c9aa630;hb=HEAD#l76

Here's where it is scheduled for CX23885 chips:

http://git.linuxtv.org/media_tree.git?a=blob;f=drivers/media/video/cx23885/cx23885-core.c;h=359882419b7f588b7c698dbcfb6a39ddb1603301;hb=HEAD#l1861


The two different chips are handled slightly differently because

a. the CX23888 IR unit is accessable via a PCI register block.  The IR
IRQ can be acknowledged with direct PCI register accesses in an
interrupt context, and the IR pulse FIFO serviced later in a workqueue
context.

b. the CX23885 IR unit is accessed over an I2C bus.  The CX23885 A/V IRQ
has to be masked in an interrupt context (with PCI registers accesses).
Then the CX23885 A/V unit's IR IRQ is ack'ed over I2C in a workqueue
context and the IR pulse FIFO is also serviced over I2C in a workqueue
context.


So what should be done about the flush_scheduled_work()?  I think it
belongs there.

Regards,
Andy


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-02-15 20:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-14  1:35 cx23885-input.c does in fact use a workqueue Andy Walls
2011-02-14  4:33 ` Dmitry Torokhov
2011-02-14 11:03   ` Tejun Heo
2011-02-15  0:54     ` Andy Walls
2011-02-15  9:12       ` Tejun Heo
2011-02-15  9:20       ` [PATCH] cx23885: restore flushes of cx23885_dev work items Tejun Heo
2011-02-15 20:00         ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).