Names of devices in the sub-tree of /dev may and often are, maintained by udev rules (/etc/udev/**).
Names of devices in the sub-tree of /sys are set in (are part of) the driver code.
So for a "fixed", "primary" information source, try using /sys/class/input/**
For example, "what is event0?"
Code:
cd /sys/class/input
cd event0
cd device
ls -l
The /sys sub-tree is a nest of symbolic links giving you many ways to reach the information desired.
One quick way, get the Major:Minor number of the devices, then use /sys/dev/{block,char} as appropriate to reach the information about it.
The since this tree is hard-coded in the driver, it will not change while the driver is loaded. It will (should) disappear if the driver is unloaded.
(something to keep in mind when unloading a g_* module and loading a different g_* module for the same device)