0

I read about I/O ports and communicating with the hardware, I want to gain access to an I/O port to see a live example of the various functions. I don't understand what the first argument (unsigned long start) of request_region is.

I'd like someone to show me a very simple use of these functions.

struct resource *request_region(unsigned long start, unsigned long n, const char *name);
void release_region(unsigned long first, unsigned long n);

Also, where can we see a list of I/O ports? I guess it might be in /proc/ioports?

Kexix
  • 1
  • 1
    Are you aware of bootlin.com ? https://elixir.bootlin.com/linux/latest/A/ident/request_region – KamilCuk Apr 28 '21 at 14:01
  • @KamilCuk I am yes, but it just code without any explanation. – Kexix Apr 28 '21 at 14:04
  • **request_region()** is the modern (combined) version of the **request_mem_region()** and **ioremap()** calls. See https://stackoverflow.com/questions/34391418/linux-device-driver-memory-mapped-i-o-example-discussion and https://stackoverflow.com/questions/18580469/content-of-proc-iomem *"...but it just code without any explanation."* -- Code is the documentation. – sawdust Apr 30 '21 at 19:15

0 Answers0