On Wed, Sep 7, 2022 at 9:20 PM TimH <t...@jti.uk.com.invalid> wrote:
> >From: Xiang Xiao <xiaoxiang781...@gmail.com> > >Sent: 07 September 2022 13:40 > > > >On Wed, Sep 7, 2022 at 8:13 PM TimH <t...@jti.uk.com.invalid> wrote: > > > >> >From: Alan Carvalho de Assis <acas...@gmail.com> > >> >Sent: 06 September 2022 13:51 > >> >I think for ACT8945A should be included a regulator at > >> drivers/power/supply/ > >> >and will implement the functions from <nuttx/power/regulator.h> and > >> >will register itself with regulator_register(). > >> > >> Sorry for the dumb question, but do I use regulator.c directly, or is > >> it just a template for my own act8945a.c driver? I can find no other > >> files that include regulator.h! > >> > >> > >You need implement regulator_ops_s and call regulator_register, other > >drivers which want to enable the power need call regulator_get and > >regulator_enable > > > > > >> And if this is very clear from some documentation somewhere, I > apologise! > >> > >> > >NuttX regulator framework is similar Linux kernel, so you can reference > >this: > >https://docs.kernel.org/power/regulator/overview.html > > From looking at the Linux documentation then back at Nuttx register.c it > leads me to think I have to register 6 different devices for this 6-output > PMIC. Is that right? > > Yes.