[Linux-parport] parport problem

Shunguang Ding (BJ) shunguang.ding at o2micro.com
Tue Nov 8 07:17:42 EST 2005


Dear All,

 

         I am writing one kernel driver which calls the standard parport
interfaces to drive LCD and its keyboard.

I have two modules used in two different boards; the two modules are
uss720.o and parport_pc.o.

The following is steps what I do:

{

1>     Find the port by parport_enumerate.

struct parport * port;

 for (port = parport_enumerate (); port != NULL; port = port->next) 

{

           //printk("paport base : %x ",(int)port->base);

           g_port = port; // g_port is one struct parport *

           break;

}

2>     Write data:

         ub[0] = uAddr; 

         g_port->ops->epp_write_addr(g_port, ub, 1, 0); 

         ub[0] = uval;  

         g_port->ops->epp_write_data(g_port, ub, 1, 0);

3>     Read Data

         ub[0] = uAddr; 

         g_port->ops->epp_write_addr(g_port, ub, 1, 0); 

         g_port->ops->epp_read_data(g_port, ub, 1, 0); 

         v = ub[0];

}

 

The above steps are able to work for parport_pc.o, but panic for
uss720.o.

I try to find what's the problem, and I find panic issue disappears
after I call "port->ops->data_reverse(port);"

 But it still doesn't work until I call "port->ops->write_control(port,
0x0);".

 

Could you like to explain why I need call the two interfaces
additionally for uss720.o?

 

Thanks a lot,

Jet

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.infradead.org/pipermail/linux-parport/attachments/20051108/6bf0c747/attachment-0001.html


More information about the Linux-parport mailing list