RE: Talking to parallel port in 2.6 kernel without using parport

From: Kathy Frazier
Date: Mon Apr 28 2008 - 14:06:55 EST


Miguel,

Thanks for your response! I took a look at ks0108.c. You are right: very
straightforward and a good reference. I had added some other things based
on what I saw in /drivers/char/ppdev.c, lp.c and tipar.c. After reviewing
yours, I am realizing I really don't need some of that, so I can simplify
mine.

My biggest problem was that lp was loaded. When I remove that, my call to
parport_register_device returns success!

Thanks for your help!

Regards,
Kathy



-----Original Message-----
From: Miguel Ojeda [mailto:miguel.ojeda.sandonis@xxxxxxxxx]
Sent: Friday, April 25, 2008 2:18 PM
To: Alan Cox
Cc: Kathy Frazier; linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: Talking to parallel port in 2.6 kernel without using parport

> > Can you tell me what I am missing? Where can I get the actual
> source code > that goes with this version to further unravel this?

About two years ago (~2.6.18) I wrote one driver that needed exclusive
access to the parallel port and, like this time, Alan Cox guided me (thank
you Alan!). If you want, you can check the code at
drivers/auxdisplay/ks0108.c. I tested it as of 2.6.25 and worked fine, so it
could be a good reference for you. In addition, the code is pretty
straightforward!

>
> To be honest this area of the kernel hasn't changed much over recent
> times. Let me know if you can't figure out what is going on.
>

Right, I haven't had to change the code since 2.6.18.

--
Miguel Ojeda

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/