Questions tagged [device-driver]

A device driver is a specialized software component (usually considered "system software") which allows a system to interact with a particular type or class of hardware device, such as a keyboard, serial port, disk drive, video display, memory controller, or other peripheral.

A device driver performs translation between logical operations from the operating system or application and physical actions of a hardware device. If the hardware device supports interrupts, the device driver fields and processes its interrupts, possibly arranging for the requesting application to sleep as appropriate.

Device drivers developed since the 1980s are usually written in a high level language, most often C. They usually execute in the most trusted CPU context of the operating system (variously called "kernel mode", "ring 0", "executive mode", etc.) and so have significant restrictions on what actions they can perform. In particular, they usually lack access to a runtime library; often they cannot perform floating point operations within interrupt context.

A Virtual Device Driver is a special flavor where the driver emulates a hardware device, particularly in virtualization environments. There is also the which play a special role in the Linux kernel.

1100 questions
5
votes
2 answers

Programmatically enabling/disabling hardware device

Possible Duplicates: [.NET] How do I disable a system device? Win32 API function to programatically enable/disable device Is there a way, in C#, to programmatically disable and re-enable a device? I'm looking for essentially the same…
Icemanind
  • 47,519
  • 50
  • 171
  • 296
5
votes
1 answer

Can I call dma_unmap_single after dma_sync_single_for_cpu?

I have a situation where I need to call dma_unmap_single after dma_sync_single_for_cpu. Below is my scenario. Allocate memory for a buffer using kmalloc() Map the buffer to device using dma_map_single with DMA_FROM_DEVICE direction. After receiving…
Chinna
  • 3,930
  • 4
  • 25
  • 55
5
votes
2 answers

How to get device from cdev

I am writing a kernel module that will allocate some coherent memory and return the corresponding virtual and physical addresses. I am registering the module as cdev, allocating space with dma_alloc_coherent() and I wanted to mmap it using…
suppamax
  • 303
  • 4
  • 9
5
votes
2 answers

what happens when you plug in a new USB device?

I have an embedded device with a USB connection. When the user plugs the device into their PC (Windows, OSX), how does the operating system discover what drivers to install? How do I get my drivers to be selected? Can they reside on some central…
Will
  • 73,905
  • 40
  • 169
  • 246
5
votes
1 answer

Why can't I find cfgmgr32.lib in the Windows SDK?

I'm trying to use the Configuration Manager API, e.g., CM_Get_Device_ID. The documentation says to link to cfgmgr32.lib. However, when I do this, I get an error message from the linker: Error 1 error LNK1104: cannot open file 'cfgmgr32.lib' I…
Harry Johnston
  • 35,639
  • 6
  • 68
  • 158
5
votes
2 answers

What's the udev-like thing on OSX and how does it work?

If I plug a USB-serial adapter into my Mac, a new device shows up in /dev, such as /dev/tty.usbmodem1421 or /dev/tty.usbserial-A7048O1O. If this were Linux, I'd be looking for an udev rule that explains where the device name came from, and why it…
Johannes Ernst
  • 3,072
  • 3
  • 42
  • 56
5
votes
2 answers

Device driver classification

So according to 2 books I have on device drivers(for Linux), notable the O'REILLY version("Linux Device Drivers(3rd edition") there are 3 types of device drivers: Character drivers that read/write on byte of data at a time. Block drivers which read…
Phat_Albert
  • 119
  • 2
  • 13
5
votes
1 answer

What is the difference between physical device driver and logical device driver?

I would like to know the difference between the physical device driver (PDD) and the logical device driver (LDD)? Apart from this difference that the logical device driver (LDD) is written by the operating system vendor, while the physical device…
JavaTechnical
  • 8,846
  • 8
  • 61
  • 97
5
votes
1 answer

Does Android cache the libraries?

I am working on a device driver which android apps use. Whenever I make a small modification to the driver and recompile the modified drivers, it seems like the app is not using the modified driver but still use=ing the previous version. I am sure…
Deepthought
  • 2,815
  • 2
  • 28
  • 39
5
votes
2 answers

From where platform device gets it name

I am reading about the Linux Device model which is built around buses,devices and drivers .I am able to understand a bit about how devices and driver matches happen but not clear about the role of buses here,how buses matches with device. One more…
Amit Singh Tomar
  • 8,380
  • 27
  • 120
  • 199
5
votes
1 answer

what is the difference between Linux drivers and Android driver

As android kernel is a hacked version of linux kernel.. So the way we write drivers for linux would that work in android or some modifications are to be done .?
Virendra Kumar
  • 947
  • 2
  • 13
  • 31
5
votes
1 answer

How to make resource dll to describe device fonts?

The target driver I'm building is not a native driver but a minidriver working with Microsoft Universal Pinter Driver According to DDK: Descriptions of these items [fonts in my case] are placed in a resource DLL, as described in the Platform…
RomanM
  • 6,363
  • 9
  • 33
  • 41
5
votes
1 answer

wait_for_completion for submit_bio in make_request not returning

I am writing a custom block driver in the Linux kernel and in my make_request routine, on writes I need to read the data of the bio's specified sector (from the physical drive) prior to writing the new data. My excerpt below showcases most of what I…
5
votes
1 answer

How to record(reverse-engineer) PCI transactions on Linux

I want to record all read/write PCI transactions of a device driver. Is there a way to do it by a linux command or on software?
5
votes
2 answers

How to write software for my touchpad?

I have some ideas for improvements on my touchpad, ranging from the run of the mill scroll horizontally at the bottom, tapzones for right click, to more complicated ones. But I have no idea where to get started? I'm working on Windows 7 Home…
Nona Urbiz
  • 4,873
  • 16
  • 57
  • 84