linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* How to write a device driver in such a fashion .????
@ 2008-01-07  7:07 Misbah khan
  2008-01-07 10:55 ` Jenkins, Clive
  2008-01-08  4:31 ` Misbah khan
  0 siblings, 2 replies; 4+ messages in thread
From: Misbah khan @ 2008-01-07  7:07 UTC (permalink / raw)
  To: linuxppc-dev


Hi all ....

I need your suggession to write a driver with such requirements :-

On Initiation by the application of which key is pressed driver should
perform the task accordingly. There are 7 keys so seven different task the
driver will perform. 

1 . I do not want to use any entry point such as read/write/ioctl. In such a
case how to access the driver.
2. We dont want to implement this as a chracrter driver.
3. The driver shall look pretty much like an application where in asscssing
the H/W memory map .

Hence no entry point and no registeration but an application could be able
to communicate ....

I need your suggession in this regard .....

-----Misbah  
-- 
View this message in context: http://www.nabble.com/How-to-write-a-device-driver-in-such-a-fashion-.-----tp14660018p14660018.html
Sent from the linuxppc-dev mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: How to write a device driver in such a fashion .????
  2008-01-07  7:07 How to write a device driver in such a fashion .???? Misbah khan
@ 2008-01-07 10:55 ` Jenkins, Clive
  2008-01-08  4:31 ` Misbah khan
  1 sibling, 0 replies; 4+ messages in thread
From: Jenkins, Clive @ 2008-01-07 10:55 UTC (permalink / raw)
  To: Misbah khan, linuxppc-dev

=20
> On Initiation by the application of which key is pressed
> driver should perform the task accordingly. There are 7
> keys so seven different task the driver will perform.=20

This is not clear to me.

> 1 . I do not want to use any entry point such as
> read/write/ioctl. In such a case how to access the driver.
> 2. We dont want to implement this as a chracrter driver.
> 3. The driver shall look pretty much like an application
> where in asscssing the H/W memory map .
>
> Hence no entry point and no registeration but an
> application could be able to communicate ....

I think you want the application to directly access
memory-mapped hardware. For this you will need to open
/dev/mem and use the mmap() system call to get a virtual
address of your h/w.

Clive

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to write a device driver in such a fashion .????
  2008-01-07  7:07 How to write a device driver in such a fashion .???? Misbah khan
  2008-01-07 10:55 ` Jenkins, Clive
@ 2008-01-08  4:31 ` Misbah khan
  2008-01-08 16:42   ` Scott Wood
  1 sibling, 1 reply; 4+ messages in thread
From: Misbah khan @ 2008-01-08  4:31 UTC (permalink / raw)
  To: linuxppc-dev


using mmap() in application to access the h/w is only possible if  the device
memory is mapped in the kernel virtual memory how come we directly map to
the physical memory to virtual from user space ??? 

----Misbah 

Misbah khan wrote:
> 
> Hi all ....
> 
> I need your suggession to write a driver with such requirements :-
> 
> On Initiation by the application of which key is pressed driver should
> perform the task accordingly. There are 7 keys so seven different task the
> driver will perform. 
> 
> 1 . I do not want to use any entry point such as read/write/ioctl. In such
> a case how to access the driver.
> 2. We dont want to implement this as a chracrter driver.
> 3. The driver shall look pretty much like an application where in
> asscssing the H/W memory map .
> 
> Hence no entry point and no registeration but an application could be able
> to communicate ....
> 
> I need your suggession in this regard .....
> 
> -----Misbah  
> 

-- 
View this message in context: http://www.nabble.com/How-to-write-a-device-driver-in-such-a-fashion-.-----tp14660018p14682271.html
Sent from the linuxppc-dev mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to write a device driver in such a fashion .????
  2008-01-08  4:31 ` Misbah khan
@ 2008-01-08 16:42   ` Scott Wood
  0 siblings, 0 replies; 4+ messages in thread
From: Scott Wood @ 2008-01-08 16:42 UTC (permalink / raw)
  To: Misbah khan; +Cc: linuxppc-dev

On Mon, Jan 07, 2008 at 08:31:10PM -0800, Misbah khan wrote:
> 
> using mmap() in application to access the h/w is only possible if  the device
> memory is mapped in the kernel virtual memory how come we directly map to
> the physical memory to virtual from user space ??? 

No, /dev/mem takes physical addresses, not kernel virtual.

-Scott

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-01-08 16:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-07  7:07 How to write a device driver in such a fashion .???? Misbah khan
2008-01-07 10:55 ` Jenkins, Clive
2008-01-08  4:31 ` Misbah khan
2008-01-08 16:42   ` Scott Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).