From what I understand it creates a vector of constant 32-bit to control only 4 bits? is it?
Yes, 4x 32 bits to control 4 bits.
In the first line we have the code "output_set. To set these same IO's entry as I use "input_set?
No. In the application, you can open the same set of pins for reading. You must first close already opened output-pins file and then open the next file with the same pins.
What is the procedure for writing a routine Input?
It is easy, you ask GPIO driver to sample the data on pins to your structure (which must be in the RAM). Then, you will check scan your structure of pins and apply testing mask GPIO_PIN_STATUS to each pin as you can see in examples/gpio.