Re: Driver for combined battery charger and regulator

2022-09-08 Thread Tim Hardisty
On 08/09/2022, 18:07, "Xiang Xiao" wrote: On Fri, Sep 9, 2022 at 12:19 AM TimH wrote: >> unsigned int apply_uv;/* ?? SEE BELOW [1] */ >Yes, bool is more suitable than int for apply_uv. Thanks for confirming/agreeing - once 11.0 is released and I rebase my own

Re: Driver for combined battery charger and regulator

2022-09-08 Thread Xiang Xiao
On Fri, Sep 9, 2022 at 12:19 AM TimH wrote: > Apologies for the long post, but given the absence of many/any voltage > regulator drivers - especially PMICs - I feel I need to get this all sorted > and agreed. So I have looked long and hard at the Nuttx files and Linux > documentation and to see i

RE: Driver for combined battery charger and regulator

2022-09-08 Thread TimH
Apologies for the long post, but given the absence of many/any voltage regulator drivers - especially PMICs - I feel I need to get this all sorted and agreed. So I have looked long and hard at the Nuttx files and Linux documentation and to see if I have got it right I would like to see if the f

Re: Driver for combined battery charger and regulator

2022-09-07 Thread Nathan Hartman
On Wed, Sep 7, 2022 at 1:34 PM Tim Hardisty wrote: > On Wed, Sep 7, 2022 at 1:03 PM Tim Hardisty > wrote: > >> > >> > >> >>> Please correct me if I'm still missing something, as there > are zero > >> >>> clues I can find as to what each ops function (for example) > is

Re: Driver for combined battery charger and regulator

2022-09-07 Thread Tim Hardisty
On Wed, Sep 7, 2022 at 1:03 PM Tim Hardisty wrote: >> >> >> >>> Please correct me if I'm still missing something, as there are zero >> >>> clues I can find as to what each ops function (for example) is >> >>> actually supposed to do. >> >> >> >>

Re: Driver for combined battery charger and regulator

2022-09-07 Thread Nathan Hartman
On Wed, Sep 7, 2022 at 1:03 PM Tim Hardisty wrote: > > > >>> Please correct me if I'm still missing something, as there are zero > >>> clues I can find as to what each ops function (for example) is > >>> actually supposed to do. > >> > >> > >> > >>Here is two examples:

Re: Driver for combined battery charger and regulator

2022-09-07 Thread Tim Hardisty
>> Please: what are the purpose of: >> >> set_voltage_sel >> get_voltage_sel >> >FYI: https://www.kernel.org/doc/html/v4.12/driver-api/regulator.html Alan to the rescue again :-) Perhaps Nuttx needs a warning to newcomers: "enter without Linux knowledge at your peril" LO

Re: Driver for combined battery charger and regulator

2022-09-07 Thread Alan Carvalho de Assis
On 9/7/22, Tim Hardisty wrote: > > >>> Please correct me if I'm still missing something, as there are zero > >>> clues I can find as to what each ops function (for example) is > >>> actually supposed to do. > >> > >> > >> > >>Here is two examples: > >>https://github

Re: Driver for combined battery charger and regulator

2022-09-07 Thread Tim Hardisty
>>> Please correct me if I'm still missing something, as there are zero >>> clues I can find as to what each ops function (for example) is >>> actually supposed to do. >> >> >> >>Here is two examples: >>https://github.com/apache/incubator- >>nuttx/blob/master/d

RE: Driver for combined battery charger and regulator

2022-09-07 Thread TimH
Please correct me if I'm still missing something, as there are zero >> clues I can find as to what each ops function (for example) is >> actually supposed to do. >> >> >> >Here is two examples: >https://github.com/apache/incubator- >nuttx/blob/master/drivers/power/supply/regulator_gpio.c >http

Re: Driver for combined battery charger and regulator

2022-09-07 Thread Xiang Xiao
On Wed, Sep 7, 2022 at 10:26 PM TimH wrote: > Looking further, I'm thinking that this driver template has never been > used, is undocumented, and is therefore bordering on unusable. > > Please correct me if I'm still missing something, as there are zero clues > I can find as to what each ops func

Re: Driver for combined battery charger and regulator

2022-09-07 Thread Xiang Xiao
On Wed, Sep 7, 2022 at 9:20 PM TimH wrote: > >From: Xiang Xiao > >Sent: 07 September 2022 13:40 > > > >On Wed, Sep 7, 2022 at 8:13 PM TimH wrote: > > > >> >From: Alan Carvalho de Assis > >> >Sent: 06 September 2022 13:51 > >> >I think for ACT8945A should be included a regulator at > >> drivers

RE: Driver for combined battery charger and regulator

2022-09-07 Thread TimH
Looking further, I'm thinking that this driver template has never been used, is undocumented, and is therefore bordering on unusable. Please correct me if I'm still missing something, as there are zero clues I can find as to what each ops function (for example) is actually supposed to do.

RE: Driver for combined battery charger and regulator

2022-09-07 Thread TimH
>From: Xiang Xiao >Sent: 07 September 2022 13:40 > >On Wed, Sep 7, 2022 at 8:13 PM TimH wrote: > >> >From: Alan Carvalho de Assis >> >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 and >

Re: Driver for combined battery charger and regulator

2022-09-07 Thread Xiang Xiao
On Wed, Sep 7, 2022 at 8:13 PM TimH wrote: > >From: Alan Carvalho de Assis > >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 and will > >register itself with regulator_register(). > > Sorry

RE: Driver for combined battery charger and regulator

2022-09-07 Thread TimH
>From: Alan Carvalho de Assis >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 and will >register itself with regulator_register(). Sorry for the dumb question, but do I use regulator.c directly, o

Re: Driver for combined battery charger and regulator

2022-09-06 Thread Xiang Xiao
From: Alan Carvalho de Assis > >Sent: 06 September 2022 15:08 > >To: dev@nuttx.apache.org > >Subject: Re: Driver for combined battery charger and regulator > > > >Hi Tim, > > > >I think you can implement a register and a initialization as separated > fu

Re: Driver for combined battery charger and regulator

2022-09-06 Thread Alan Carvalho de Assis
the device at /dev and think that everything is >> fine. >> >>BR, >> >>Alan >> >>On 9/6/22, TimH wrote: >>> Oh - OK! Thanks Alan. Makes my life easier (for now) as I'm not using >>> the battery charger element on this board iteration so

RE: Driver for combined battery charger and regulator

2022-09-06 Thread TimH
arvalho de Assis >Sent: 06 September 2022 15:08 >To: dev@nuttx.apache.org >Subject: Re: Driver for combined battery charger and regulator > >Hi Tim, > >I think you can implement a register and a initialization as separated >functions, >if you search you will find some dr

Re: Driver for combined battery charger and regulator

2022-09-06 Thread Alan Carvalho de Assis
ing? > >>-Original Message- >>From: Alan Carvalho de Assis >>Sent: 06 September 2022 13:51 >>To: dev@nuttx.apache.org >>Subject: Re: Driver for combined battery charger and regulator >> >>Hi Tim, >> >>AFAIK we don't have a PMIC with ba

RE: Driver for combined battery charger and regulator

2022-09-06 Thread TimH
>Sent: 06 September 2022 13:51 >To: dev@nuttx.apache.org >Subject: Re: Driver for combined battery charger and regulator > >Hi Tim, > >AFAIK we don't have a PMIC with battery regulator in the mainline yet. >So you don't have a reference to base on it. >

Re: Driver for combined battery charger and regulator

2022-09-06 Thread Alan Carvalho de Assis
Hi Tim, AFAIK we don't have a PMIC with battery regulator in the mainline yet. So you don't have a reference to base on it. You don't need to create a single file with all functions on it, you can create separated file for each specific function. This is how MC13892 is implemented on Linux (pleas