How to build a power gauge driver?
Posted: Fri Mar 01, 2019 8:43 pm
I currently have an AXP17x power management chip to manage the battery supply. To query the power information, I was given a set of driver files, in which the instruction requires it to be built under directory kernel/drivers/power with Makefile and Kconfig. However under my /lib/modules/4.14.98-v7+/kernel/drivers/power there are no such files. So I guess this is not the expected location to build.
I do find on GitHub https://github.com/raspberrypi/linux/tr ... vers/power under drivers/power there are Makefile and Kconfig, plus a bunch of other power supply source files under folder supply (but why only two xx.ko files under my local folder?).
So how to build the driver? Is there a tutorial somewhere?
And the instruction also requires configuration with menuconfig, which is mentioned under "Configuring the kernel" Rpi documentation. Does it mean I actually need to build a kernel?
I do find on GitHub https://github.com/raspberrypi/linux/tr ... vers/power under drivers/power there are Makefile and Kconfig, plus a bunch of other power supply source files under folder supply (but why only two xx.ko files under my local folder?).
So how to build the driver? Is there a tutorial somewhere?
And the instruction also requires configuration with menuconfig, which is mentioned under "Configuring the kernel" Rpi documentation. Does it mean I actually need to build a kernel?