Linux provides some tools to interact with the gpiochip interface (which replaces the deprecated sysfs GPIO interface). Expose these as a package. The tool has not changed much recently, so there is no need to package a version for each kernel.