Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am new to linux,
I have a confusion regarding device driver, i tried googling alot but didnot find the answer of my choise
Suppose that my PC's motherboard has two UART chips interfaced with intel controller, the two UART chips are connected to two serial DB9 ports, now my question starts from here as follows
1) A common software for configuring the internal registers of these two UART chips is called device driver?
2) the common device driver has a major number say x?
3) The device like a GSM modem connected to one of the DB9 port has major number x and some minor number y?
4) A software is also needed for communicating with the modem is also called a device driver?
is my understanding is correct? and if false where am i wrong
Dear friends
I am new to linux, I have a confusion regarding device driver, i tried googling alot but didnot find the answer of my choise
Suppose that my PC's motherboard has two UART chips interfaced with intel controller, the two UART chips are connected to two serial DB9 ports, now my question starts from here as follows
1) A common software for configuring the internal registers of these two UART chips is called device driver?
2) the common device driver has a major number say x?
3) The device like a GSM modem connected to one of the DB9 port has major number x and some minor number y?
4) A software is also needed for communicating with the modem is also called a device driver?
is my understanding is correct? and if false where am i wrong
Number 4 is not a device driver...it's a program. Programs access the various parts of the system.
You will have to do the rest of your homework on your own....
the modem has some internal registers which needs to be initialized using some communication protocol before using it, also there are routines for reading and writing the data registers of the modem, do these routines are not part of device driver, in this case the device is modem,
in my understanding the program is high level applicaiton which uses these routines inside device driver for sending and retriving data to the modem without concerning the communication protocol between the processor and the modem
Thanks TB0ne
Do rest of the points are correct? Regarding point 4 i need some more clarification
the modem has some internal registers which needs to be initialized using some communication protocol before using it, also there are routines for reading and writing the data registers of the modem, do these routines are not part of device driver, in this case the device is modem,
in my understanding the program is high level applicaiton which uses these routines inside device driver for sending and retriving data to the modem without concerning the communication protocol between the processor and the modem
Re-read my other post, where I said "You will have to do the rest of your homework on your own...."
And think about the modem and other hardware, and how it interacts with the system, and you'll have your answer.
Dear TBOne
sorry to bother you, can you just suggest me any relevant document, I googled a lot but did not found any one which clarifies my question Please help me, because i am blocked here and cannot move further till i got the answer
I find it hard to believe you "Googled a lot", since just putting in "How does linux interact with hardware" brings up 3,710,000 hits, covering everything from device drivers to the software abstraction layers. Start there.
And if you're 'blocked', and have problems with your homework, you should talk with your teacher.
Remember that a "device driver" is the low(est)-level interface between an operating system and a hardware device. Microsoft uses an interesting term, HAL = Hardware Abstraction Layer, to denote a similar concept, which I think is very descriptive of what a device driver actually does.
Let's say that I have a very nifty hard-drive on my system ... it's a "Wombat 3500 Model 352!" Connected with an ultra-high performance "Cheeseball 9300 DMA-III" controller!
And-d-d-d what I ... and Linux ... want to do with this marvelous piece of equipment is: "to read the content of block 13456." Well, with the proper driver installed, and properly set up, I can do that. Yet, only the driver will know, and only the driver will care, about the "Wombat" and the "Cheeseball" part of it. For the entire rest of the machine, the driver provides: "It Just Works™." The rest of the system doesn't have to know or care "what it is" or "how it works." It just does.
You mean to say that if supposing that wombat and cheeseball communicates using some protocol say modbus (just assume) so there are two types of functions required, one for sending and reading data from UART and other for reading and writing data for MODBUS registers. so both these functions are part of drivers. is it correct?
TBone
Why don't you admit that you don't know the answer of my question too and you call yourself guru Ha ha ha. Talk to your father residing in your neighborhood how to reply to a question
TBone
Why don't you admit that you don't know the answer of my question too and you call yourself guru Ha ha ha. Talk to your father residing in your neighborhood how to reply to a question
I absolutely DO know the answer...but, again, I am not going to do your homework for you. Given your apparent lack of effort and your nasty answers, good luck getting ANYTHING from ANYONE.
sundialsvcs gave you more of a hint, since you didn't make any effort to do what I told you (which was "think about the modem and other hardware, and how it interacts with the system, and you'll have your answer.") You didn't; and even being spoon-fed most of the answer, you're STILL asking for someone to do your homework.
You mean to say that if supposing that wombat and cheeseball communicates using some protocol say modbus (just assume) so there are two types of functions required, one for sending and reading data from UART and other for reading and writing data for MODBUS registers. so both these functions are part of drivers. is it correct?
There would be two drivers: one that knows how to talk to a wombat, the other, a cheeseball. They will know about the "UARTs" and the "MODBUS registers," and ultimately they will be the ones who actually push those buttons and actually flip those switches. They will also be the first ones to respond to incoming interrupts, to recognize that the interrupt was generated by a wombat-of-interest , and to schedule whatever subsequent response is called for. As one person put it: "the device driver is the padded seat on the motorcycle (that's flying down the highway with your butt on it)."
On the other side, the software-facing side, a driver always presents the same basic set of interfaces, e.g. open(), close(), read(), write(), ioctl(). This is an abstraction of what you or "any" piece of software can do with "any device." So, software knows how to make a wombat do something, without caring or having to care that it is a wombat, and without knowing anything-at-all about it as an actual monster.
If you know the answer and don't want to give than put the answer in your hole and let other people participate in the forum, infact you should unregister your self from the forum as you are unnecessary posting vague messages,
Sorry, but you have to admit that you not made for a linux community
TBOne
If you know the answer and don't want to give than put the answer in your hole and let other people participate in the forum, infact you should unregister your self from the forum as you are unnecessary posting vague messages,
The answer was only vague if you didn't apply any thought or effort to it. This was, and IS YOUR HOMEWORK...so YOU do it. Show effort of your own, rather than asking to be fed things. And I'm certainly not (nor COULD I), stop anyone from saying anything....if someone else wants to hold your hand and do your homework, that's up to them.
Quote:
Sorry, but you have to admit that you not made for a linux community
No, sorry...not true. What I have not done is babysit you, which you don't like. Too bad.
Post reported, again.
I can't easily judge whether this is homework or not ... and how much "English as a second language" is an issue here. The OP in the thread rather sounds like something that is not homework. Mind you, I'm not going to spend a great deal (more) effort trying to find out, and I hope that further exchanges on this thread, if any, can (please) "stick to technicalities." (Trading personal insults will just get a thread locked-down.)
The (technical ...) bottom line is that, "when it comes down to actual manipulation of hardware" ... latches, registers, anything of that sort ... (only) a device-driver can do that. Likewise, when the hardware generates an interrupt, (only) a device-driver can be the one to recognize, "this one's for me" and initiate the first-level response to it. Device-drivers also "claim" and identify the hardware-devices that are discovered on the system shortly after power-on.
They are a "hardware abstraction layer," because they reduce every device ... no matter what it is, or how it's connected ... to a single, consistent rendezvous-point that any (authorized) program can use without knowing anything about how the "guts" of the device actually work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.