Re: doubts on device probing(auto-detection)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Rajendra Stalekar wrote:

Hi,

1. When we probe a device, how does it find out that the device actually exists and is functional?

from the /proc interface

2. Do we probe for interrupts to check which interrupt line(s) can be assigned to the device in question?

We probe to check which irq number are free.

3. When the driver is calling probe_irq_on, it returns a bit mask of unassigned interrupts. In such case driver assigns an interrupt line for that specific device, Am I right?

Yes , u are right

4. If so, then how does the driver decide which interrupt line to assign to the device?

When a interrupt line is free the kernel assigns a interrupt line to the device which is done using request_irq function, which is an autodetection. Some time ur driver can announce which interrupt line it is going to use, so that u don't use the same interrupt line again.(This latter option is not a good choice)

5. Once the driver assigns the interrupt line, why does the programmer need to explicity enable the interrupt for that device. Shouldn’t that be done by probe_irq_on as default?

May be the kernel authors are providing us more options.

6. Why do we say that the programmer must be careful to enable interrupts on the device after the call to the above function and disable them before the probe_irq_off?

 

Once the irq has been assigned to the device. The device is able to receive interrupts. After servicing the interrupt the irq can be freed of. So that some other device that requires irq can be assigned one.

TIA.

 

Regards,

Rajendra Stalekar(extn 2016)

Location:- Akruti

Mobile no:- +91 9860501143

 

 

Regards,
Vignesh Kumar
begin:vcard
fn:Vignesh  Kumar  Bagavathsingh
n:Bagavathsingh;Vignesh  Kumar 
email;internet:b.vigneshkumar@xxxxxxxxxxx
tel;work:6513
tel;home:044-23773210
version:2.1
end:vcard


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux