[PARPORT] ioctl for direct control of parport lines?


Marek Michalkiewicz (marekm@linux.org.pl)
Sun, 9 May 1999 21:06:25 +0200 (CEST)


Hello,

I have a suggestion for the Linux parallel port driver. I'm not
subscribed to this list so please Cc: any replies to me, and please
excuse me if it has been discussed before.

I'm currently playing with in-system-programming of Atmel AVR
microcontrollers (which are quite nice, especially since there is
an egcs-avr port) using the parallel port lines. There is Linux
software to do it, but it uses ioperm() and talks to the I/O ports
directly. It works, but requires root privileges (running the
program as root, or making it setuid).

Would it be possible to add ioctl's to read/write the data, control
and status lines of a parallel port? The rest can be done in user
space (it is not very timing critical, nothing bad happens if the
process goes to sleep for a while; doing it too fast might cause
problems so the program takes BogoMips into account) so there is
little point in bloating the kernel with something as specialised
as a complete AVR ISP driver.

Simply setting permissions on /dev/lp1 would be more convenient
than running the program as root or making it setuid. Another
advantage would be that the user level program doesn't need to know
the I/O port layout, so it would be portable to other architectures.

What do you think?

Regards,
Marek Michalkiewicz

-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --



This archive was generated by hypermail 2.0b3 on Sun 09 May 1999 - 15:09:42 EDT