I'm writing a driver for the Quorvo ACT8945A device. This is a combined
7-output programmable regulator AND Li-ion battery charger, all in one.

 

I see there are existing "regulator.h" and "battery_charger.h" driver
templates.

 

Would my best approach to be to create a driver using a new (e.g.)
"battery_charger_regulator.h" template combining that existing functionality
or is there another, preferred, approach?

 

Would the preferred device name be "/dev/bat0"? Or "/dev/act8945a"? Or
something else?

 

Then, once that is decided, I seem to have a mental block when it comes to
device initialisation vs registering.

 

In my mind, registering should just create the /dev/xxxx entry and
initialise the relevant structs, but not touch the device itself? But some
drivers do go on to actually set up the device, whereas I think that should
be a separate "init" function called independently of the "register"
function, or a specific ioctl perhaps? What is the best practice here?

 

Thanks,

 

Tim.

 

Reply via email to