On Thursday, June 16, 2016 at 10:23:50 AM UTC+3, Maxime Ripard wrote:
>
> On Tue, Jun 14, 2016 at 01:28:08PM -0700, Ene Alexandru wrote: 
> > > There's already everything needed in the power_supply framework to 
> > > change that, why would you want to do this in the device tree? 
> > 
> > I know that this can be implemented by providing proper write interfaces 
> > via the power supply class but I am not aware of any application that 
> will 
> > properly configure the power supply to board specific values once the 
> > system is up. 
>
> Any application can do it, including a shell script. It's just a 
> simple write in a file in sysfs. 
>
> > The reason behind this patch and some other that i have in mind is that 
> one 
> > of my boards and psu got damaged after switching from the 3.4 allwinner 
> > kernel to the mainline one: the axp chip was properly configured in the 
> > .fex file but it's left to the default values that might not be safe in 
> the 
> > linux-sunxi drivers ( and were not in my set-up ) 
>
> That's bad, but it's not the proper solution. Even with that fix, you 
> have no guarantee that the driver will be loaded (because it might not 
> have been compiled in) or that the board would not be damaged before 
> it loads (because it was a module). 
>
> > This patch is intended to provide a way to configure some of the AXP20x 
> > registers to a proper state as fast as possible after boot. 
> > Some of the boards might have hardware limitation regarding the maximum 
> > power the board can draw from the USB VCC line ( connector / layout / 
> > protection circuits in line, etc). 
> > If it gets approved then board vendors / users can add proper limits for 
> > each hardware implementation. 
>
> Except that if users are expected to modify this, DT is definitely not 
> the right place to put this. If you want to put sane defaults that 
> would always be there, please do this in the bootloader... 
>
> > Adding write support via the /sys/class/... interface is the next step i 
> > have planned, but i decided to go with this one first. 
>
> ... And with write support, users will be able to change it if they 
> want. 
>
> Maxime 
>
> -- 
> Maxime Ripard, Free Electrons 
> Embedded Linux, Kernel and Android engineering 
> http://free-electrons.com 
>


Ok, I see your point of view. Adding write support is better.
I'll re-sync git, look over the latest files and provide a patch that adds 
write functionality (if not already implemented) - i can reuse most of the 
code that's converting input to register values

Thanks and best regards,
Alexandru

-- 
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