In the LDD3 book, if one driver wants to control the contacts of the CPU, it must call the request_region () function to declare the use of ports.
Firstly, the word "port" is ambiguous and requires context. The port can refer to a physical connector (for example, a USB port) or a logical connection (for example, a TCP port).
Your understanding of request_region () is incorrect. This procedure is for managing the I / O address space. Your question is tagged with a tag raspberry-p1that uses an ARM processor and does not have an I / O address space for management. ARM processors use device registers with memory. You would use request_mem_region () in the device driver for the memory addresses of this block of peripheral registers.
GPIO . GPIO. ( , ( HW) , .. , GPIO.)
GPIO ( pin-control) request_mem_region() SoC GPIO. A gpio_request() , .
, request_mem_region() gpio_request() . , USB request_mem_region() . gpio_request() pin (s), USB- () ( , , ).
- GPIO? - 2.6?
GPIO Linux Documentation/gpio.h 2007 2.6.22. ( , ) GPIO Linux 2.6.3x (?). ( ) (, SoC) (, , ) GPIO.
LDD3 , 2.6.10. , x86- ( Linux x86 ), x86 GPIO.