LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 10-13-2013, 02:05 PM   #1
devendra.devgupta
LQ Newbie
 
Registered: Oct 2013
Posts: 7

Rep: Reputation: Disabled
Question device driver confusion


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

Thanks for helping me
 
Old 10-13-2013, 02:44 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by devendra.devgupta View Post
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....
 
1 members found this post helpful.
Old 10-14-2013, 12:03 AM   #3
devendra.devgupta
LQ Newbie
 
Registered: Oct 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
Question

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
 
Old 10-14-2013, 07:31 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by devendra.devgupta View Post
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.
 
Old 10-14-2013, 11:04 PM   #5
devendra.devgupta
LQ Newbie
 
Registered: Oct 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
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

Regards
 
Old 10-15-2013, 08:33 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by devendra.devgupta View Post
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.
 
Old 10-15-2013, 09:21 AM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,610
Blog Entries: 4

Rep: Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905
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.
 
Old 10-15-2013, 11:56 PM   #8
devendra.devgupta
LQ Newbie
 
Registered: Oct 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
Dear sundialsvcs

Thanks for your reply

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?
 
Old 10-23-2013, 11:46 AM   #9
devendra.devgupta
LQ Newbie
 
Registered: Oct 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
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
 
Old 10-24-2013, 08:46 AM   #10
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by devendra.devgupta View Post
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.

Post reported.

Last edited by TB0ne; 10-24-2013 at 08:48 AM.
 
Old 10-24-2013, 09:10 AM   #11
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,610
Blog Entries: 4

Rep: Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905
Quote:
Originally Posted by devendra.devgupta View Post
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.
 
1 members found this post helpful.
Old 10-24-2013, 10:49 PM   #12
devendra.devgupta
LQ Newbie
 
Registered: Oct 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
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,

Sorry, but you have to admit that you not made for a linux community
 
Old 10-25-2013, 08:37 AM   #13
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by devendra.devgupta View Post
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.
 
Old 10-25-2013, 12:00 PM   #14
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by devendra.devgupta View Post
TBOne

If you know the answer and don't want to give than put the answer in your hole
That's not the best way to address a long-time and experienced user. Not to mention the inappropriate language. Man warned!
 
Old 10-25-2013, 03:10 PM   #15
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,610
Blog Entries: 4

Rep: Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905
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.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Confusion about device drivers and user-space dkeefe3773 Linux - General 2 05-28-2011 09:46 AM
Device name confusion (sda VS sdb) Virchanza Linux - General 5 01-11-2010 06:58 AM
PCI Device Names - confusion ca.ms Linux - General 3 01-27-2008 07:01 PM
confusion in IDE1/IDE2, device manager settings in XP b0nd Linux - Hardware 5 08-17-2006 07:15 PM
confusion about device names Koven Solaris / OpenSolaris 1 02-07-2006 12:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration