Hello Hans,
Is theres any news about support battery /charging support for apx221s ?? i 
have using 4.6-rc2 kernel but this limitation persist. There is nothing in 
the folder  /sys/class/power_supply/.
Thanks for your work :)
Juan Carlos

El viernes, 10 de julio de 2015, 10:47:20 (UTC+2), Hans de Goede escribió:
>
> Hi, 
>
> On 12-06-15 05:35, Lawrence Yu wrote: 
> > Hi, 
> > 
> > On Wed, Jun 10, 2015 at 8:09 AM, Hans de Goede <[email protected] 
> <javascript:>> wrote: 
> > 
> >> Hi, 
> >> 
> >> On 08-06-15 05:22, Lawrence Y wrote: 
> >> 
> >>> Hi, 
> >>> 
> >>> I've managed to get AC charging information and battery charge 
> information 
> >>> on my A31s tablet. 
> >>> 
> >>> I've taken the AXP20x patch from here 
> >>> 
> >>> 
> >>> 
> http://lists.infradead.org/pipermail/linux-arm-kernel/2014-October/295547.html
>  
> >>> 
> >>> and done very minor code modifications to make it work with the AXP221 
> and 
> >>> the 4.1 sunxi-next kernel. 
> >>> 
> >> 
> >> Cool that is great news. Note that I've just posted a new version of 
> parts 
> >> of that patch. One thing which needs to be changed is to use a dts 
> >> child-node and thus a mfd cell, platform device and platform driver 
> >> per function, instead of using only one which then instantiates all 
> >> 4 power-supplies. We need this to be per power-supply so that they can 
> >> be enabled/disabled individually and we do not end up having e.g. an 
> >> ac power-supply registered in sysfs on tablets which only have an otg 
> >> plug for charging and do not have a separate power barrel plug for the 
> >> ac power-supply. 
> >> 
> >>   What is the best way to share the modifications needed?  Is it ok to 
> post 
> >>> a 
> >>> patch containing all of the changes here including the modifications 
> even 
> >>> though I am not original author of the patch? 
> >>> 
> >> 
> >> Yes that is fine, as long as you credit the original author in the 
> commit 
> >> message and leave his copyright at the top of the copied files. 
> >> 
> >> It would be great if you could convert the work you've done to the 1 
> >> dts childnode / mfd-cell per power-supply model, and then post that. 
> >> 
> >> If that is too much work, please do post what you've as that will be 
> >> very helpful for however works on this next. 
> >> 
> >> Regards, 
> >> 
> >> Hans 
> >> 
> > 
> > I've posted the patch at the end of this email. 
>
> Thanks, one thing which stands out is that you're modifying a lot of the 
> axp20x structs / defines, etc. 
>
> What you should do instead is create new structs like 
> axp22x_volatile_ranges 
> which start as a copy of the 20x structs and then have your modifcations, 
> likewise just copy all the register name #defines doing s/20X/22X and then 
> make any necessary changes/additions to the 22X defines. 
>
> Note that the 4.2-rc1 kernel already has some 22x support, so most of 
> this is already done. 
>
> > I don't think I am at the 
> > level yet where I would be able to do a good job of creating the new 
> needed 
> > drivers.  I will probably try anyway and post what I end up with, but I 
> > wouldn't expect anyone to wait on anything usable coming out of it, 
> > especially if they felt they could do a more proper job at making the 
> > needed drivers. 
>
> Maybe you can start with rebasing your patch on to of 4.2-rc1, and making 
> the changes I've suggested? That would already be a big help for anyone 
> coming after you and trying to add 22x battery / charging support. 
>
> Regards, 
>
> Hans 
>

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to