[Suzaku-en:00152] device driver read/write

Ford Sleeman email@hidden
Wed Feb 22 01:45:23 JST 2006

I have written a simple device driver to access some software 
addressable registers. The way the driver is set up now, I can only read 
the driver sequentially into a single buffer. What I want is to access a 
single byte in the memory mapped device. The problem is that the user 
functions have this prototype:  ssize_t read(int /fildes/, void */buf/, 
size_t nbyte) but the driver functions have the prototype: ssize_t 
read(struct file *filp, char *buf, size_t count, loff_t *f_pos). This 
works except there is no way to get the offset value into the driver. Is 
there anyway to get these four parameters to the driver? I can treat the 
count as an offset and get the byte addressing to work but I would 
rather have access to all four parameter. Does anybody know how to do this?



Ford Sleeman
VCU School of Engineering

More information about the suzaku-en mailing list