Some drivers (I know for sure about OSS drivers) do it the opposite way.
The driver allocates a buffer (or usually multiple buffers) in physical
memory. The buffers are directly accessible from the device hardware
for DMA etc. The interrupt routines normally would not touch the buffers
(although they could) but just tell the device how to use the buffers.
The user's process that needs to use the device can use the read/write
interface, or for better performance mmap the device (which maps
the buffers into a contiguous user space) and access the buffers directly.
With the mmap api, ioctls are used to tell the process how much new data
is available (for reading) or how much was consumed by the device (so
these buffers can be written with new data).
-- Itai
-
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/