RE: how to get information on parport using char driver functions

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

 



hi claudio,

even if ur using mem-mapped I/O it's always better/safe
to use the kernel API's provide i.e read[b/w/l] or write[b/w/l]

these are used for reading/writing byte,word or double words respectively

ex: u8 x = readb(mem-mapped I/O address);
    write(x, mem-mapped I/O address);

hope this helps

- /dev/mandeep


-----Original Message-----
From: kernelnewbies-bounce@nl.linux.org
[mailto:kernelnewbies-bounce@nl.linux.org]On Behalf Of Claudio Fiorini
Sent: Sunday, May 02, 2004 1:27 AM
To: kernelnewbies@nl.linux.org
Subject: Re: how to get information on parport using char driver
functions


----- Original Message ----- 
From: "Shine Mohamed Jabbar" <shinemohamed_j@naturesoft.net>
To: "Claudio Fiorini" <devel@cfstudio.it>
Cc: "Kernel Newbies Mailing List" <kernelnewbies@nl.linux.org>
Sent: Thursday, April 29, 2004 2:25 AM
Subject: Re: how to get information on parport using char driver functions


> On Sat, 2004-05-01 at 22:52, Claudio Fiorini wrote:
> > i preferer do something like a real device driver, otherwise i never
learn
> > how to do that!
> > Because if i use inb or outb i don't need to register nothing, those
> > functions i use in user-space.
>
> I mean the inb in the kernel space only. Check it out pls...

Ok

>
> Or u can straight away access those address using "read" kernel
> API's. There are 8 bit read, 16 bit read(readw), etc,...
>

can you show me a small example pls?

> Or if its memory mapped just access like a pointer. :-)
> > I want to do something better!
> >
> > Thanks
> >
> > Claudio Fiorini
>
> Regards,
> Shine Mohamed Jabbar
>

Thanks

Claudio Fiorini



> >
> >
> > ----- Original Message ----- 
> > From: "Shine Mohamed Jabbar" <shinemohamed_j@naturesoft.net>
> > To: "Claudio Fiorini" <devel@cfstudio.it>
> > Cc: "Kernel Newbies Mailing List" <kernelnewbies@nl.linux.org>
> > Sent: Wednesday, April 28, 2004 9:43 PM
> > Subject: Re: how to get information on parport using char driver
functions
> >
> >
> > > On Sat, 2004-05-01 at 09:15, Claudio Fiorini wrote:
> > > > I create a simple and small module using char functions to use
parport,
> > > > now i'm ok to create the device with mknod and the file_operations
> > > > struct with my functions to read, write...
> > > > I like to know now how in my open function i can take information
about
> > > > the status of the parallel port because i can't understead in
rubini's
> > book
> > >
> > > Does inb help out ur problem :-)
> > >
> > > > (I know that the example in the book is not for parport.)
> > > > how to do. (I know the macro MOD_INC_USE_COUNT and DEC)
> > > > Kernel 2.4
> > > >
> > > > Thanks to all
> > > >
> > > > Claudio Fiorini
> > > >
> > > >
> > >
> > > Regards,
> > > Shine Mohamed Jabbar
> > >
> > >
> > > --
> > > Kernelnewbies: Help each other learn about the Linux kernel.
> > > Archive:       http://mail.nl.linux.org/kernelnewbies/
> > > FAQ:           http://kernelnewbies.org/faq/
> > >
> > >
> >
> >
> >
> > --
> > Kernelnewbies: Help each other learn about the Linux kernel.
> > Archive:       http://mail.nl.linux.org/kernelnewbies/
> > FAQ:           http://kernelnewbies.org/faq/
> >
> >
>
>


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux