Yes, you would have to add the software encoder, just like a parallel port
(except for the input signal names)
If you are running LinuxCNC 2.9 there is the possibility of using firmware with
the INM module that provides hardware debouncing and 4 MPG encoder channels
on GPIO pins