[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: general purpose driver

On Wednesday 30 October 2002 02:39 pm, johan.adolfsson@xxxxxxx.com wrote:
> ----- Original Message -----
> From: <u9900545@xxxxxxx.fi>
> To: <dev-etrax@xxxxxxx.com>
> Sent: den 30 oktober 2002 14:03
> Subject: general purpose driver
> > Hello!
> > We are planning to use ETRAX LX100 PCB for general purpose DAQ. The plan
> > now is to connect 16-bit I/O interface to LPT port. Has anybody written
> > general purpose driver for I/O to achieve better performance in speed? Or
> > do you have better ideas?
> >
> > Sami Vuolab
> What functionality do you need?
> What are your speed requirements?
> Is it individual bits or do you want to send
> The gpio driver supports port G so if you need access to individual bits
> that could be used.
> The new version in our 2.4.19 patch support setting "alarms" using ioctl()
> to tell the driver to check when some bits go high or low,
> the usermode application can do select() on the gpio fd and wake up
> when something has happened instead of polling the kernel.
> The gpio driver also supports clocking data out, although it currently
> only supports that on PA and PB I think.
> You first do a ioctl() to configure what bits to use for what
> and can then do a write() to send data - we used that to program a FPGA.

I am trying to do exactly the same thing. I want to use the data pins on the
two LP ports to achieve a 16-bit interface to control a muon air shower
detector system implemented on an FPGA. While the gpio sounds 
simple, it seems to me that most pins from the gpio ports are not actually
brought to headers on the devboard_lx. The lp data pins are. 

My driver (based on  the lcd example on the development pages) is
getting closer to working, although I still get some errors I don't
yet understand how to fix. I am new to writing device drivers, and
any sample code that does similar things would be really useful.
Is a version of the LCD driver code available anywhere for the
latest kernel release? I am using 2.4.14, and version 2_1_0 of the
devboard_lx distribution.

Sam Silverstein