Re: How do I choose an arbitrary minor number for my tty device?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Timur Tabi
Date: Thursday, November 18, 2010 - 9:03 am

Greg KH wrote:


Well, sure.  A byte channel is just a software concept.  You can send data,
receive data, and poll a byte channel.  You can't set the baud rate, or send
break signals or even do flow control.  I debated making the driver act like a
fake serial device, which probably would have been easier but not "correct".

Unfortunately, I seem to lack some fundamental understanding of tty drivers that
is making my life difficult.  I've been reading all the documentation that I can
get my hands on, as well as studying a lot of source code, but I still can't
find any example to base *my* code on.  I just don't know if what I'm doing is
right.

I still don't know how to connect the byte channel handle with the /dev entry.
That's the question my original post asked, and I still don't have an answer to it.


I'm not so sure.  Like I said, I still don't see where there's a bus.  I have a
single driver that has multiple devices.  It sounds to me like one call to
tty_register_driver() and multiple calls to tty_register_device() would be
sufficient.

For instance, there is no code in drivers/char/ that makes a call to
bus_register(), so I don't see any precedent for a tty driver to register a bus
first.

Also, this is an Open Firmware driver.  I already have a mechanism whereby I get
probed for each instance of a byte channel.  Isn't that my "bus"?

I'm really trying to do the right thing here, Greg, but every time I try to
solve one problem, I'm being told that I need to make things way more
complicated first.

-- 
Timur Tabi
Linux kernel developer at Freescale

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: How do I choose an arbitrary minor number for my tty d ..., Timur Tabi, (Thu Nov 18, 9:03 am)
Re: How do I choose an arbitrary minor number for my tty d ..., Tabi Timur-B04825, (Mon Nov 29, 9:15 pm)