Messages in this thread | | | Date | Fri, 31 Aug 2012 10:42:38 +0200 | From | "Hans J. Koch" <> | Subject | Re: Using uio_pdrv to create an platform device for an FPGA, mmap() fails |
| |
On Thu, Aug 30, 2012 at 11:03:04PM +0000, Worth, Kevin wrote: > > > >> but the code seems like > >> possibly useful sample/example code. > > > >That is another good argument. > > Perhaps this could be genericized to be a generic "Memory Map Userspace > IO Device" that takes a base address and a length in config (since those > are really the only things that are particular to my device/usage).
I don't see a point in making it more generic than it already is. Other people's devices generate interrupts or have several mappings. Since these drivers are so small, especially when using uio_pdrv, it doesn't make sense to make it more generic.
> Could be enhanced to allow for additional maps, etc. or just serve as a > working example. Docs could then also simply refer to this as an example > of a device that uses the uio_pdrv driver.
Just make your driver clean and simple, then refer to it in the docs as one possible example.
Thanks, Hans
| |