mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Accessing serial device from within
@ 2002-03-14 16:40 Hansen Martin
  2002-03-14 16:46 ` Ben Collins
  2002-03-14 16:50 ` Vojtech Pavlik
  0 siblings, 2 replies; 3+ messages in thread
From: Hansen Martin @ 2002-03-14 16:40 UTC (permalink / raw)
  To: linux-kernel

I am writing a module, that will communicate with a device attached to the
serial port.

 How can I do that from inside a module, using the present uart driver?
I want to do something like finding and calling the read/write routine that
is called by the kernel when a process from user space accesses the
/dev/ttyS1.

The reason I want to do it this way is that I don't want my module to only
fit one uart.

-- 
Martin Hansen
Student at SDU Sønderborg. www.sdu.dk
Writing final project at Danfoss drives. www.danfossdrives.com

Tlf: 74 88 54 62

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

* Re: Accessing serial device from within
  2002-03-14 16:40 Accessing serial device from within Hansen Martin
@ 2002-03-14 16:46 ` Ben Collins
  2002-03-14 16:50 ` Vojtech Pavlik
  1 sibling, 0 replies; 3+ messages in thread
From: Ben Collins @ 2002-03-14 16:46 UTC (permalink / raw)
  To: Hansen Martin; +Cc: linux-kernel

On Thu, Mar 14, 2002 at 05:40:12PM +0100, Hansen Martin wrote:
> I am writing a module, that will communicate with a device attached to the
> serial port.
> 
>  How can I do that from inside a module, using the present uart driver?
> I want to do something like finding and calling the read/write routine that
> is called by the kernel when a process from user space accesses the
> /dev/ttyS1.
> 
> The reason I want to do it this way is that I don't want my module to only
> fit one uart.

The question is, why do this in the kernel, when it is more easily
handled in userspace?

-- 
 .----------=======-=-======-=========-----------=====------------=-=-----.
/       Ben Collins    --    Debian GNU/Linux    --    WatchGuard.com      \
`          bcollins@debian.org   --   Ben.Collins@watchguard.com           '
 `---=========------=======-------------=-=-----=-===-======-------=--=---'

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

* Re: Accessing serial device from within
  2002-03-14 16:40 Accessing serial device from within Hansen Martin
  2002-03-14 16:46 ` Ben Collins
@ 2002-03-14 16:50 ` Vojtech Pavlik
  1 sibling, 0 replies; 3+ messages in thread
From: Vojtech Pavlik @ 2002-03-14 16:50 UTC (permalink / raw)
  To: Hansen Martin; +Cc: linux-kernel

On Thu, Mar 14, 2002 at 05:40:12PM +0100, Hansen Martin wrote:
> I am writing a module, that will communicate with a device attached to the
> serial port.
> 
>  How can I do that from inside a module, using the present uart driver?
> I want to do something like finding and calling the read/write routine that
> is called by the kernel when a process from user space accesses the
> /dev/ttyS1.
> 
> The reason I want to do it this way is that I don't want my module to only
> fit one uart.

You have to write what's called a line discipline driver.

-- 
Vojtech Pavlik
SuSE Labs

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

end of thread, other threads:[~2002-03-14 16:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-14 16:40 Accessing serial device from within Hansen Martin
2002-03-14 16:46 ` Ben Collins
2002-03-14 16:50 ` Vojtech Pavlik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®