If there is a separate pyra_defconfig it suffices to replace
CONFIG_GENERIC_ADC_BATTERY=m
by
#CONFIG_GENERIC_ADC_BATTERY is not configured
This removes the driver from the list of modules and it will not be built and create the duplicate entry in /sys/class/power_supply
If it is to be removed/suppressed without recompiling the kernel:
1. rmmod generic_adc_battery 2. or write a blacklist entry for /etc/modprobe.d echo blacklist generic_adc_battery >/etc/modprobe.d/gab-blacklist.conf 3. or remove the kernel module and run depmod -a once: rm /lib/modules/4.19.*-letux+/kernel/drivers/power/supply/generic-adc-battery.ko
Hope one of these ideas works well. At the moment I'd recommend #2 since it is connected to the PyraOS rootfs config and just a static file and not a shell command to be run during boot.
BR, Nikolaus