I have a Linux kernel module that implements a character device driver. I read Linux device drivers and followed a few tutorials. At the moment, I have a simple module that provides file operations open, releaseand write.
I am trying to use a Generic DMA Layer to create a streaming DMA mapping. I am confused by the following excerpt from LDD:
For many features below is required struct device. This structure is a low-level representation of a device in a Linux device model. This is not something that drivers often have to work with directly, but you need to ot when using the general DMA level. Usually you can find this structure, hidden inside the specific bus that describes your device. For example, it can be found as a devfield in struct pci_deviceor struct usb_device.
I read further the Linux device model and came across the following:
At the lowest level, every device on a Linux system is represented by an instance of a structural device.
How can I get struct devicefor my character device? Is there someone created for me backstage, or do I need to create one?
class_create(), device_create(), DMA, , . ?
, Altera SoCFPGA (ARM), , USB PCI, , FPGA.
14 LDD, , , (, , ..), , . , , , , .