On Wed, Mar 15, 2006 at 18:54:08 +0500, Fawad Lateef wrote: > On 3/15/06, taha siddiqi <tawushafeez@xxxxxxxxx> wrote: > > Hi.... > > I am trying to read data from my laptop's (thinkpad R51) parallel port > > (similar to the example in Linux Device Drivers 3rd Edition). > > But, everytime i am reading the data it always comes to be 0xFF(255) .... > > I even tried the following loop in my write function (struct file_operations) > > while(count--){ > > printk("writing %x\n", *ptr); > > out(*(ptr++), port); > > wmb(); > > printk("reading data : %x\n", inb(port)); > > } > > but the debug message in log shows something like > > writing 116 > > reading 255 > > writing 78 > > reading 255 > > ... > > ... > > There are different modes for Parallel Port (AFAIR like > bi-directional, EPP or so, just google for it) which you have to > configure to bi-directional in your board bios setup (its by-default > not configured as bi-directional). So you are only able to read the > data not able to write and all your write operations does nothing. > CMIIW The other way round, no? You can only write, but it gives nothing sensible when reading. -- Jan 'Bulb' Hudec <bulb@xxxxxx>
Attachment:
signature.asc
Description: Digital signature