calling functions in a device driver module

calling functions in a device driver module

Post by Mikeywild » Mon, 26 Feb 2001 00:40:13



I am trying to access the functions within my device driver (for a
analog-digital I/O board PCL711).  I have the module loaded.

How do I call the functions within the loaded module from a user space program
to access the circuit board's function?  Or should I load another module and
use ioctl calls to push and pull information to the board?  The various
functions need to be loaded at specific addresses.  I am not sure how ioctl
would work here.

thanks,

Mike Wilder

 
 
 

calling functions in a device driver module

Post by Gene Soudlenko » Tue, 27 Feb 2001 04:22:55


Use ioctl calls - the best and most universal way. If you need more
well-performing approach, try exporting symbols out of you module.

Gene

Quote:> I am trying to access the functions within my device driver (for a
> analog-digital I/O board PCL711).  I have the module loaded.

> How do I call the functions within the loaded module from a user space
program
> to access the circuit board's function?  Or should I load another module
and
> use ioctl calls to push and pull information to the board?  The various
> functions need to be loaded at specific addresses.  I am not sure how
ioctl
> would work here.

> thanks,

> Mike Wilder


 
 
 

calling functions in a device driver module

Post by Grant Edwar » Tue, 27 Feb 2001 05:34:07



>> I am trying to access the functions within my device driver
>> (for a analog-digital I/O board PCL711).  I have the module
>> loaded.

>> How do I call the functions within the loaded module from a
>> user space program to access the circuit board's function?  Or
>> should I load another module and use ioctl calls to push and
>> pull information to the board?  The various functions need to
>> be loaded at specific addresses.  I am not sure how ioctl would
>> work here.
>Use ioctl calls - the best and most universal way.

Yup.

You can also use the /proc filesystem to talk to drivers, but
that tends to be more of a "human" interface and not used so
much for progroams.

Quote:>If you need more well-performing approach, try exporting
>symbols out of you module.

That will make the routines available to other kernel code --
it won't make them available to user space.

--
Grant Edwards                   grante             Yow!  I'm shaving!! I'M
                                  at               SHAVING!!
                               visi.com            

 
 
 

calling functions in a device driver module

Post by Gene Soudlenko » Tue, 27 Feb 2001 06:34:27


Quote:> That will make the routines available to other kernel code --
> it won't make them available to user space.

Right,  but they can be used in kernel-side wrappers.

Gene



> >> I am trying to access the functions within my device driver
> >> (for a analog-digital I/O board PCL711).  I have the module
> >> loaded.

> >> How do I call the functions within the loaded module from a
> >> user space program to access the circuit board's function?  Or
> >> should I load another module and use ioctl calls to push and
> >> pull information to the board?  The various functions need to
> >> be loaded at specific addresses.  I am not sure how ioctl would
> >> work here.

> >Use ioctl calls - the best and most universal way.

> Yup.

> You can also use the /proc filesystem to talk to drivers, but
> that tends to be more of a "human" interface and not used so
> much for progroams.

> >If you need more well-performing approach, try exporting
> >symbols out of you module.

> That will make the routines available to other kernel code --
> it won't make them available to user space.

> --
> Grant Edwards                   grante             Yow!  I'm shaving!! I'M
>                                   at               SHAVING!!
>                                visi.com

 
 
 

1. Calling functions in a device driver module

I am trying to access the functions within my device driver (for a
analog-digital I/O board PCL711).  I have the module loaded.

How do I call the functions within the loaded module from a user space program
to access the circuit board's function?  Or should I load another module and
use ioctl calls to push and pull information to the board?  The various
functions need to be loaded at specific addresses.  I am not sure how ioctl
would work here.

thanks,

Mike Wilder

2. console colors

3. calling functions in a device driver module

4. To linux pl....help help

5. Device driver calling another device driver.

6. Maxtor 160 Gb

7. call function of device driver

8. EXABYTE blocksize

9. how to know the instruction address of calling function within called function?

10. Browser calls CGI C function which sets an env var and call a c function crashes

11. Ft. Worth - Linux Kernel Module Programmer - Unix kernel modules & Unix device drivers

12. How to call module's functions?

13. call kernel module functions ?