Am 14.05.2007 22:00 schrieb Jan Engelhardt: > On May 14 2007 19:40, Lars K.W. Gohlke wrote: >>> >>> after searching the mailing list and searching the web, I still don't >>> know how to access correctly the serial port (in user space known as >>> /dev/ttyS01) > > http://kernelnewbies.org/FAQ/WhyWritingFilesFromKernelIsBad That's not nice, sending a newbie on a wild goose chase like that. He doesn't want to write to a file from kernel after all. Reading FAQs is never bad, of course, but reading that particular one won't help him at all with this questions. Lars: Read that at your leisure if you have time. It is quite educating, though completely irrelevant to your questions. >>> would somebody be so kind to give me an example: >>> >>> with this behaviour: >>> >>> 1. read from port >>> 2. output via printk() >>> 3. write to port > > inb/inw/inl, printk, outb/outw/outl. This is even less nice. You're sending him down the road of directly programming UART registers, knowing full well (I hope) that this a Bad Thing. What will you tell him when he comes back covered in bruises? Lars: Ignore this advice. You don't want to use in[bwl]/out[bwl] to directly access serial port hardware for which the kernel has a working driver already. That way lies pain, as I know from experience. Read up on the line discipline interface instead, as described in my previous reply. HTH T. -- Tilman Schmidt E-Mail: [email protected] Bonn, Germany Diese Nachricht besteht zu 100% aus wiederverwerteten Bits. Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
Attachment:
signature.asc
Description: OpenPGP digital signature
- Follow-Ups:
- Re: How to access correctly serial port inside module?
- From: Jan Engelhardt <[email protected]>
- Re: How to access correctly serial port inside module?
- References:
- How to access correctly serial port inside module?
- From: "Lars K.W. Gohlke" <[email protected]>
- Re: How to access correctly serial port inside module?
- From: "Lars K.W. Gohlke" <[email protected]>
- Re: How to access correctly serial port inside module?
- From: Jan Engelhardt <[email protected]>
- How to access correctly serial port inside module?
- Prev by Date: Re: [PATCH] pcmcia: ppc64 needs 64-bit ioaddr_t
- Next by Date: Re: [VOYAGER] fix build broken by shift to smp_ops
- Previous by thread: Re: How to access correctly serial port inside module?
- Next by thread: Re: How to access correctly serial port inside module?
- Index(es):