title: Stream data into a file in a linux device driver
body: <p>I am rather new to Linux device driver programmring, but for debugging purposes, I would like to write a stream of data directly to a file. Or maybe I should aks the question differently:</p>
  
  <p>I have a system-on-chip, where one module provides a data stream. The module has to be initlized with a write address. Instead of writing the data into memory, I would like to redirect the data stream to that address to a file. This could also be done via userspace, because writing to file in kernelspace is not recommended.</p>
  
  <p>Can somebody sketch roughly how to do this? </p>
  
  <p>Thanks, Stefan</p>